17770: while throttled, do not log that instances are being created when
authorWard Vandewege <ward@curii.com>
Thu, 16 Sep 2021 16:48:12 +0000 (12:48 -0400)
committerWard Vandewege <ward@curii.com>
Thu, 16 Sep 2021 16:48:12 +0000 (12:48 -0400)
       they are not.

Arvados-DCO-1.1-Signed-off-by: Ward Vandewege <ward@curii.com>

lib/dispatchcloud/scheduler/run_queue.go

index e9fc5f90215156051fb6de95c123da2c83022700..f729f0dc23a7f927eca6c39fe75734a4a2355ad9 100644 (file)
@@ -78,10 +78,12 @@ tryrun:
                                logger.Trace("overquota")
                                overquota = sorted[i:]
                                break tryrun
-                       } else if logger.Info("creating new instance"); sch.pool.Create(it) {
+                       } else if sch.pool.Create(it) {
                                // Success. (Note pool.Create works
                                // asynchronously and does its own
-                               // logging, so we don't need to.)
+                               // logging about the eventual outcome,
+                               // so we don't need to.)
+                               logger.Info("creating new instance")
                        } else {
                                // Failed despite not being at quota,
                                // e.g., cloud ops throttled.  TODO: