summaryrefslogtreecommitdiffstats
path: root/mcp
diff options
context:
space:
mode:
authorAlexandru Avadanii <Alexandru.Avadanii@enea.com>2018-12-07 15:57:13 +0100
committerAlexandru Avadanii <Alexandru.Avadanii@enea.com>2018-12-10 13:44:01 +0000
commit421b86ca2e599bbed27f61933878e7849c9c7a11 (patch)
treeafa4b977bbe58f17c71c5c510f6a33370f83b385 /mcp
parentfb7a82b9e6fe9d43deac2249ec1ec204e022887e (diff)
[ha] barbican, nova targeting: use server:role
Instead of matching the hostname to determine the primary barbican node, rely on pillar data. While at it, apply the same logic to nova:controller states. Change-Id: Ia4ac391927a8b4b223febff106b400e84d264f7a Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com> (cherry picked from commit a4d64c6ff23dd2957b34ebc303c16ee640d709e6)
Diffstat (limited to 'mcp')
-rwxr-xr-xmcp/config/states/openstack_ha7
1 files changed, 4 insertions, 3 deletions
diff --git a/mcp/config/states/openstack_ha b/mcp/config/states/openstack_ha
index 732c5710f..924dc30f1 100755
--- a/mcp/config/states/openstack_ha
+++ b/mcp/config/states/openstack_ha
@@ -42,7 +42,8 @@ wait_for 30.0 "salt -I 'keystone:client' state.sls keystone.client"
salt -I 'keystone:server' cmd.run ". /root/keystonercv3; openstack service list"
salt -I 'glance:server' state.sls glance -b 1
-salt -I 'nova:controller' state.sls nova -b 1
+salt -I 'nova:controller:role:primary' state.sls nova
+salt -I 'nova:controller:role:secondary' state.sls nova -b 1
salt -I 'heat:server' state.sls heat -b 1
wait_for 5.0 "salt -I 'cinder:controller' state.sls cinder -b 1"
@@ -61,8 +62,8 @@ if salt -I 'nova:compute' match.grain 'cpuarch:aarch64' \
salt -C 'G@cpuarch:aarch64 and I@nova:compute' state.sls armband
fi
-salt -C 'I@barbican:server and *01*' state.sls barbican
-salt -C 'I@barbican:server and not *01*' state.sls barbican -b 1
+salt -I 'barbican:server:role:primary' state.sls barbican
+salt -I 'barbican:server:role:secondary' state.sls barbican -b 1
salt -I 'barbican:client' state.sls barbican
salt -I 'redis:cluster:role:master' state.sls redis