aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2015-11-16 09:47:55 +0000
committerGerrit Code Review <review@openstack.org>2015-11-16 09:47:55 +0000
commitdc9c328cdcdb00b9dfe214c42985e62809aa15da (patch)
tree0cc84bd06185cfbb1fc069e5199055adc9a07c5f
parentf9932c55cf47525d8e22856d377ee4b5683c091b (diff)
parentbfb698e82becf7f53c670618365311029b4f73b8 (diff)
Merge "Add missing constraints in yum_update.sh"
-rwxr-xr-xextraconfig/tasks/yum_update.sh30
1 files changed, 30 insertions, 0 deletions
diff --git a/extraconfig/tasks/yum_update.sh b/extraconfig/tasks/yum_update.sh
index 9125ca07..06c301e1 100755
--- a/extraconfig/tasks/yum_update.sh
+++ b/extraconfig/tasks/yum_update.sh
@@ -43,6 +43,36 @@ fi
pacemaker_status=$(systemctl is-active pacemaker)
if [[ "$pacemaker_status" == "active" ]] ; then
+ echo "Checking for and adding missing constraints"
+
+ if ! pcs constraint order show | grep "start openstack-nova-novncproxy-clone then start openstack-nova-api-clone"; then
+ pcs constraint order start openstack-nova-novncproxy-clone then openstack-nova-api-clone
+ fi
+
+ if ! pcs constraint order show | grep "start rabbitmq-clone then start openstack-keystone-clone"; then
+ pcs constraint order start rabbitmq-clone then openstack-keystone-clone
+ fi
+
+ if ! pcs constraint order show | grep "promote galera-master then start openstack-keystone-clone"; then
+ pcs constraint order promote galera-master then openstack-keystone-clone
+ fi
+
+ if ! pcs constraint order show | grep "start haproxy-clone then start openstack-keystone-clone"; then
+ pcs constraint order start haproxy-clone then openstack-keystone-clone
+ fi
+
+ if ! pcs constraint order show | grep "start memcached-clone then start openstack-keystone-clone"; then
+ pcs constraint order start memcached-clone then openstack-keystone-clone
+ fi
+
+ if ! pcs constraint order show | grep "promote redis-master then start openstack-ceilometer-central-clone"; then
+ pcs constraint order promote redis-master then start openstack-ceilometer-central-clone require-all=false
+ fi
+
+ if ! pcs resource defaults | grep "resource-stickiness: INFINITY"; then
+ pcs resource defaults resource-stickiness=INFINITY
+ fi
+
echo "Pacemaker running, stopping cluster node and doing full package update"
node_count=$(pcs status xml | grep -o "<nodes_configured.*/>" | grep -o 'number="[0-9]*"' | grep -o "[0-9]*")
if [[ "$node_count" == "1" ]] ; then