From 131aef7c2cfea9e2bbb0be86c5534bd4feebbfbc Mon Sep 17 00:00:00 2001 From: Michael Polenchuk Date: Tue, 22 Aug 2017 11:49:42 +0400 Subject: Shift vcp nodes interfaces * shift vcp nodes interfaces since names started from ens2 * add extra salt sync before vcp start up * run rabbitmq state on 1st node beforehand then the rest Change-Id: Ic2c174c288a5e89f2f28c0d9aa573340190a61d3 Signed-off-by: Michael Polenchuk --- mcp/config/states/maas | 4 +++- mcp/config/states/openstack_ha | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) (limited to 'mcp/config/states') diff --git a/mcp/config/states/maas b/mcp/config/states/maas index fa5e44659..52a9b7731 100755 --- a/mcp/config/states/maas +++ b/mcp/config/states/maas @@ -54,6 +54,7 @@ salt -C '* and not cfg01* and not mas01*' state.apply linux,ntp 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 vcp_nodes=$(salt --out yaml 'kvm01*' pillar.get salt:control:cluster:internal:node | awk '/\s+\w+:$/ {gsub(/:$/, "*"); print $1}') @@ -63,8 +64,9 @@ 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; }; + salt "$node" test.ping 2>/dev/null || { rc=$?; break; }; done + sleep 5 done salt -C '* and not cfg01* and not mas01*' saltutil.sync_all diff --git a/mcp/config/states/openstack_ha b/mcp/config/states/openstack_ha index 90e510ad2..4a39d5102 100755 --- a/mcp/config/states/openstack_ha +++ b/mcp/config/states/openstack_ha @@ -1,7 +1,8 @@ salt -I 'keepalived:cluster' state.sls keepalived -b 1 salt -I 'keepalived:cluster' pillar.get keepalived:cluster:instance:VIP:address -salt -I 'rabbitmq:server' state.sls rabbitmq # maybe twice +salt -C 'I@rabbitmq:server and *01*' state.sls rabbitmq +salt -I 'rabbitmq:server' state.sls rabbitmq salt -I 'rabbitmq:server' cmd.run "rabbitmqctl cluster_status" salt -I 'glusterfs:server' state.sls glusterfs.server.service -- cgit 1.2.3-korg