[openstack-dev] [TripleO] puppet pacemaker thoughts... and an idea

Dan Prince dprince at redhat.com
Thu May 7 17:12:11 UTC 2015


On Thu, 2015-05-07 at 10:42 -0400, Emilien Macchi wrote:
> 
> On 05/06/2015 10:32 PM, Dan Prince wrote:
> (...)
> > 
> > I think this split is a good compromise and would probably even speed up
> > the implementation of the remaining pacemaker features too. And removing
> > all the pacemaker conditionals we have from the non-pacemaker version
> > puts us back in a reasonably clean state I think.
> > 
> 
> I don't really like having a "fork" of the controller code, which could
> become pain to maintain. (ie: each new feature on controllers has to be
> coded in both manifests).

I wouldn't say the fork is ideal. But I do like it better than having
one big unreadable manifest. Keep in mind the Heat templates for both
implementations are mostly shared... so I think it is a reasonable
compromise to keep the code cleaner than it is with inline conditionals
for all pacemaker services.

This wasn't something that was planned... rather it just evolved. And
now actually seeing the pacemaker stuff I'd like to isolate it entirely
from the non-pacemaker implementation. If down the road we get a wrapper
and can cleanly de-duplicate some things then so be it.


> 
> I really prefer having parameters & Hiera in the party to enable or not
> Pacemaker.
> 
> FWIW, here is how we did in SpinalStack:
> 
> 1) Install Pacemaker / Corosync:
> https://github.com/stackforge/puppet-openstack-cloud/blob/master/manifests/clustering.pp
> 
> 2) Create a wrapper to manage resources:
> https://github.com/stackforge/puppet-openstack-cloud/blob/master/manifests/clustering/pacemaker_service.pp
> (that use collocation and order wrappers too)
> 
> 3) Example for Nova API: disable Pacemaker by default:
> https://github.com/stackforge/puppet-openstack-cloud/blob/master/manifests/compute/api.pp#L74
> 
> 4) Since puppet-openstack_extras manage the service in the catalog with
> Pacemaker, the code is the same for Pacemaker / non-pacemaker usage:
> https://github.com/stackforge/puppet-openstack-cloud/blob/master/manifests/compute/api.pp#L81-L90
> 
> 5) If pacemaker is enabled (yes, we have a condition...): we enable the
> resource:
> https://github.com/stackforge/puppet-openstack-cloud/blob/master/manifests/compute/api.pp#L81-L90
> 
> 
> The pacemaker wrapper is
> https://github.com/stackforge/puppet-openstack_extras/blob/master/manifests/pacemaker/service.pp
> so 100% upstream.
> We are using puppetlabs-corosync and not puppet-pacemaker so the code is
> much cleaner and Puppetish (providers, etc).
> The code is really lightweight in the composition layer and flexible to
> add more options easily.
> 
> We are using puppet-pacemaker now, so we can't (now at least) use
> openstack_extras wrapper, but still we can take this approach in
> consideration.

Right. I think this is the rub. puppet-pacemaker doesn't support the
wrapper. And for whatever reason we have choosen to use it instead of
the corosync based version. This is why we've ended up where we are at
today.

> __________________________________________________________________________
> OpenStack Development Mailing List (not for usage questions)
> Unsubscribe: OpenStack-dev-request at lists.openstack.org?subject:unsubscribe
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev





More information about the OpenStack-dev mailing list