X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/f3ba65ddf8642b941cb04ddbb69fdb1e8515a6d2..a2f56709fa0b5ad109c940149d95ce616ec9e691:/lib/dispatchcloud/scheduler/sync.go diff --git a/lib/dispatchcloud/scheduler/sync.go b/lib/dispatchcloud/scheduler/sync.go index fc683505f9..038b4c8c5f 100644 --- a/lib/dispatchcloud/scheduler/sync.go +++ b/lib/dispatchcloud/scheduler/sync.go @@ -13,6 +13,8 @@ import ( "github.com/sirupsen/logrus" ) +var reportedUnexpectedState = false + // sync resolves discrepancies between the queue and the pool: // // Lingering crunch-run processes for finalized and unlocked/requeued @@ -82,10 +84,13 @@ func (sch *Scheduler) sync() { go sch.requeue(ent, "priority=0") } default: - sch.logger.WithFields(logrus.Fields{ - "ContainerUUID": uuid, - "State": ent.Container.State, - }).Error("BUG: unexpected state") + if !reportedUnexpectedState { + sch.logger.WithFields(logrus.Fields{ + "ContainerUUID": uuid, + "State": ent.Container.State, + }).Error("BUG: unexpected state") + reportedUnexpectedState = true + } } } for uuid := range running {