From b9b727f435d359ed1ddc3f80851f4df263346f0e Mon Sep 17 00:00:00 2001 From: chouseknecht Date: Fri, 10 Jun 2016 22:34:38 -0400 Subject: [PATCH] Fix #16211 - only stop/kill running containers --- cloud/docker/docker_container.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cloud/docker/docker_container.py b/cloud/docker/docker_container.py index 7d6284906c5..e9afaa379c3 100644 --- a/cloud/docker/docker_container.py +++ b/cloud/docker/docker_container.py @@ -1616,7 +1616,8 @@ class ContainerManager(DockerBaseClass): self.diff['image_different'] = True self.log("differences") self.log(differences, pretty_print=True) - self.container_stop(container.Id) + if container.running: + self.container_stop(container.Id) self.container_remove(container.Id) new_container = self.container_create(self.parameters.image, self.parameters.create_parameters) if new_container: