summaryrefslogtreecommitdiffstats
path: root/roles/openshift_health_checker
diff options
context:
space:
mode:
authorKenjiro Nakayama <nakayamakenjiro@gmail.com>2017-09-05 14:05:39 +0900
committerKenjiro Nakayama <nakayamakenjiro@gmail.com>2017-09-05 17:32:42 +0900
commit6e9523431f2dcbc4ea69afbfa1a1f6a4aa65bcef (patch)
treeef9a4fe2fdaab7c306b0ec454a5014d100ccca42 /roles/openshift_health_checker
parent91a2cac8f5a5ae438b034e3712525480ce749fa6 (diff)
downloadopenshift-6e9523431f2dcbc4ea69afbfa1a1f6a4aa65bcef.tar.gz
openshift-6e9523431f2dcbc4ea69afbfa1a1f6a4aa65bcef.tar.bz2
openshift-6e9523431f2dcbc4ea69afbfa1a1f6a4aa65bcef.tar.xz
openshift-6e9523431f2dcbc4ea69afbfa1a1f6a4aa65bcef.zip
output skopeo image check command
Diffstat (limited to 'roles/openshift_health_checker')
-rw-r--r--roles/openshift_health_checker/openshift_checks/docker_image_availability.py10
1 files changed, 6 insertions, 4 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 857a80c74..866c74d7c 100644
--- a/roles/openshift_health_checker/openshift_checks/docker_image_availability.py
+++ b/roles/openshift_health_checker/openshift_checks/docker_image_availability.py
@@ -32,6 +32,7 @@ class DockerImageAvailability(DockerHostMixin, OpenShiftCheck):
# we use python-docker-py to check local docker for images, and skopeo
# to look for images available remotely without waiting to pull them.
dependencies = ["python-docker-py", "skopeo"]
+ skopeo_img_check_command = "timeout 10 skopeo inspect --tls-verify=false"
def is_active(self):
"""Skip hosts with unsupported deployment types."""
@@ -67,8 +68,10 @@ class DockerImageAvailability(DockerHostMixin, OpenShiftCheck):
"failed": True,
"msg": (
"One or more required Docker images are not available:\n {}\n"
- "Configured registries: {}"
- ).format(",\n ".join(sorted(unavailable_images)), ", ".join(registries)),
+ "Configured registries: {}\n"
+ "Checked by: {}"
+ ).format(",\n ".join(sorted(unavailable_images)), ", ".join(registries),
+ self.skopeo_img_check_command),
}
return {}
@@ -169,8 +172,7 @@ class DockerImageAvailability(DockerHostMixin, OpenShiftCheck):
for registry in registries:
args = {
- "_raw_params": "timeout 10 skopeo inspect --tls-verify=false "
- "docker://{}/{}".format(registry, image)
+ "_raw_params": self.skopeo_img_check_command + " docker://{}/{}".format(registry, image)
}
result = self.execute_module("command", args)
if result.get("rc", 0) == 0 and not result.get("failed"):