summaryrefslogtreecommitdiffstats
path: root/roles/openshift_health_checker/openshift_checks/docker_image_availability.py
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2018-01-26 07:35:27 -0800
committerGitHub <noreply@github.com>2018-01-26 07:35:27 -0800
commit6e9a9c3e50446a1bd716272e4a47785ad8ecbf08 (patch)
treec10cd7214eb1624feb1e89e482e5d16e5dd05eb6 /roles/openshift_health_checker/openshift_checks/docker_image_availability.py
parenta24ccff0423ca25bfcb1a3d9f79470aae5948d66 (diff)
parent4d4a628c626f40e6f567d189c2f46f43cb516f0e (diff)
downloadopenshift-6e9a9c3e50446a1bd716272e4a47785ad8ecbf08.tar.gz
openshift-6e9a9c3e50446a1bd716272e4a47785ad8ecbf08.tar.bz2
openshift-6e9a9c3e50446a1bd716272e4a47785ad8ecbf08.tar.xz
openshift-6e9a9c3e50446a1bd716272e4a47785ad8ecbf08.zip
Merge pull request #6880 from sosiouxme/20180115-docker-image-locations
Automatic merge from submit-queue. docker_image_availability: containerized image overrides Fix https://bugzilla.redhat.com/show_bug.cgi?id=1538806 and related issues by handling the various containerized image variables.
Diffstat (limited to 'roles/openshift_health_checker/openshift_checks/docker_image_availability.py')
-rw-r--r--roles/openshift_health_checker/openshift_checks/docker_image_availability.py21
1 files changed, 13 insertions, 8 deletions
diff --git a/roles/openshift_health_checker/openshift_checks/docker_image_availability.py b/roles/openshift_health_checker/openshift_checks/docker_image_availability.py
index d298fbab2..145b82491 100644
--- a/roles/openshift_health_checker/openshift_checks/docker_image_availability.py
+++ b/roles/openshift_health_checker/openshift_checks/docker_image_availability.py
@@ -171,16 +171,21 @@ class DockerImageAvailability(DockerHostMixin, OpenShiftCheck):
required.add(self._registry_console_image(image_tag, image_info))
# images for containerized components
- if self.get_var("openshift_is_containerized"):
- components = set()
+ def add_var_or_default_img(var_name, comp_name):
+ """Returns: default image from comp_name, overridden by var_name in task_vars"""
+ default = "{}/{}:{}".format(image_info["namespace"], comp_name, image_tag)
+ required.add(self.template_var(self.get_var(var_name, default=default)))
+
+ if self.get_var("openshift_is_containerized", convert=bool):
if 'oo_nodes_to_config' in host_groups:
- components.update(["node", "openvswitch"])
+ add_var_or_default_img("osn_image", "node")
+ add_var_or_default_img("osn_ovs_image", "openvswitch")
if 'oo_masters_to_config' in host_groups: # name is "origin" or "ose"
- components.add(image_info["name"])
- for component in components:
- required.add("{}/{}:{}".format(image_info["namespace"], component, image_tag))
- if 'oo_etcd_to_config' in host_groups: # special case, note it is the same for origin/enterprise
- required.add("registry.access.redhat.com/rhel7/etcd") # and no image tag
+ add_var_or_default_img("osm_image", image_info["name"])
+ if 'oo_etcd_to_config' in host_groups:
+ # special case, note default is the same for origin/enterprise and has no image tag
+ etcd_img = self.get_var("osm_etcd_image", default="registry.access.redhat.com/rhel7/etcd")
+ required.add(self.template_var(etcd_img))
return required