Skip to content

Commit

Permalink
Merge pull request whywaita#26 from site0801/update/add-log-output-ad…
Browse files Browse the repository at this point in the history
…dinstance

Change AddInstance log
  • Loading branch information
whywaita authored Oct 12, 2023
2 parents d50513b + f8b9389 commit 65ac707
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions server/pkg/api/server_add_instance.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 65ac707

Please sign in to comment.