19686: Introduce low-level api_client constructor
[arvados.git] / lib / cloud / loopback / loopback.go
index 9b71c9f162b9083731f5e3113755fefdae0c31a5..fb7a35beae154cb384e60e1b130d76970ad23d8a 100644 (file)
@@ -64,7 +64,9 @@ func (is *instanceSet) Create(it arvados.InstanceType, _ cloud.ImageID, tags clo
        // destroy+create cycle doesn't fix whatever was broken -- but
        // nothing else will either, so the best we can do is remove
        // the "broken" flag and try again.
-       if err := os.Remove("/var/lock/crunch-run-broken"); err != nil && !errors.Is(err, os.ErrNotExist) {
+       if err := os.Remove("/var/lock/crunch-run-broken"); err == nil {
+               is.logger.Info("removed /var/lock/crunch-run-broken")
+       } else if !errors.Is(err, os.ErrNotExist) {
                return nil, err
        }
        u, err := user.Current()