Remove keystone constraints and add the openstack-core dummy resource in its place

Bug #1537885 reported by Adam Young
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tripleo
Fix Released
Undecided
Michele Baldessari

Bug Description

there's no need anymore to have each service dependent from keystone. This means we can safely remove it, and replace it by adding a new resource named openstack-core (cloned) to take its place.

This change will make it much simpler to replace Keystone running in eventlet with HTTPD, as there will now be no need to stop/restart other systems when making changes to Keystone.

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.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tripleo-heat-templates (master)

Fix proposed to branch: master
Review: https://review.openstack.org/286446

Changed in tripleo:
assignee: nobody → Michele Baldessari (michele)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tripleo-heat-templates (master)

Reviewed: https://review.openstack.org/286446
Committed: https://git.openstack.org/cgit/openstack/tripleo-heat-templates/commit/?id=c5049d8ffbf9579a6e726c0031411ddb57e1a625
Submitter: Jenkins
Branch: master

commit c5049d8ffbf9579a6e726c0031411ddb57e1a625
Author: Michele Baldessari <email address hidden>
Date: Fri Feb 26 07:41:42 2016 +0000

    Move ordering constraints from httpd to openstack-core

    With the move of keystone under wsgi and httpd, all openstack services received an
    ordering constraint on the 'httpd' service (which now exposes keystone and horizon).

    Since this is not only a layering violation, but it also removes the ability to
    restart keystone (httpd) without having to restart all dependent services, we introduce
    a dummy 'openstack-core' service which all other services depend on and we make also
    keystone (httpd) depend on it.

    The previous constraint ordering graph can be found here:
    http://acksyn.org/files/tripleo/wsgi-2016-02-24-cib.pdf

    Whereas after this change we have the following ordering graph:
    http://acksyn.org/files/tripleo/wsgi-openstack-core.pdf

    Once this is agreed upon, we can start working on fixing the upgrade path
    from Liberty.

    This fixes RHBZ#1290121

    Closes bug: 1537885

    Change-Id: Ie26908ac9bfc0b84b6b65ae3bda711236b03d9d4

Changed in tripleo:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.