mirror of
https://github.com/docker/docs.git
synced 2026-11-05 00:14:17 +03:00
Merge pull request #1701 from vieux/reschedule_swarm_only
remove duplicate container only from swarm
This commit is contained in:
@@ -38,6 +38,10 @@ func (w *Watchdog) removeDuplicateContainers(e *Engine) {
|
||||
defer w.Unlock()
|
||||
|
||||
for _, container := range e.Containers() {
|
||||
// skip non-swarm containers
|
||||
if container.Config.SwarmID() == "" {
|
||||
continue
|
||||
}
|
||||
|
||||
for _, containerInCluster := range w.cluster.Containers() {
|
||||
if containerInCluster.Config.SwarmID() == container.Config.SwarmID() && containerInCluster.Engine.ID != container.Engine.ID {
|
||||
|
||||
Reference in New Issue
Block a user