Fixup neutron constraints in older overclouds before updating
authormarios <marios@redhat.com>
Mon, 23 Nov 2015 08:24:00 +0000 (10:24 +0200)
committermarios <marios@redhat.com>
Mon, 23 Nov 2015 13:06:49 +0000 (15:06 +0200)
The neutron pcs constraints were reworked in
https://review.openstack.org/#/c/229466/

For overclouds deployed with older tripleo-heat-templates the
current pcs ordering constraints will not have those changes,
meaning that the behaviour discussed at
https://bugs.launchpad.net/tripleo/+bug/1501378 is likely
given we will stop and restart all services. This review
applies those, in short, remove the ovs-cleanup after
neutron-server and add openvswitch-agent instead. Detail in
the bug report and linked BZ.

Change-Id: I45822c5fe9029f11635400b7fbd386880ac80a4e
Related-Bug: 1501378

extraconfig/tasks/yum_update.sh

index 6ab2501..69ff554 100755 (executable)
@@ -74,6 +74,16 @@ if [[ "$pacemaker_status" == "active" ]] ; then
         pcs -f $pacemaker_dumpfile constraint order promote redis-master then start openstack-ceilometer-central-clone require-all=false
     fi
 
+    # ensure neutron constraints https://review.openstack.org/#/c/229466
+    # remove ovs-cleanup after server and add openvswitch-agent instead
+    if  pcs constraint order show  | grep "start neutron-server-clone then start neutron-ovs-cleanup-clone"; then
+        pcs -f $pacemaker_dumpfile constraint remove order-neutron-server-clone-neutron-ovs-cleanup-clone-mandatory
+    fi
+    if ! pcs constraint order show | grep "start neutron-server-clone then start neutron-openvswitch-agent-clone"; then
+        pcs -f $pacemaker_dumpfile constraint order start neutron-server-clone then neutron-openvswitch-agent-clone
+    fi
+
+
     if ! pcs resource defaults | grep "resource-stickiness: INFINITY"; then
         pcs -f $pacemaker_dumpfile resource defaults resource-stickiness=INFINITY
     fi