Merge "Fix the upgrade issue when image id is the same"
This commit is contained in:
commit
0aeaa20c55
@ -288,6 +288,7 @@ class DockerWorker(object):
|
|||||||
|
|
||||||
def compare_image(self, container_info=None):
|
def compare_image(self, container_info=None):
|
||||||
container_info = container_info or self.get_container_info()
|
container_info = container_info or self.get_container_info()
|
||||||
|
parse_repository_tag = docker.utils.parse_repository_tag
|
||||||
if not container_info:
|
if not container_info:
|
||||||
return True
|
return True
|
||||||
new_image = self.check_image()
|
new_image = self.check_image()
|
||||||
@ -296,6 +297,11 @@ class DockerWorker(object):
|
|||||||
return True
|
return True
|
||||||
if new_image['Id'] != current_image:
|
if new_image['Id'] != current_image:
|
||||||
return True
|
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):
|
def compare_labels(self, container_info):
|
||||||
new_labels = self.params.get('labels')
|
new_labels = self.params.get('labels')
|
||||||
|
Loading…
Reference in New Issue
Block a user