Init script for glance-api ignores additional config files

Bug #1955022 reported by Christian Rohmann
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Ubuntu Cloud Archive
Fix Released
Medium
Unassigned
glance (Ubuntu)
Fix Released
Medium
Unassigned
openstack-pkg-tools (Ubuntu)
Triaged
Wishlist
Unassigned

Bug Description

The init script at /etc/init.d/glance-api (likely created by the openstack-pkg-tools) uses the

```
PROJECT_NAME=glance
NAME=${PROJECT_NAME}-api
CONFIG_FILE=/etc/${PROJECT_NAME}/${NAME}.conf
```

to later add the daemon-arg ``--config-file /etc/glance/glance-api.conf``

This unfortunately causes Glance (or oslo_config in particular, see https://docs.openstack.org/oslo.config/latest/configuration/options.html#default) to ignore all other config files.
While multiple config files might not be necessary per se, Glance uses them at least since https://review.opendev.org/c/openstack/glance/+/527635 and the user documentation talks about placing various settings into ``glance-image-import.conf`` (https://docs.openstack.org/glance/latest/admin/interoperable-image-import.html#configuring-the-web-download-method)

This issue of using config-file vs. config-dir has been "fixed" for the DevStack (https://review.opendev.org/c/openstack/devstack/+/625628) and there were other observations of a similar issue in e.g. https://bugs.launchpad.net/glance/+bug/1775782.

With multiple config files being actively used by glance switching to ``config-dir`` or at least allow adding multiple config files (see default list: https://opendev.org/openstack/glance/src/branch/master/glance/common/wsgi_app.py#L37) is necessary.

summary: - Init script for glance-api ignores any additional config files
+ Init script for glance-api ignores additional config files
Revision history for this message
Corey Bryant (corey.bryant) wrote :

Christian, Thanks for reporting this. I've pushed a fix for this to the repo and it will get picked up on the next upload for yoga.

Changed in glance (Ubuntu):
status: New → Triaged
Changed in cloud-archive:
status: New → Triaged
Changed in openstack-pkg-tools (Ubuntu):
status: New → Triaged
importance: Undecided → Wishlist
Changed in glance (Ubuntu):
importance: Undecided → Medium
Changed in cloud-archive:
importance: Undecided → Medium
Revision history for this message
Christian Rohmann (christian-rohmann) wrote :

Thanks Corey for picking this up so quickly. Do you mind sharing a link to where/what was changed?
Will there be any backporting for packaged of current OpenStack releases if I may ask?

Revision history for this message
Christian Rohmann (christian-rohmann) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package glance - 2:23.0.0+git2022011216.502fa0ffc-0ubuntu1

---------------
glance (2:23.0.0+git2022011216.502fa0ffc-0ubuntu1) jammy; urgency=medium

  * d/glance-common.install, d/glance-api.init.in: Install
    glance-image-import.conf.sample and add --config-dir=/etc/glance/
    to glance-api init script (LP: #1955022).
  * New upstream snapshot for OpenStack Yoga.
  * d/control, d/rules: Bump debhelper compat to 13.

 -- Corey Bryant <email address hidden> Wed, 12 Jan 2022 16:47:24 -0500

Changed in glance (Ubuntu):
status: Triaged → Fix Released
Changed in cloud-archive:
status: Triaged → Fix Committed
Revision history for this message
Corey Bryant (corey.bryant) wrote :

This bug was fixed in the package glance - 2:23.0.0+git2022011216.502fa0ffc-0ubuntu1~cloud0
---------------

 glance (2:23.0.0+git2022011216.502fa0ffc-0ubuntu1~cloud0) focal-yoga; urgency=medium
 .
   * New upstream release for the Ubuntu Cloud Archive.
 .
 glance (2:23.0.0+git2022011216.502fa0ffc-0ubuntu1) jammy; urgency=medium
 .
   * d/glance-common.install, d/glance-api.init.in: Install
     glance-image-import.conf.sample and add --config-dir=/etc/glance/
     to glance-api init script (LP: #1955022).
   * New upstream snapshot for OpenStack Yoga.
   * d/control, d/rules: Bump debhelper compat to 13.

Changed in cloud-archive:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.