aboutsummaryrefslogtreecommitdiffstats
path: root/mcp/config/states/maas
diff options
context:
space:
mode:
Diffstat (limited to 'mcp/config/states/maas')
-rwxr-xr-xmcp/config/states/maas6
1 files changed, 4 insertions, 2 deletions
diff --git a/mcp/config/states/maas b/mcp/config/states/maas
index e1ffa8733..de9d699b9 100755
--- a/mcp/config/states/maas
+++ b/mcp/config/states/maas
@@ -91,7 +91,8 @@ salt -C 'kvm*' state.sls libvirt
salt -C '* and not cfg01* and not mas01*' state.apply salt
salt -C 'kvm*' saltutil.sync_all
-salt -C 'kvm*' state.sls salt.control
+wait_for 10 "! salt -C 'kvm*' state.sls salt.control | " \
+ "tee /dev/stderr | fgrep -q 'Not connected'"
vcp_nodes=$(salt --out yaml 'kvm01*' pillar.get salt:control:cluster:internal:node | \
awk '/\s+\w+:$/ {gsub(/:$/, "*"); print $1}')
@@ -115,4 +116,5 @@ wait_for 10 "salt -C 'E@^(?!cfg01|mas01|kvm|cmp00).*' ssh.set_auth_key ${SUDO_US
$(awk 'NR==1{print $2}' "$(eval echo "~${SUDO_USER}/.ssh/authorized_keys")")"
# Get the latest packages
-salt '*' pkg.upgrade refresh=False
+wait_for 10 "! salt '*' pkg.upgrade refresh=False | " \
+ "tee /dev/stderr | fgrep -q 'Not connected'"