diff --git a/components/engine/vendor.conf b/components/engine/vendor.conf index 788b40772be..cf39a58ac8c 100644 --- a/components/engine/vendor.conf +++ b/components/engine/vendor.conf @@ -107,7 +107,7 @@ github.com/stevvooe/continuity cd7a8e21e2b6f84799f5dd4b65faf49c8d3ee02d github.com/tonistiigi/fsutil 0ac4c11b053b9c5c7c47558f81f96c7100ce50fb # cluster -github.com/docker/swarmkit 069d13ff72a214cdd7a06821299987b28ee2a627 +github.com/docker/swarmkit 87c2a23c2da1fca31abe6161bc908061fb06643e github.com/gogo/protobuf v0.4 github.com/cloudflare/cfssl 7fb22c8cba7ecaf98e4082d22d65800cf45e042a github.com/google/certificate-transparency d90e65c3a07988180c5b1ece71791c0b6506826e diff --git a/components/engine/vendor/github.com/docker/swarmkit/manager/manager.go b/components/engine/vendor/github.com/docker/swarmkit/manager/manager.go index 3fb0518b535..4462ccf243f 100644 --- a/components/engine/vendor/github.com/docker/swarmkit/manager/manager.go +++ b/components/engine/vendor/github.com/docker/swarmkit/manager/manager.go @@ -491,6 +491,10 @@ func (m *Manager) Run(parent context.Context) error { healthServer.SetServingStatus("Raft", api.HealthCheckResponse_NOT_SERVING) localHealthServer.SetServingStatus("ControlAPI", api.HealthCheckResponse_NOT_SERVING) + if err := m.watchServer.Start(ctx); err != nil { + log.G(ctx).WithError(err).Error("watch server failed to start") + } + go m.serveListener(ctx, m.remoteListener) go m.serveListener(ctx, m.controlListener) @@ -566,8 +570,8 @@ func (m *Manager) Run(parent context.Context) error { const stopTimeout = 8 * time.Second // Stop stops the manager. It immediately closes all open connections and -// active RPCs as well as stopping the scheduler. If clearData is set, the -// raft logs, snapshots, and keys will be erased. +// active RPCs as well as stopping the manager's subsystems. If clearData is +// set, the raft logs, snapshots, and keys will be erased. func (m *Manager) Stop(ctx context.Context, clearData bool) { log.G(ctx).Info("Stopping manager") // It's not safe to start shutting down while the manager is still @@ -601,6 +605,7 @@ func (m *Manager) Stop(ctx context.Context, clearData bool) { m.dispatcher.Stop() m.logbroker.Stop() + m.watchServer.Stop() m.caserver.Stop() if m.allocator != nil { @@ -1006,10 +1011,6 @@ func (m *Manager) becomeLeader(ctx context.Context) { log.G(ctx).WithError(err).Error("LogBroker failed to start") } - if err := m.watchServer.Start(ctx); err != nil { - log.G(ctx).WithError(err).Error("watch server failed to start") - } - go func(server *ca.Server) { if err := server.Run(ctx); err != nil { log.G(ctx).WithError(err).Error("CA signer exited with an error") @@ -1062,7 +1063,6 @@ func (m *Manager) becomeLeader(ctx context.Context) { func (m *Manager) becomeFollower() { m.dispatcher.Stop() m.logbroker.Stop() - m.watchServer.Stop() m.caserver.Stop() if m.allocator != nil {