Procházet zdrojové kódy

Merge pull request #9562 from vrutkovs/node-restart-status-check

node restart: check that all vars are defined
OpenShift Merge Robot před 6 roky
rodič
revize
8cab8f9674
1 změnil soubory, kde provedl 4 přidání a 1 odebrání
  1. 4 1
      playbooks/openshift-node/private/restart.yml

+ 4 - 1
playbooks/openshift-node/private/restart.yml

@@ -43,8 +43,11 @@
     until:
     - node_output.results is defined
     - node_output.results.returncode is defined
-    - node_output.results.results is defined
     - node_output.results.returncode == 0
+    - node_output.results.results is defined
+    - node_output.results.results | length > 0
+    - node_output.results.results[0].status is defined
+    - node_output.results.results[0].status.conditions is defined
     - node_output.results.results[0].status.conditions | selectattr('type', 'match', '^Ready$') | map(attribute='status') | join | bool == True
     # Give the node three minutes to come back online.
     retries: 36