aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2016-04-13 11:37:37 +0000
committerGerrit Code Review <review@openstack.org>2016-04-13 11:37:37 +0000
commit0aeaa20c557a24ba946fea7a4b64c5bae1e9c8a5 (patch)
treee217a373f779c9b13626fa8b914dce96b19f4937
parent3a35abe4a1c64f1a3a35ba1370060228f7e8be1a (diff)
parent9575417b15a7d7568e0c090838b10a7280287bec (diff)
downloadkolla-0aeaa20c557a24ba946fea7a4b64c5bae1e9c8a5.tar.gz
kolla-0aeaa20c557a24ba946fea7a4b64c5bae1e9c8a5.zip
Merge "Fix the upgrade issue when image id is the same"
-rw-r--r--ansible/library/kolla_docker.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/ansible/library/kolla_docker.py b/ansible/library/kolla_docker.py
index 844bb633e..37b645088 100644
--- a/ansible/library/kolla_docker.py
+++ b/ansible/library/kolla_docker.py
@@ -288,6 +288,7 @@ class DockerWorker(object):
def compare_image(self, container_info=None):
container_info = container_info or self.get_container_info()
+ parse_repository_tag = docker.utils.parse_repository_tag
if not container_info:
return True
new_image = self.check_image()
@@ -296,6 +297,11 @@ class DockerWorker(object):
return True
if new_image['Id'] != current_image:
return True
+ # NOTE(Jeffrey4l) when new image and the current image have
+ # the same id, but the tag name different.
+ elif (parse_repository_tag(container_info['Config']['Image']) !=
+ parse_repository_tag(self.params.get('image'))):
+ return True
def compare_labels(self, container_info):
new_labels = self.params.get('labels')