yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #95390
[Bug 2098514] Re: default config-dir handling is inconsistent between wsgi scripts and uwsgi/gunicorn
** Also affects: nova
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/2098514
Title:
default config-dir handling is inconsistent between wsgi scripts and
uwsgi/gunicorn
Status in OpenStack Compute (nova):
In Progress
Status in oslo.config:
New
Bug description:
I'm attempting to use oslo.config's config-dir / config-file loading feature that I cannot find documentation for.
It is only referenced in the release notes at https://docs.openstack.org/releasenotes/oslo.config/yoga.html#relnotes-3-20-0-unmaintained-yoga
And honestly best documented in the source at https://opendev.org/openstack/oslo.config/src/commit/f95efb2a1655e3f22bbfb68d0b8a524c9e0444a0/oslo_config/cfg.py#L282
Which has also been clearly updated since the releasenote went out so this isn't dead code.
I'm trying to understand if %(project)s and %(prog)s are set correctly
in both cases.
So working with neutron here as an example but this seems to affect
multiple projects. You can start both similarly, there's an entry
point like
neutron-server \
--config-file /etc/neutron/neutron.conf \
--config-file /etc/neutron/plugins/ml2/ml2_conf.ini
In this case the following file will be read:
/etc/neutron/neutron-server.conf.d/test.conf
Great happy.
The uWSGI case you can start it up with:
uwsgi --ini /etc/neutron/neutron-api-uwsgi.ini
In this case /etc/neutron/neutron-server.conf.d/test.conf won't load
nor will /etc/neutron/neutron-api.conf.d/test.conf
I suspect that %(prog)s is set to "uwsgi" based on the code at
https://opendev.org/openstack/oslo.config/src/commit/f95efb2a1655e3f22bbfb68d0b8a524c9e0444a0/oslo_config/cfg.py#L2022
I don't see neutron overriding it but instead using it. There are
other places that they change the proctitle but that won't affect
sys.argv[0]
https://opendev.org/openstack/neutron/src/commit/207dc65498a12e4c6ae86ee61b3411b6e012f576/neutron/common/config.py#L98
What I'm thinking is that oslo.config either needs to set %(prog)s
differently for uwsgi/gunicorn or needs to somehow document that this
is required for the correct behavior to work. In a number of packaging
cases the documented case seems to use the above config-dir behaviors
like https://opendev.org/openstack/rpm-
packaging/src/commit/6e8686f0cd5369e2541ca4ed08111a57ae64efc3/openstack/neutron/neutron.spec.j2#L396
Neutron is just one example but I've found this issue affects ironic
and nova as well.
To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/2098514/+subscriptions