summaryrefslogtreecommitdiffstats
path: root/roles/openshift_health_checker
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2017-09-28 11:17:25 -0700
committerGitHub <noreply@github.com>2017-09-28 11:17:25 -0700
commit099b032be0d5cc773a2e4fb16e428befdf16e536 (patch)
treeaf9bc31bf7d3dcd911cf2a5f306eee4c9ea216de /roles/openshift_health_checker
parente3d5519c6d68b9aa162a58e1a897b6e4f6b0eea1 (diff)
parent9d6e86c0217c97d33aecdcb47c35521a6ee91a29 (diff)
downloadopenshift-099b032be0d5cc773a2e4fb16e428befdf16e536.tar.gz
openshift-099b032be0d5cc773a2e4fb16e428befdf16e536.tar.bz2
openshift-099b032be0d5cc773a2e4fb16e428befdf16e536.tar.xz
openshift-099b032be0d5cc773a2e4fb16e428befdf16e536.zip
Merge pull request #5559 from mgugino-upstream-stage/readd-ent-registry
Automatic merge from submit-queue. Migrate enterprise registry logic to docker role Currently, the enterprise registry to forcefully added in openshift_facts. Recently, the docker role has been modified to consume registry variables directly, bypassing openshift_facts. This commit cleans up unused code in openshift_facts, and migrates enterprise registry logic to the docker role. Fixes: https://github.com/openshift/openshift-ansible/issues/5557
Diffstat (limited to 'roles/openshift_health_checker')
-rw-r--r--roles/openshift_health_checker/openshift_checks/docker_image_availability.py2
-rw-r--r--roles/openshift_health_checker/test/docker_image_availability_test.py10
2 files changed, 6 insertions, 6 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 98372d979..93a5973d4 100644
--- a/roles/openshift_health_checker/openshift_checks/docker_image_availability.py
+++ b/roles/openshift_health_checker/openshift_checks/docker_image_availability.py
@@ -153,7 +153,7 @@ class DockerImageAvailability(DockerHostMixin, OpenShiftCheck):
def known_docker_registries(self):
"""Build a list of docker registries available according to inventory vars."""
- regs = list(self.get_var("openshift.docker.additional_registries", default=[]))
+ regs = list(self.get_var("openshift_docker_additional_registries", default=[]))
deployment_type = self.get_var("openshift_deployment_type")
if deployment_type == "origin" and "docker.io" not in regs:
diff --git a/roles/openshift_health_checker/test/docker_image_availability_test.py b/roles/openshift_health_checker/test/docker_image_availability_test.py
index 952fa9aa6..c523ffd5c 100644
--- a/roles/openshift_health_checker/test/docker_image_availability_test.py
+++ b/roles/openshift_health_checker/test/docker_image_availability_test.py
@@ -72,7 +72,7 @@ def test_all_images_available_remotely(task_vars, available_locally):
return {'images': [], 'failed': available_locally}
return {}
- task_vars['openshift']['docker']['additional_registries'] = ["docker.io", "registry.access.redhat.com"]
+ task_vars['openshift_docker_additional_registries'] = ["docker.io", "registry.access.redhat.com"]
task_vars['openshift_image_tag'] = 'v3.4'
check = DockerImageAvailability(execute_module, task_vars)
check._module_retry_interval = 0
@@ -90,7 +90,7 @@ def test_all_images_unavailable(task_vars):
return {} # docker_image_facts failure
- task_vars['openshift']['docker']['additional_registries'] = ["docker.io"]
+ task_vars['openshift_docker_additional_registries'] = ["docker.io"]
task_vars['openshift_deployment_type'] = "openshift-enterprise"
task_vars['openshift_image_tag'] = 'latest'
check = DockerImageAvailability(execute_module, task_vars)
@@ -121,9 +121,9 @@ def test_no_known_registries():
service_type='origin',
is_containerized=False,
is_atomic=False,
- ),
- docker=dict(additional_registries=["docker.io"]),
+ )
),
+ openshift_docker_additional_registries=["docker.io"],
openshift_deployment_type="openshift-enterprise",
openshift_image_tag='latest',
group_names=['nodes', 'masters'],
@@ -154,7 +154,7 @@ def test_skopeo_update_failure(task_vars, message, extra_words):
return {}
- task_vars['openshift']['docker']['additional_registries'] = ["unknown.io"]
+ task_vars['openshift_docker_additional_registries'] = ["unknown.io"]
task_vars['openshift_deployment_type'] = "openshift-enterprise"
check = DockerImageAvailability(execute_module, task_vars)
check._module_retry_interval = 0