mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Vendor docker/swarmkit to 713d79d
Revendor swarmkit to 713d79dc8799b33465c58ed120b870c52eb5eb4f to include https://github.com/docker/swarmkit/pull/2473. Signed-off-by: Marcus Martins <marcus@docker.com>
This commit is contained in:
parent
c3a9f5d00f
commit
af73d31e60
2 changed files with 7 additions and 5 deletions
|
@ -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
|
||||
|
|
10
vendor/github.com/docker/swarmkit/manager/orchestrator/taskreaper/task_reaper.go
generated
vendored
10
vendor/github.com/docker/swarmkit/manager/orchestrator/taskreaper/task_reaper.go
generated
vendored
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue