[openstack-dev] [devstack] Overriding settings file for devstack plugin
dpkshetty at gmail.com
Wed Mar 25 11:04:06 UTC 2015
On Wed, Mar 25, 2015 at 3:58 PM, Sean Dague <sean at dague.net> wrote:
> On 03/25/2015 03:16 AM, Deepak Shetty wrote:
> > On Wed, Mar 25, 2015 at 11:29 AM, Deepak Shetty <dpkshetty at gmail.com
> > <mailto:dpkshetty at gmail.com>> wrote:
> > On Wed, Mar 25, 2015 at 12:58 AM, Ian Wienand <iwienand at redhat.com
> > <mailto:iwienand at redhat.com>> wrote:
> > On 03/24/2015 03:17 PM, Deepak Shetty wrote:
> > > For eg: Look at 
> > > 
> > > I would like ability to change these while I use the
> > > apporach to setup devstack w/ GlusterFS per my local glusterfs
> > So I think the plugin should do
> > i.e. provide a default only if the variable is unset.
> > Bah! That was easy, i should have figured that myself :)
> > Thanks for catching that
> > This seems like one of those "traps for new players" and is one
> > concern I have with devstack plugins -- that authors keep having
> > find out lessons learned independently. I have added a note on
> > to the documentation in .
> > -i
> >  https://review.openstack.org/#/c/167375/
> > Great, i +1'ed it.
> > Also i posted patch to fix settings file @
> > https://review.openstack.org/167494
> > Ian,
> > Looks like usign bash default in settings file of plugin is not
> > working, in my patch it didn't use glusterfs driver, it used LVM
> > I think whats happening here is that by the time settings file is
> > sourced, CINDER_ENABLED_BACKENDS is already set to lvm by lib/cinder
> > so settings file's default value is never taken
> > IIUC there are 3 scenarios (taking CINDER_ENABLED_BACKENDS as example
> var) :
> > 1) localrc doesn't have CINDER_ENABLED_BACKENDS and enable_plugin
> > - Here we want the lib/cinder's default value to be taken
> > - this should work fine
> > 2) localrc doesn't have CINDER_ENABLED_BACKENDS but has enable_plugin
> > glusterfs
> > - Here we want the plugin's default values to be taken, but its not
> > as lib/cinder already initialized CINDER_ENABLED_BACKENDS to use lvm
> > - Thus broken
> > 3) localrc has both CINDER_ENABLED_BACKENDS and enable_plugin glusterfs
> > specified
> > - Here we want CINDER_ENABLED_BACKENDS present in my localrc to be
> > chosen
> > - This will work as by the time settings file is sourced
> > CINDER_ENABLED_BACKENDS is already initialised to my value in localrc
> > So #2 scenario would need some changes in stack.sh handling of plugin
> code ?
> Right, so this code runs late enough that you don't get to change the
> defaults. I think that's ok.
Had a question here, why is this source in the end ?
plugin config is something that should be allowed to be overridden, thus
be sourced in the beginning and then anything in localrc will override what
That ways if someone wants to use plugin config, just enable the plugin.
if they want to override, enable plugin and override the env specific parts
Am i thinkign wrong ?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the OpenStack-dev