Skip to content

Commit b09444a

Browse files
committed
Lessen severity of waiting loop errors to warnings
1 parent 80f6b7a commit b09444a

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

test/remote/run_remote/run_remote.go

+3-4
Original file line numberDiff line numberDiff line change
@@ -399,13 +399,12 @@ func createInstance(serviceAccount string) (string, error) {
399399
var instance *compute.Instance
400400
instance, err = computeService.Instances.Get(*project, *zone, name).Do()
401401
if err != nil {
402-
glog.Error(err)
402+
glog.Errorf("Failed to get instance %v: %v", name, err)
403403
return false, nil
404404
}
405405

406406
if strings.ToUpper(instance.Status) != "RUNNING" {
407-
err = fmt.Errorf("instance %s not in state RUNNING, was %s", name, instance.Status)
408-
glog.Error(err)
407+
glog.Warningf("instance %s not in state RUNNING, was %s", name, instance.Status)
409408
return false, nil
410409
}
411410

@@ -416,7 +415,7 @@ func createInstance(serviceAccount string) (string, error) {
416415

417416
if sshOut, err := remote.SSHNoSudo(name, "echo"); err != nil {
418417
err = fmt.Errorf("Instance %v in state RUNNING but not available by SSH: %v", name, err)
419-
glog.Errorf("SSH encountered an error: %v, output: %v", err, sshOut)
418+
glog.Warningf("SSH encountered an error: %v, output: %v", err, sshOut)
420419
return false, nil
421420
}
422421

0 commit comments

Comments
 (0)