From f8b9389d134995f98d0428d6e7d77d358284ee78 Mon Sep 17 00:00:00 2001 From: site0801 <0801site@gmail.com> Date: Tue, 10 Oct 2023 18:50:58 +0900 Subject: [PATCH] update --- server/pkg/api/server_add_instance.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/server/pkg/api/server_add_instance.go b/server/pkg/api/server_add_instance.go index f95f143..b530dca 100644 --- a/server/pkg/api/server_add_instance.go +++ b/server/pkg/api/server_add_instance.go @@ -52,11 +52,11 @@ func (s *ShoesLXDMultiServer) AddInstance(ctx context.Context, req *pb.AddInstan var client lxd.InstanceServer if errors.Is(err, ErrInstanceIsNotFound) { - host, err := s.scheduleHost(targetLXDHosts) + host, err = s.scheduleHost(targetLXDHosts) if err != nil { return nil, status.Errorf(codes.InvalidArgument, "failed to schedule host: %+v", err) } - log.Printf("AddInstance scheduled host: %s\n", host.HostConfig.LxdHost) + log.Printf("AddInstance scheduled host: %s, runnerName: %s\n", host.HostConfig.LxdHost, instanceName) reqInstance := api.InstancesPost{ InstancePut: api.InstancePut{ @@ -95,6 +95,7 @@ func (s *ShoesLXDMultiServer) AddInstance(ctx context.Context, req *pb.AddInstan if err != nil { return nil, status.Errorf(codes.Internal, "failed to retrieve instance information: %+v", err) } + log.Printf("Success AddInstance host: %s, runnerName: %s\n", host.HostConfig.LxdHost, i.Name) return &pb.AddInstanceResponse{ CloudId: i.Name,