diff options
author | James Slagle <jslagle@redhat.com> | 2015-11-11 15:46:52 -0500 |
---|---|---|
committer | James Slagle <jslagle@redhat.com> | 2015-11-11 15:56:16 -0500 |
commit | bfb698e82becf7f53c670618365311029b4f73b8 (patch) | |
tree | de89903efbcfd7a4b4e10519d4f34855e717be48 | |
parent | 1b22aed7054ca08e93d870bdc6103c36f97c4b17 (diff) |
Add missing constraints in yum_update.sh
Some missing pacemaker constraints were added in the following commits:
https://review.openstack.org/#/c/219770/
https://review.openstack.org/#/c/219665/
https://review.openstack.org/#/c/218931/
https://review.openstack.org/#/c/218930/
Overclouds that were deployed prior to these constraints being added to
tripleo-heat-templates still have the constraints missing. During an
update, stopping and starting the cluster can fail without these
constraints in place. As a workaround, conditionally add these
contraints in yum_update.sh so that we're sure they're always present
before updating.
Change-Id: Id46c85dbbe5e85d362279661091b17ce1b697fe0
-rwxr-xr-x | extraconfig/tasks/yum_update.sh | 30 |
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 |