summaryrefslogtreecommitdiffstats
path: root/roles/openshift_health_checker
diff options
context:
space:
mode:
authorLuke Meyer <lmeyer@redhat.com>2017-08-25 16:27:15 -0400
committerLuke Meyer <lmeyer@redhat.com>2017-08-28 09:40:56 -0400
commitacf014f461a31de7d280d1e851d9a382f545d4c9 (patch)
tree20464987a40bed4a7667a2fa1951c86c79250cb5 /roles/openshift_health_checker
parentcc477558889b4a9e2595418c676a03e98cbfe20e (diff)
downloadopenshift-acf014f461a31de7d280d1e851d9a382f545d4c9.tar.gz
openshift-acf014f461a31de7d280d1e851d9a382f545d4c9.tar.bz2
openshift-acf014f461a31de7d280d1e851d9a382f545d4c9.tar.xz
openshift-acf014f461a31de7d280d1e851d9a382f545d4c9.zip
docker_image_availability: timeout skopeo inspect
Set a 10 second timeout when using skopeo to inspect remote registries, so that it does not wait for a tcp timeout to fail if they are unreachable.
Diffstat (limited to 'roles/openshift_health_checker')
-rw-r--r--roles/openshift_health_checker/openshift_checks/docker_image_availability.py5
1 files changed, 4 insertions, 1 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 85a922f86..857a80c74 100644
--- a/roles/openshift_health_checker/openshift_checks/docker_image_availability.py
+++ b/roles/openshift_health_checker/openshift_checks/docker_image_availability.py
@@ -168,7 +168,10 @@ class DockerImageAvailability(DockerHostMixin, OpenShiftCheck):
registries = [registry]
for registry in registries:
- args = {"_raw_params": "skopeo inspect --tls-verify=false docker://{}/{}".format(registry, image)}
+ args = {
+ "_raw_params": "timeout 10 skopeo inspect --tls-verify=false "
+ "docker://{}/{}".format(registry, image)
+ }
result = self.execute_module("command", args)
if result.get("rc", 0) == 0 and not result.get("failed"):
return True