Преглед на файлове

Merge pull request #9520 from vrutkovs/upgrade-node-ready-conditions

'Wait for node to be ready' task should check that all vars are defined
Scott Dodson преди 6 години
родител
ревизия
ddaae1b4d3
променени са 1 файла, в които са добавени 4 реда и са изтрити 1 реда
  1. 4 1
      roles/openshift_node/tasks/upgrade.yml

+ 4 - 1
roles/openshift_node/tasks/upgrade.yml

@@ -74,8 +74,11 @@
   until:
   until:
   - node_output.results is defined
   - node_output.results is defined
   - node_output.results.returncode is defined
   - node_output.results.returncode is defined
-  - node_output.results.results is defined
   - node_output.results.returncode == 0
   - 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
   - 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.
   # Give the node three minutes to come back online.
   retries: 36
   retries: 36