[openstack-dev] [neutron][oslo] Mitaka neutron-*aas are broken when --config-dir is passed

Ihar Hrachyshka ihrachys at redhat.com
Thu May 26 12:25:37 UTC 2016


> On 25 May 2016, at 18:47, Armando M. <armamig at gmail.com> wrote:
> 
> 
> 
> On 25 May 2016 at 09:02, Brandon Logan <brandon.logan at rackspace.com> wrote:
> +1
> 
> This sounds like a sane plane.  That magical config load caused me some
> problems in the past when I didn't know about it, would be glad to see
> it go.  I thought it being deprecated and removed was planned anyway,
> and honestly didn't think it was still in the code base because I hadn't
> run into any issues recently.
> 
> If my memory doesn't fail me, that code is still around for a couple of reasons, and one being documented in [1] (the other one I think was because of the devstack's way of configuring *-aas). My suggestion would be to thoroughly think what the implications are before we let it up in flames. Things might have changed since the last time this code was touched, but one never knows.
> 
> [1] https://bugs.launchpad.net/neutron/+bug/1492069

Thanks for the link. So as far as I understand the use case, it’s to allow an external service plugin to drop neutron_<name-of-service>.conf file into /etc/neutron and expect it to load service providers definition from there, without the need to change neutron-server CLI. Right?

If that’s the case, it may be achieved with oslo.config --config-dir option, where you would create a directory somewhere under /etc/neutron and drop all your additional configuration files there (or symlink them from there), and then pass the directory name thru --config-dir, so that oslo.config would load all *.conf files from the directory. In that way, you have your CLI stable for neutron-server process, while the list of configuration files to load service_providers sections from is dynamic and depends on subprojects installed.

Actually, that’s exactly how we handle additional configuration files in RDO where we create /etc/neutron/conf.d/<service-name> directories per service and make sure that each service loads configuration files from there. F.e. that’s CLI we use for neutron-server:

https://github.com/openstack-packages/neutron/blob/rpm-master/neutron-server.service#L8

/usr/bin/neutron-server […]  --config-dir /etc/neutron/conf.d/neutron-server […]

So when you want to make neutron-server to load an additional config file for you, you just drop your .conf file there.

I would prefer neutron upstream comes up with a standard directory layout for exactly that need, and document it as a deployment requirement, so that all subprojects may rely on the directory being created and loaded by the controller. Of course, I would prefer if it reflects what RDO already does, so that we don’t need to make the change. :)

As for devstack, yes indeed we load neutron_*aas.conf files there relying on the magic code. This should not stop us from deprecating and eventually removing the code though. I am happy to push the needed devstack patches if we agree that’s the end goal to have pure oslo.config configuration loading.

Ihar


More information about the OpenStack-dev mailing list