[OpenStack-Infra] Using ensure=>running by default in Puppet modules

Paul Belanger pabelanger at redhat.com
Thu Aug 13 15:52:53 UTC 2015


On Wed, Aug 12, 2015 at 09:15:37PM +0000, Jeremy Stanley wrote:
> Change https://review.openstack.org/168306 for puppet-zuul came to
> my attention earlier today when it merged. After a quick discussion
> on IRC, Spencer proposed a revert which I approved so that we can
> get a little more discussion going about this topic.
> 
> First, I'm really sorry I didn't see and weigh in on it sooner (it's
> not like I didn't have time, it was ~4.5 months old). Second, we've
> grown lots of new core reviewers and I'm thrilled they're reviewing
> and approving changes, and I don't want to discourage that in any
> way, so thank you to those of you who did review that change.
> 
> In the past, not using ensure=>running on services in our Puppet
> modules was intentional, particularly for more stateful services,
> especially for services which trigger other (possibly remote)
> actions and have a potential to make a mess. It's pretty likely that
> those of us who were around for the earlier discussions about it
> failed to write it down anywhere obvious, leading others to assume
> it's a bug/oversight. I see a couple of obvious solutions though
> there are no doubt others:
> 
> 1. Document in each module where we do this, at least in the readme
> and probably also in an inline comment around the service
> definition, that it's that way on purpose. Optionally, make the
> ensure conditional on a class parameter that defaults to unmanaged
> in case some downstreams want to use Puppet like a service manager.
> 
> 2. Similar managed/unmanaged parameter, but make it default to
> running and override the default to unmanaged in our
> ::openstack_project classes. This means that we cease consuming our
> modules with the same defaults as downstream users, however if it
> turns out that our OpenStack Infra root sysadmins really do have a
> very different preference from the majority of our downstream
> consumers then at least we can be clear about that.

I would suggest doing what the openstack puppet modules do for openstack
services. Puppet-keystone has a good example[1].  Then, we can toggle the
settings in system-config.

TL;DR - Add manage_service and enabled flags, defaulting them to true.

[1] https://github.com/openstack/puppet-keystone/blob/master/manifests/init.pp#L830

> -- 
> Jeremy Stanley
> 
> _______________________________________________
> OpenStack-Infra mailing list
> OpenStack-Infra at lists.openstack.org
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-infra



More information about the OpenStack-Infra mailing list