aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Polenchuk <mpolenchuk@mirantis.com>2018-01-15 19:04:56 +0400
committerMichael Polenchuk <mpolenchuk@mirantis.com>2018-01-15 19:19:43 +0400
commit97b36af156a059cf2568b046cf5d0871562348ff (patch)
treee78407338ac5a19dcc2aa7a58a9d6b4d93eb39b1
parent1ea49591080442d8db86fff60031d3dc41142274 (diff)
Setup mongodb master primarily
Initiate mongodb master at first to avoid race conditaion with unwanted master election which causes cluster setup failure. Change-Id: I6d2f75f3f002849cac3a5f52a7dcfb4646b7822a Signed-off-by: Michael Polenchuk <mpolenchuk@mirantis.com>
-rwxr-xr-xmcp/config/states/openstack_ha6
-rwxr-xr-xmcp/config/states/openstack_noha2
2 files changed, 4 insertions, 4 deletions
diff --git a/mcp/config/states/openstack_ha b/mcp/config/states/openstack_ha
index 9219b3276..4948a504d 100755
--- a/mcp/config/states/openstack_ha
+++ b/mcp/config/states/openstack_ha
@@ -53,10 +53,10 @@ salt -I 'neutron:gateway' state.sls neutron.gateway
salt -I 'nova:compute' state.sls nova
-salt -I 'mongodb:server' state.sls mongodb || true
-wait_for 90 "salt -C 'I@mongodb:server and *01*' cmd.run 'mongo localhost:27017/admin'"
+salt -C 'I@mongodb:server and *01*' state.sls mongodb || true
+wait_for 10 "salt -C 'I@mongodb:server and *01*' cmd.run 'mongo localhost:27017/admin'"
salt -C 'I@mongodb:server and *01*' cmd.run 'mongo localhost:27017/admin --eval "rs.initiate()"'
-salt -C 'I@mongodb:server and *01*' state.sls mongodb
+salt -I 'mongodb:server' state.sls mongodb
salt -I 'aodh:server' state.sls aodh -b 1
salt -I 'ceilometer:server' state.sls ceilometer
diff --git a/mcp/config/states/openstack_noha b/mcp/config/states/openstack_noha
index 81a546266..bcb780738 100755
--- a/mcp/config/states/openstack_noha
+++ b/mcp/config/states/openstack_noha
@@ -45,7 +45,7 @@ salt -I 'neutron:server' state.sls neutron
salt -I 'nova:compute' state.sls nova
-salt -I 'mongodb:server' state.sls mongodb || salt -I 'mongodb:server' state.sls mongodb
+wait_for 3 "salt -I 'mongodb:server' state.sls mongodb"
salt -I 'aodh:server' state.sls aodh
salt -I 'ceilometer:server' state.sls ceilometer
salt -I 'ceilometer:agent' state.sls ceilometer