From d9f13a0bbc52b58eadc9608b6cfa7d4510d33be1 Mon Sep 17 00:00:00 2001 From: Konstantin Suvorov Date: Tue, 9 Feb 2016 15:34:30 +0300 Subject: [PATCH] Fix docker container restart restart_containers(containers.running) may try to restart containers that are deleted when looping through get_differing_containers() fix this by refreshing list after first loop --- cloud/docker/docker.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cloud/docker/docker.py b/cloud/docker/docker.py index bda75f35e06..aae58f78cdf 100644 --- a/cloud/docker/docker.py +++ b/cloud/docker/docker.py @@ -1729,6 +1729,8 @@ def restarted(manager, containers, count, name): manager.stop_containers([container]) manager.remove_containers([container]) + containers.refresh() + manager.restart_containers(containers.running) started(manager, containers, count, name)