Comment 1 for bug 1537885

Revision history for this message
Adam Young (ayoung) wrote :

From a message By Fabio

It is possible to detach keystone as being at the core of openstack by
using something like this (clearly it would need to be properly
incorporated in puppet modules/etc):

# create new dummy core openstack service to replace keystone
# and allow to stop all of openstack in one command
pcs resource create openstack-core ocf:heartbeat:Dummy --clone

pcs cluster cib /tmp/foo.cib

# workaround systemd timers (bug is filed, was not fixed in this build)
for i in $(pcs -f /tmp/foo.cib config |grep systemd | awk '{print $2}'); do
  pcs -f /tmp/foo.cib resource update $i op status timeout=100s op stop
timeout=100s op start timeout=100s op monitor timeout=100s
done

# change all constraints from keystone to dummy
constr="$(pcs -f /tmp/foo.cib config |grep keystone |grep start |grep then)"
echo "$constr" | { while read i; do
 act=$(echo "$i" | awk '{print $1}')
 src=$(echo "$i" | awk '{print $2}')
 dst=$(echo "$i" | awk '{print $5}')
 cid=$(echo "$i" | awk '{print $7}' | sed -e 's/.*id\://g' -e 's/)//g')
 if [ "$src" = openstack-keystone-clone ]; then
        pcs -f /tmp/foo.cib constraint order $act openstack-core-clone
then $dst
 else
        pcs -f /tmp/foo.cib constraint order $act $src then
openstack-core-clone
 fi
 pcs -f /tmp/foo.cib constraint remove $cid
done; }

# make sure keystone and httpd are started after dummy
pcs -f /tmp/foo.cib constraint order start openstack-core-clone then
openstack-keystone-clone
pcs -f /tmp/foo.cib constraint order start openstack-core-clone then
httpd-clone

pcs cluster cib-push /tmp/foo.cib

----

and this solution works just fine as expected both for start and stop.