Merge "Fix introspection with retries edge case"
This commit is contained in:
commit
de897ff61e
|
@ -164,13 +164,19 @@ introspect()
|
|||
sleep 30s
|
||||
done
|
||||
|
||||
manageable_count=1
|
||||
on_count=0
|
||||
while [ $on_count -eq 0 ] && [ $manageable_count -gt 0 ]; do
|
||||
manageable_count=$(ironic --json node-list | jq -r '.[]| select(.["provision_state"] == "manageable")| .["uuid"]' | wc -l)
|
||||
on_count=$(ironic --json node-list|jq -r '.[]| select(.["power_state"] == "power on")| .["uuid"]' | wc -l)
|
||||
sleep 30
|
||||
done
|
||||
|
||||
set +e
|
||||
timeout $1 bash -c -- 'source $HOME/stackrc; \
|
||||
node_count=$(ironic --json node-list|jq -r ".| length") ; \
|
||||
on_count=$(ironic --json node-list|jq -r ".[]| select(.[\"power_state\"] == \"power on\")| .[\"uuid\"]" | wc -l) ; \
|
||||
while [ $node_count != $on_count ] && [ $on_count -gt 0 ]; do \
|
||||
while [ $on_count -gt 0 ]; do \
|
||||
sleep 30s; \
|
||||
node_count=$(ironic --json node-list|jq -r ".| length") ; \
|
||||
on_count=$(ironic --json node-list|jq -r ".[]| select(.[\"power_state\"] == \"power on\")| .[\"uuid\"]" | wc -l) ; \
|
||||
done'
|
||||
set -e
|
||||
|
|
Loading…
Reference in New Issue