aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Polenchuk <mpolenchuk@mirantis.com>2017-08-21 17:12:29 +0400
committerMichael Polenchuk <mpolenchuk@mirantis.com>2017-08-21 17:12:29 +0400
commit690b6bec5695a0d170f47c77244e117fc3d09713 (patch)
tree6409a0c9b8ba5dd225586a24877c234cea69459e
parent32e52fd813e4ae3f13a6a407527a3b8434dd5164 (diff)
Check out all vcp nodes are available
Change-Id: I86bb27b323152440e8a885dbf867da433a288dae Signed-off-by: Michael Polenchuk <mpolenchuk@mirantis.com>
-rwxr-xr-xmcp/config/states/maas11
1 files changed, 11 insertions, 0 deletions
diff --git a/mcp/config/states/maas b/mcp/config/states/maas
index acee8c0a8..0c016170c 100755
--- a/mcp/config/states/maas
+++ b/mcp/config/states/maas
@@ -53,6 +53,17 @@ salt -C 'kvm*' state.sls libvirt
salt -C '* and not cfg01* and not mas01*' state.apply salt
salt -C 'kvm*' state.sls salt.control
+vcp_nodes=$(salt --out yaml 'kvm01*' pillar.get salt:control:cluster:internal:node | awk '/\s+\w+:$/ {gsub(/:$/, "*"); print $1}')
+
+# Check all vcp nodes are available
+rc=1
+while [ $rc -ne 0 ]; do
+ rc=0
+ for node in $vcp_nodes; do
+ salt "$node" test.ping 2>/dev/null 1>&2 || { rc=$?; break; };
+ done
+done
+
salt -C '* and not cfg01* and not mas01*' saltutil.sync_all
salt -C '* and not cfg01* and not mas01*' state.apply salt
salt -C '* and not cfg01* and not mas01*' state.apply linux,ntp