From af73d31e60fd5c26d58bb8275785e628c3febdc0 Mon Sep 17 00:00:00 2001 From: Marcus Martins Date: Tue, 19 Dec 2017 13:23:21 -0800 Subject: [PATCH] Vendor docker/swarmkit to 713d79d Revendor swarmkit to 713d79dc8799b33465c58ed120b870c52eb5eb4f to include https://github.com/docker/swarmkit/pull/2473. Signed-off-by: Marcus Martins --- vendor.conf | 2 +- .../manager/orchestrator/taskreaper/task_reaper.go | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/vendor.conf b/vendor.conf index 78330a284a..216370695a 100644 --- a/vendor.conf +++ b/vendor.conf @@ -114,7 +114,7 @@ github.com/dmcgowan/go-tar go1.10 github.com/stevvooe/ttrpc 76e68349ad9ab4d03d764c713826d31216715e4f # cluster -github.com/docker/swarmkit a6519e28ff2a558f5d32b2dab9fcb0882879b398 +github.com/docker/swarmkit 713d79dc8799b33465c58ed120b870c52eb5eb4f github.com/gogo/protobuf v0.4 github.com/cloudflare/cfssl 7fb22c8cba7ecaf98e4082d22d65800cf45e042a github.com/google/certificate-transparency d90e65c3a07988180c5b1ece71791c0b6506826e diff --git a/vendor/github.com/docker/swarmkit/manager/orchestrator/taskreaper/task_reaper.go b/vendor/github.com/docker/swarmkit/manager/orchestrator/taskreaper/task_reaper.go index bcef801f63..d702783833 100644 --- a/vendor/github.com/docker/swarmkit/manager/orchestrator/taskreaper/task_reaper.go +++ b/vendor/github.com/docker/swarmkit/manager/orchestrator/taskreaper/task_reaper.go @@ -96,10 +96,10 @@ func (tr *TaskReaper) Run(ctx context.Context) { // Serviceless tasks can be cleaned up right away since they are not attached to a service. tr.cleanup = append(tr.cleanup, t.ID) } - // tasks with desired state REMOVE that have progressed beyond SHUTDOWN can be cleaned up + // tasks with desired state REMOVE that have progressed beyond COMPLETE can be cleaned up // right away for _, t := range removeTasks { - if t.Status.State >= api.TaskStateShutdown { + if t.Status.State >= api.TaskStateCompleted { tr.cleanup = append(tr.cleanup, t.ID) } } @@ -138,10 +138,10 @@ func (tr *TaskReaper) Run(ctx context.Context) { if t.Status.State >= api.TaskStateOrphaned && t.ServiceID == "" { tr.cleanup = append(tr.cleanup, t.ID) } - // add tasks that have progressed beyond SHUTDOWN and have desired state REMOVE. These + // add tasks that have progressed beyond COMPLETE and have desired state REMOVE. These // tasks are associated with slots that were removed as part of a service scale down // or service removal. - if t.DesiredState == api.TaskStateRemove && t.Status.State >= api.TaskStateShutdown { + if t.DesiredState == api.TaskStateRemove && t.Status.State >= api.TaskStateCompleted { tr.cleanup = append(tr.cleanup, t.ID) } case api.EventUpdateCluster: @@ -282,6 +282,8 @@ func (tr *TaskReaper) tick() { // Stop stops the TaskReaper and waits for the main loop to exit. func (tr *TaskReaper) Stop() { + // TODO(dperny) calling stop on the task reaper twice will cause a panic + // because we try to close a channel that will already have been closed. close(tr.stopChan) <-tr.doneChan }