diff options
Diffstat (limited to 'mcp/config')
-rwxr-xr-x | mcp/config/states/maas | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/mcp/config/states/maas b/mcp/config/states/maas index f472c0154..2062cbabb 100755 --- a/mcp/config/states/maas +++ b/mcp/config/states/maas @@ -19,7 +19,9 @@ function maas_fixup() { local statuscmd="salt 'mas01*' --out yaml state.apply maas.machines.status" local ncount=$(salt --out yaml 'mas01*' pillar.get maas:region:machines | \ grep -cE '^\s{2}\w+:$') - wait_for 30 "${statuscmd} | tee /dev/stderr | " \ + + # wait_for has 10sec timeout * 96 = 16 min > 15min for Failed state + wait_for 96 "${statuscmd} | tee /dev/stderr | " \ "grep -Eq '((Deployed|Ready): ${ncount}|status: (Failed|Allocated))'" local statusout=$(eval "${statuscmd}") @@ -72,13 +74,15 @@ salt -C 'mas01*' state.apply maas.cluster wait_for 10 "salt -C 'mas01*' state.apply maas.region" salt -C 'mas01*' state.apply maas.machines -# MaaS node deployment -wait_for 20 maas_fixup # cleanup outdated salt keys +sleep 30 salt-key --out yaml | awk '!/^(minions|- cfg01|- mas01)/ {print $2}' | \ xargs -I{} salt-key -yd {} +# MaaS node deployment +wait_for 10 maas_fixup + salt -C 'mas01*' pillar.item\ maas:region:admin:username \ maas:region:admin:password |