[openstack-dev] [puppet] openstacklib::db::sync proposal

Yanis Guenane yguenane at redhat.com
Tue Jun 2 16:41:09 UTC 2015


Hello list,

In order to standardize the way sync_db is done across modules, I would
like to offer a suite of patch[1] that enforces a common pattern.

Pattern is :

    if $sync_db {
      include COMPONENT::db::sync
    }

    class COMPONENT::db::sync {
       openstacklib::db::sync {
         [...]
       }
    }

The openstacklib::db::sync[2] is currently only a wrapper around an exec
that does the actual db sync, this allow to make any modification to the
exec into a single place. The main advantage IMO is that a contributor
is provided with the same experience as it is not the case today across
all modules.

Two examples :

  Keystone :
https://github.com/stackforge/puppet-keystone/blob/master/manifests/init.pp#L829-L832
  Cinder :
https://github.com/stackforge/puppet-cinder/blob/master/manifests/api.pp#L175-L187
and
https://github.com/stackforge/puppet-cinder/blob/master/manifests/db/sync.pp

I would like to know your thoughts about this idea and your feedbacks.

Thank you in advance,

[1]
https://review.openstack.org/#/q/status:open+branch:master+topic:db_sync,n,z
[2] https://review.openstack.org/#/c/185601/

--
Yanis Guenane




More information about the OpenStack-dev mailing list