<div dir="ltr">+ Sean Dague<br><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Mar 25, 2015 at 12:46 PM, Deepak Shetty <span dir="ltr"><<a href="mailto:dpkshetty@gmail.com" target="_blank">dpkshetty@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="h5">On Wed, Mar 25, 2015 at 11:29 AM, Deepak Shetty <span dir="ltr"><<a href="mailto:dpkshetty@gmail.com" target="_blank">dpkshetty@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote"><span>On Wed, Mar 25, 2015 at 12:58 AM, Ian Wienand <span dir="ltr"><<a href="mailto:iwienand@redhat.com" target="_blank">iwienand@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span>On 03/24/2015 03:17 PM, Deepak Shetty wrote:<br>
> For eg: Look at [1]<br>
</span>> [1] <a href="https://github.com/stackforge/devstack-plugin-glusterfs/blob/master/devstack/settings" target="_blank">https://github.com/stackforge/devstack-plugin-glusterfs/blob/master/devstack/settings</a><br>
<span><br>
> I would like ability to change these while I use the enable_plugin<br>
> apporach to setup devstack w/ GlusterFS per my local glusterfs setup<br>
<br>
</span>So I think the plugin should do<br>
<br>
CINDER_ENABLED_BACKENDS=${CINDER_ENABLED_BACKENDS:-glusterfs:glusterfs,lvm:lvm1}<br>
<br>
i.e. provide a default only if the variable is unset.<br></blockquote><div><br></div></span><div>Bah! That was easy, i should have figured that myself :)<br></div><div>Thanks for catching that<br> <br></div><span><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
This seems like one of those "traps for new players" and is one<br>
concern I have with devstack plugins -- that authors keep having to<br>
find out lessons learned independently. I have added a note on this<br>
to the documentation in [1].<br>
<br>
-i<br>
<br>
[1] <a href="https://review.openstack.org/#/c/167375/" target="_blank">https://review.openstack.org/#/c/167375/</a><br></blockquote><div><br></div></span><div>Great, i +1'ed it.<br><br></div><div>Also i posted patch to fix settings file @ <a href="https://review.openstack.org/167494" target="_blank">https://review.openstack.org/167494</a><br></div></div></div></div></blockquote><div><br></div></div></div><div>Ian,<br></div><div> 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 (default)<br></div><div>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<br></div><div>so settings file's default value is never taken<br><br></div><div>IIUC there are 3 scenarios (taking CINDER_ENABLED_BACKENDS as example var) :<br></div><div><br>1) localrc doesn't have CINDER_ENABLED_BACKENDS and enable_plugin<br></div><div> - Here we want the lib/cinder's default value to be taken<br></div><div> - this should work fine<br><br></div><div>2) localrc doesn't have CINDER_ENABLED_BACKENDS but has enable_plugin glusterfs<br></div><div> - 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 backend<br></div><div> - Thus broken<br><br></div><div>3) localrc has both CINDER_ENABLED_BACKENDS and enable_plugin glusterfs specified<br></div><div> - Here we want CINDER_ENABLED_BACKENDS present in my localrc to be chosen<br></div><div> - This will work as by the time settings file is sourced CINDER_ENABLED_BACKENDS is already initialised to my value in localrc<br><br></div><div>So #2 scenario would need some changes in stack.sh handling of plugin code ?<br><br></div><div>thanx,<br></div><div>deepak<br></div></div><br></div></div>
</blockquote></div><br></div></div>