Browse Source

Merge pull request #7339 from nak3/add-max-time

Add max-time option to curl to avoid long running ansible
OpenShift Merge Robot 7 years ago
parent
commit
0f6e0eccdd

+ 1 - 1
playbooks/openshift-master/private/scaleup.yml

@@ -21,7 +21,7 @@
     notify: verify api server
   - name: verify api server
     command: >
-      curl --silent --tlsv1.2
+      curl --silent --tlsv1.2 --max-time 2
       --cacert {{ openshift.common.config_base }}/master/ca-bundle.crt
       {{ openshift.master.api_url }}/healthz/ready
     args:

+ 1 - 1
roles/openshift_control_plane/handlers/main.yml

@@ -13,7 +13,7 @@
   # Using curl here since the uri module requires python-httplib2 and
   # wait_for port doesn't provide health information.
   command: >
-    curl --silent --tlsv1.2
+    curl --silent --tlsv1.2 --max-time 2
     --cacert {{ openshift.common.config_base }}/master/ca-bundle.crt
     {{ openshift.master.api_url }}/healthz/ready
   args:

+ 1 - 1
roles/openshift_control_plane/tasks/check_master_api_is_ready.yml

@@ -3,7 +3,7 @@
   # Using curl here since the uri module requires python-httplib2 and
   # wait_for port doesn't provide health information.
   command: >
-    curl --silent --tlsv1.2
+    curl --silent --tlsv1.2 --max-time 2
     --cacert {{ openshift.common.config_base }}/master/ca-bundle.crt
     {{ openshift.master.api_url }}/healthz/ready
   register: l_api_available_output

+ 1 - 1
roles/openshift_logging/handlers/main.yml

@@ -11,7 +11,7 @@
   # Using curl here since the uri module requires python-httplib2 and
   # wait_for port doesn't provide health information.
   command: >
-    curl --silent --tlsv1.2
+    curl --silent --tlsv1.2 --max-time 2
     --cacert {{ openshift.common.config_base }}/master/ca-bundle.crt
     {{ openshift.master.api_url }}/healthz/ready
   args:

+ 1 - 1
roles/openshift_manage_node/tasks/main.yml

@@ -6,7 +6,7 @@
   # Using curl here since the uri module requires python-httplib2 and
   # wait_for port doesn't provide health information.
   command: >
-    curl --silent --tlsv1.2
+    curl --silent --tlsv1.2 --max-time 2
     --cacert {{ openshift.common.config_base }}/master/ca-bundle.crt
     {{ openshift_node_master_api_url }}/healthz/ready
   args:

+ 1 - 1
roles/openshift_metrics/handlers/main.yml

@@ -11,7 +11,7 @@
   # Using curl here since the uri module requires python-httplib2 and
   # wait_for port doesn't provide health information.
   command: >
-    curl --silent --tlsv1.2
+    curl --silent --tlsv1.2 --max-time 2
     --cacert {{ openshift.common.config_base }}/master/ca-bundle.crt
     {{ openshift.master.api_url }}/healthz/ready
   args:

+ 2 - 1
roles/openshift_node/tasks/config.yml

@@ -54,7 +54,8 @@
       # Using curl here since the uri module requires python-httplib2 and
       # wait_for port doesn't provide health information.
       command: >
-        curl --silent --tlsv1.2 --cacert {{ openshift.common.config_base }}/node/ca.crt
+        curl --silent --tlsv1.2 --max-time 2
+        --cacert {{ openshift.common.config_base }}/node/ca.crt
         {{ openshift_node_master_api_url }}/healthz/ready
       args:
         # Disables the following warning: