[Bug 1989098] [NEW] glance-api yoga lodas unnecessary configuration files

Rikimaru Honjo 1989098 at bugs.launchpad.net
Thu Sep 8 09:39:58 UTC 2022


Public bug reported:

=====
Issue
=====

I'm using glance-api yoga of cloud-archive on Ubuntu 20.04.

-----
# dpkg -l|grep glance-api
ii  glance-api                           2:24.1.0-0ubuntu1~cloud0                             all          OpenStack Image Registry and Delivery Service - API
-----

I set use_syslog=True in glance-api.conf. But it didn't work. The
glance-api's log messages weren't printed in syslog.

==========
Root cause
==========

The "config-dir" option[1] is specified for glance-api processes.

-----------------
# ps -ef|grep glance
glance    174533       1  2 08:55 ?        00:00:21 /usr/bin/python3 /usr/bin/glance-api --config-file=/etc/glance/glance-api.conf --config-dir=/etc/glance/ --log-file=/var/log/glance/glance-api.log
glance    174561  174533  0 08:55 ?        00:00:00 /usr/bin/python3 /usr/bin/glance-api --config-file=/etc/glance/glance-api.conf --config-dir=/etc/glance/ --log-file=/var/log/glance/glance-api.log
glance    174562  174533  0 08:55 ?        00:00:00 /usr/bin/python3 /usr/bin/glance-api --config-file=/etc/glance/glance-api.conf --config-dir=/etc/glance/ --log-file=/var/log/glance/glance-api.log
root      180241  180002  0 09:12 pts/0    00:00:00 grep --color=auto glance
-----------------

So glance-api loads all *.conf files under the /etc/glance directory. As
a result, /etc/glance/rootwrap.conf's use_syslog value(False) overwrites
glance-api.conf's use_syslog value(True). The *.conf files seem to be
loaded in alphabetical order.

I think that glance-api also loads unnecessary configuration files.(e.g.
glance-scrubber.conf, rootwrap.conf...)

The "config-dir" option is defined in /etc/init.d/glance-api.

---------------
# grep config-dir /etc/init.d/glance-api
DAEMON_ARGS="--config-dir=/etc/${PROJECT_NAME}/"
---------------

[1]
The config-dir spec is written in the following document.
https://docs.openstack.org/glance/latest/configuration/configuring.html

==============================
Why is "config-dir" specified?
==============================

'DAEMON_ARGS="--config-dir=/etc/${PROJECT_NAME}/"' was added by the
following launchpad.

https://bugs.launchpad.net/cloud-archive/+bug/1955022

=>https://git.launchpad.net/~ubuntu-openstack-
dev/ubuntu/+source/glance/commit/?id=39ce4e7eafc33ef2ddc61c338230b4afe1eeb79b

The above patch was contained in ver.
2:23.0.0+git2022011216.502fa0ffc-0ubuntu1.

So there is a possibility that this issue will also affect to xena
version. But I haven't confirm xena. I would appreciate it if someone
could confirm that.

=======
Remarks
=======

These are the files under /etc/glance directory after installing the
glance-api yoga package.

-------------------------------------------------------------
# ls -1 /etc/glance/
glance-api-paste.ini
glance-api.conf
glance-cache.conf
glance-image-import.conf.sample
glance-manage.conf
glance-scrubber.conf
metadefs
rootwrap.conf
rootwrap.d
schema-image.json
-------------------------------------------------------------

** Affects: cloud-archive
     Importance: Undecided
         Status: New

** Description changed:

  =====
  Issue
  =====
  
  I'm using glance-api yoga of cloud-archive on Ubuntu 20.04.
  
  -----
  # dpkg -l|grep glance-api
  ii  glance-api                           2:24.1.0-0ubuntu1~cloud0                             all          OpenStack Image Registry and Delivery Service - API
  -----
  
  I set use_syslog=True in glance-api.conf. But it didn't work. The
  glance-api's log messages weren't printed in syslog.
  
  ==========
  Root cause
  ==========
  
  The "config-dir" option[1] is specified for glance-api processes.
  
  -----------------
  # ps -ef|grep glance
  glance    174533       1  2 08:55 ?        00:00:21 /usr/bin/python3 /usr/bin/glance-api --config-file=/etc/glance/glance-api.conf --config-dir=/etc/glance/ --log-file=/var/log/glance/glance-api.log
  glance    174561  174533  0 08:55 ?        00:00:00 /usr/bin/python3 /usr/bin/glance-api --config-file=/etc/glance/glance-api.conf --config-dir=/etc/glance/ --log-file=/var/log/glance/glance-api.log
  glance    174562  174533  0 08:55 ?        00:00:00 /usr/bin/python3 /usr/bin/glance-api --config-file=/etc/glance/glance-api.conf --config-dir=/etc/glance/ --log-file=/var/log/glance/glance-api.log
  root      180241  180002  0 09:12 pts/0    00:00:00 grep --color=auto glance
  -----------------
  
  So glance-api loads all *.conf files under the /etc/glance directory. As
- a result, /etc/glance/rootwrap.conf's use_syslog value overwrites
- glance-api.conf's use_syslog value. The *.conf files seem to load in
- alphabetical order.
+ a result, /etc/glance/rootwrap.conf's use_syslog value(False) overwrites
+ glance-api.conf's use_syslog value(True). The *.conf files seem to be
+ loaded in alphabetical order.
  
  I think that glance-api also loads unnecessary confiiguration
  files.(e.g. glance-scrubber.conf, rootwrap.conf...)
  
  The "config-dir" option is defined in /etc/init.d/glance-api.
  
  ---------------
  # grep config-dir /etc/init.d/glance-api
  DAEMON_ARGS="--config-dir=/etc/${PROJECT_NAME}/"
  ---------------
  
  [1]
  The config-dir spec is written in the following document.
  https://docs.openstack.org/glance/latest/configuration/configuring.html
  
  ==============================
  Why is "config-dir" specified?
  ==============================
  
  'DAEMON_ARGS="--config-dir=/etc/${PROJECT_NAME}/"' was added by the
  following launchpad.
  
  https://bugs.launchpad.net/cloud-archive/+bug/1955022
  
  =>https://git.launchpad.net/~ubuntu-openstack-
  dev/ubuntu/+source/glance/commit/?id=39ce4e7eafc33ef2ddc61c338230b4afe1eeb79b
  
- 
- The above patch was added to ver. 2:23.0.0+git2022011216.502fa0ffc-0ubuntu1.
+ The above patch was added to ver.
+ 2:23.0.0+git2022011216.502fa0ffc-0ubuntu1.
  
  So there is a possibility that this issue will also affect to xena
  version. But I haven't confirm xena. I would appreciate it if someone
  could confirm that.

** Description changed:

  =====
  Issue
  =====
  
  I'm using glance-api yoga of cloud-archive on Ubuntu 20.04.
  
  -----
  # dpkg -l|grep glance-api
  ii  glance-api                           2:24.1.0-0ubuntu1~cloud0                             all          OpenStack Image Registry and Delivery Service - API
  -----
  
  I set use_syslog=True in glance-api.conf. But it didn't work. The
  glance-api's log messages weren't printed in syslog.
  
  ==========
  Root cause
  ==========
  
  The "config-dir" option[1] is specified for glance-api processes.
  
  -----------------
  # ps -ef|grep glance
  glance    174533       1  2 08:55 ?        00:00:21 /usr/bin/python3 /usr/bin/glance-api --config-file=/etc/glance/glance-api.conf --config-dir=/etc/glance/ --log-file=/var/log/glance/glance-api.log
  glance    174561  174533  0 08:55 ?        00:00:00 /usr/bin/python3 /usr/bin/glance-api --config-file=/etc/glance/glance-api.conf --config-dir=/etc/glance/ --log-file=/var/log/glance/glance-api.log
  glance    174562  174533  0 08:55 ?        00:00:00 /usr/bin/python3 /usr/bin/glance-api --config-file=/etc/glance/glance-api.conf --config-dir=/etc/glance/ --log-file=/var/log/glance/glance-api.log
  root      180241  180002  0 09:12 pts/0    00:00:00 grep --color=auto glance
  -----------------
  
  So glance-api loads all *.conf files under the /etc/glance directory. As
  a result, /etc/glance/rootwrap.conf's use_syslog value(False) overwrites
  glance-api.conf's use_syslog value(True). The *.conf files seem to be
  loaded in alphabetical order.
  
  I think that glance-api also loads unnecessary confiiguration
  files.(e.g. glance-scrubber.conf, rootwrap.conf...)
  
  The "config-dir" option is defined in /etc/init.d/glance-api.
  
  ---------------
  # grep config-dir /etc/init.d/glance-api
  DAEMON_ARGS="--config-dir=/etc/${PROJECT_NAME}/"
  ---------------
  
  [1]
  The config-dir spec is written in the following document.
  https://docs.openstack.org/glance/latest/configuration/configuring.html
  
  ==============================
  Why is "config-dir" specified?
  ==============================
  
  'DAEMON_ARGS="--config-dir=/etc/${PROJECT_NAME}/"' was added by the
  following launchpad.
  
  https://bugs.launchpad.net/cloud-archive/+bug/1955022
  
  =>https://git.launchpad.net/~ubuntu-openstack-
  dev/ubuntu/+source/glance/commit/?id=39ce4e7eafc33ef2ddc61c338230b4afe1eeb79b
  
  The above patch was added to ver.
  2:23.0.0+git2022011216.502fa0ffc-0ubuntu1.
  
  So there is a possibility that this issue will also affect to xena
  version. But I haven't confirm xena. I would appreciate it if someone
  could confirm that.
+ 
+ =======
+ Remarks
+ =======
+ 
+ This is the files under /etc/glance directory after installing the
+ glance-api yoga package.
+ 
+ -------------------------------------------------------------
+ # ls -1 /etc/glance/
+ glance-api-paste.ini
+ glance-api.conf
+ glance-cache.conf
+ glance-image-import.conf.sample
+ glance-manage.conf
+ glance-scrubber.conf
+ metadefs
+ rootwrap.conf
+ rootwrap.d
+ schema-image.json
+ -------------------------------------------------------------

** Description changed:

  =====
  Issue
  =====
  
  I'm using glance-api yoga of cloud-archive on Ubuntu 20.04.
  
  -----
  # dpkg -l|grep glance-api
  ii  glance-api                           2:24.1.0-0ubuntu1~cloud0                             all          OpenStack Image Registry and Delivery Service - API
  -----
  
  I set use_syslog=True in glance-api.conf. But it didn't work. The
  glance-api's log messages weren't printed in syslog.
  
  ==========
  Root cause
  ==========
  
  The "config-dir" option[1] is specified for glance-api processes.
  
  -----------------
  # ps -ef|grep glance
  glance    174533       1  2 08:55 ?        00:00:21 /usr/bin/python3 /usr/bin/glance-api --config-file=/etc/glance/glance-api.conf --config-dir=/etc/glance/ --log-file=/var/log/glance/glance-api.log
  glance    174561  174533  0 08:55 ?        00:00:00 /usr/bin/python3 /usr/bin/glance-api --config-file=/etc/glance/glance-api.conf --config-dir=/etc/glance/ --log-file=/var/log/glance/glance-api.log
  glance    174562  174533  0 08:55 ?        00:00:00 /usr/bin/python3 /usr/bin/glance-api --config-file=/etc/glance/glance-api.conf --config-dir=/etc/glance/ --log-file=/var/log/glance/glance-api.log
  root      180241  180002  0 09:12 pts/0    00:00:00 grep --color=auto glance
  -----------------
  
  So glance-api loads all *.conf files under the /etc/glance directory. As
  a result, /etc/glance/rootwrap.conf's use_syslog value(False) overwrites
  glance-api.conf's use_syslog value(True). The *.conf files seem to be
  loaded in alphabetical order.
  
  I think that glance-api also loads unnecessary confiiguration
  files.(e.g. glance-scrubber.conf, rootwrap.conf...)
  
  The "config-dir" option is defined in /etc/init.d/glance-api.
  
  ---------------
  # grep config-dir /etc/init.d/glance-api
  DAEMON_ARGS="--config-dir=/etc/${PROJECT_NAME}/"
  ---------------
  
  [1]
  The config-dir spec is written in the following document.
  https://docs.openstack.org/glance/latest/configuration/configuring.html
  
  ==============================
  Why is "config-dir" specified?
  ==============================
  
  'DAEMON_ARGS="--config-dir=/etc/${PROJECT_NAME}/"' was added by the
  following launchpad.
  
  https://bugs.launchpad.net/cloud-archive/+bug/1955022
  
  =>https://git.launchpad.net/~ubuntu-openstack-
  dev/ubuntu/+source/glance/commit/?id=39ce4e7eafc33ef2ddc61c338230b4afe1eeb79b
  
  The above patch was added to ver.
  2:23.0.0+git2022011216.502fa0ffc-0ubuntu1.
  
  So there is a possibility that this issue will also affect to xena
  version. But I haven't confirm xena. I would appreciate it if someone
  could confirm that.
  
  =======
  Remarks
  =======
  
- This is the files under /etc/glance directory after installing the
+ These are the files under /etc/glance directory after installing the
  glance-api yoga package.
  
  -------------------------------------------------------------
  # ls -1 /etc/glance/
  glance-api-paste.ini
  glance-api.conf
  glance-cache.conf
  glance-image-import.conf.sample
  glance-manage.conf
  glance-scrubber.conf
  metadefs
  rootwrap.conf
  rootwrap.d
  schema-image.json
  -------------------------------------------------------------

** Description changed:

  =====
  Issue
  =====
  
  I'm using glance-api yoga of cloud-archive on Ubuntu 20.04.
  
  -----
  # dpkg -l|grep glance-api
  ii  glance-api                           2:24.1.0-0ubuntu1~cloud0                             all          OpenStack Image Registry and Delivery Service - API
  -----
  
  I set use_syslog=True in glance-api.conf. But it didn't work. The
  glance-api's log messages weren't printed in syslog.
  
  ==========
  Root cause
  ==========
  
  The "config-dir" option[1] is specified for glance-api processes.
  
  -----------------
  # ps -ef|grep glance
  glance    174533       1  2 08:55 ?        00:00:21 /usr/bin/python3 /usr/bin/glance-api --config-file=/etc/glance/glance-api.conf --config-dir=/etc/glance/ --log-file=/var/log/glance/glance-api.log
  glance    174561  174533  0 08:55 ?        00:00:00 /usr/bin/python3 /usr/bin/glance-api --config-file=/etc/glance/glance-api.conf --config-dir=/etc/glance/ --log-file=/var/log/glance/glance-api.log
  glance    174562  174533  0 08:55 ?        00:00:00 /usr/bin/python3 /usr/bin/glance-api --config-file=/etc/glance/glance-api.conf --config-dir=/etc/glance/ --log-file=/var/log/glance/glance-api.log
  root      180241  180002  0 09:12 pts/0    00:00:00 grep --color=auto glance
  -----------------
  
  So glance-api loads all *.conf files under the /etc/glance directory. As
  a result, /etc/glance/rootwrap.conf's use_syslog value(False) overwrites
  glance-api.conf's use_syslog value(True). The *.conf files seem to be
  loaded in alphabetical order.
  
  I think that glance-api also loads unnecessary confiiguration
  files.(e.g. glance-scrubber.conf, rootwrap.conf...)
  
  The "config-dir" option is defined in /etc/init.d/glance-api.
  
  ---------------
  # grep config-dir /etc/init.d/glance-api
  DAEMON_ARGS="--config-dir=/etc/${PROJECT_NAME}/"
  ---------------
  
  [1]
  The config-dir spec is written in the following document.
  https://docs.openstack.org/glance/latest/configuration/configuring.html
  
  ==============================
  Why is "config-dir" specified?
  ==============================
  
  'DAEMON_ARGS="--config-dir=/etc/${PROJECT_NAME}/"' was added by the
  following launchpad.
  
  https://bugs.launchpad.net/cloud-archive/+bug/1955022
  
  =>https://git.launchpad.net/~ubuntu-openstack-
  dev/ubuntu/+source/glance/commit/?id=39ce4e7eafc33ef2ddc61c338230b4afe1eeb79b
  
- The above patch was added to ver.
+ The above patch was contained in ver.
  2:23.0.0+git2022011216.502fa0ffc-0ubuntu1.
  
  So there is a possibility that this issue will also affect to xena
  version. But I haven't confirm xena. I would appreciate it if someone
  could confirm that.
  
  =======
  Remarks
  =======
  
  These are the files under /etc/glance directory after installing the
  glance-api yoga package.
  
  -------------------------------------------------------------
  # ls -1 /etc/glance/
  glance-api-paste.ini
  glance-api.conf
  glance-cache.conf
  glance-image-import.conf.sample
  glance-manage.conf
  glance-scrubber.conf
  metadefs
  rootwrap.conf
  rootwrap.d
  schema-image.json
  -------------------------------------------------------------

** Description changed:

  =====
  Issue
  =====
  
  I'm using glance-api yoga of cloud-archive on Ubuntu 20.04.
  
  -----
  # dpkg -l|grep glance-api
  ii  glance-api                           2:24.1.0-0ubuntu1~cloud0                             all          OpenStack Image Registry and Delivery Service - API
  -----
  
  I set use_syslog=True in glance-api.conf. But it didn't work. The
  glance-api's log messages weren't printed in syslog.
  
  ==========
  Root cause
  ==========
  
  The "config-dir" option[1] is specified for glance-api processes.
  
  -----------------
  # ps -ef|grep glance
  glance    174533       1  2 08:55 ?        00:00:21 /usr/bin/python3 /usr/bin/glance-api --config-file=/etc/glance/glance-api.conf --config-dir=/etc/glance/ --log-file=/var/log/glance/glance-api.log
  glance    174561  174533  0 08:55 ?        00:00:00 /usr/bin/python3 /usr/bin/glance-api --config-file=/etc/glance/glance-api.conf --config-dir=/etc/glance/ --log-file=/var/log/glance/glance-api.log
  glance    174562  174533  0 08:55 ?        00:00:00 /usr/bin/python3 /usr/bin/glance-api --config-file=/etc/glance/glance-api.conf --config-dir=/etc/glance/ --log-file=/var/log/glance/glance-api.log
  root      180241  180002  0 09:12 pts/0    00:00:00 grep --color=auto glance
  -----------------
  
  So glance-api loads all *.conf files under the /etc/glance directory. As
  a result, /etc/glance/rootwrap.conf's use_syslog value(False) overwrites
  glance-api.conf's use_syslog value(True). The *.conf files seem to be
  loaded in alphabetical order.
  
- I think that glance-api also loads unnecessary confiiguration
- files.(e.g. glance-scrubber.conf, rootwrap.conf...)
+ I think that glance-api also loads unnecessary configuration files.(e.g.
+ glance-scrubber.conf, rootwrap.conf...)
  
  The "config-dir" option is defined in /etc/init.d/glance-api.
  
  ---------------
  # grep config-dir /etc/init.d/glance-api
  DAEMON_ARGS="--config-dir=/etc/${PROJECT_NAME}/"
  ---------------
  
  [1]
  The config-dir spec is written in the following document.
  https://docs.openstack.org/glance/latest/configuration/configuring.html
  
  ==============================
  Why is "config-dir" specified?
  ==============================
  
  'DAEMON_ARGS="--config-dir=/etc/${PROJECT_NAME}/"' was added by the
  following launchpad.
  
  https://bugs.launchpad.net/cloud-archive/+bug/1955022
  
  =>https://git.launchpad.net/~ubuntu-openstack-
  dev/ubuntu/+source/glance/commit/?id=39ce4e7eafc33ef2ddc61c338230b4afe1eeb79b
  
  The above patch was contained in ver.
  2:23.0.0+git2022011216.502fa0ffc-0ubuntu1.
  
  So there is a possibility that this issue will also affect to xena
  version. But I haven't confirm xena. I would appreciate it if someone
  could confirm that.
  
  =======
  Remarks
  =======
  
  These are the files under /etc/glance directory after installing the
  glance-api yoga package.
  
  -------------------------------------------------------------
  # ls -1 /etc/glance/
  glance-api-paste.ini
  glance-api.conf
  glance-cache.conf
  glance-image-import.conf.sample
  glance-manage.conf
  glance-scrubber.conf
  metadefs
  rootwrap.conf
  rootwrap.d
  schema-image.json
  -------------------------------------------------------------

-- 
You received this bug notification because you are a member of Ubuntu
OpenStack, which is subscribed to Ubuntu Cloud Archive.
https://bugs.launchpad.net/bugs/1989098

Title:
  glance-api yoga lodas unnecessary configuration files

Status in Ubuntu Cloud Archive:
  New

Bug description:
  =====
  Issue
  =====

  I'm using glance-api yoga of cloud-archive on Ubuntu 20.04.

  -----
  # dpkg -l|grep glance-api
  ii  glance-api                           2:24.1.0-0ubuntu1~cloud0                             all          OpenStack Image Registry and Delivery Service - API
  -----

  I set use_syslog=True in glance-api.conf. But it didn't work. The
  glance-api's log messages weren't printed in syslog.

  ==========
  Root cause
  ==========

  The "config-dir" option[1] is specified for glance-api processes.

  -----------------
  # ps -ef|grep glance
  glance    174533       1  2 08:55 ?        00:00:21 /usr/bin/python3 /usr/bin/glance-api --config-file=/etc/glance/glance-api.conf --config-dir=/etc/glance/ --log-file=/var/log/glance/glance-api.log
  glance    174561  174533  0 08:55 ?        00:00:00 /usr/bin/python3 /usr/bin/glance-api --config-file=/etc/glance/glance-api.conf --config-dir=/etc/glance/ --log-file=/var/log/glance/glance-api.log
  glance    174562  174533  0 08:55 ?        00:00:00 /usr/bin/python3 /usr/bin/glance-api --config-file=/etc/glance/glance-api.conf --config-dir=/etc/glance/ --log-file=/var/log/glance/glance-api.log
  root      180241  180002  0 09:12 pts/0    00:00:00 grep --color=auto glance
  -----------------

  So glance-api loads all *.conf files under the /etc/glance directory.
  As a result, /etc/glance/rootwrap.conf's use_syslog value(False)
  overwrites glance-api.conf's use_syslog value(True). The *.conf files
  seem to be loaded in alphabetical order.

  I think that glance-api also loads unnecessary configuration
  files.(e.g. glance-scrubber.conf, rootwrap.conf...)

  The "config-dir" option is defined in /etc/init.d/glance-api.

  ---------------
  # grep config-dir /etc/init.d/glance-api
  DAEMON_ARGS="--config-dir=/etc/${PROJECT_NAME}/"
  ---------------

  [1]
  The config-dir spec is written in the following document.
  https://docs.openstack.org/glance/latest/configuration/configuring.html

  ==============================
  Why is "config-dir" specified?
  ==============================

  'DAEMON_ARGS="--config-dir=/etc/${PROJECT_NAME}/"' was added by the
  following launchpad.

  https://bugs.launchpad.net/cloud-archive/+bug/1955022

  =>https://git.launchpad.net/~ubuntu-openstack-
  dev/ubuntu/+source/glance/commit/?id=39ce4e7eafc33ef2ddc61c338230b4afe1eeb79b

  The above patch was contained in ver.
  2:23.0.0+git2022011216.502fa0ffc-0ubuntu1.

  So there is a possibility that this issue will also affect to xena
  version. But I haven't confirm xena. I would appreciate it if someone
  could confirm that.

  =======
  Remarks
  =======

  These are the files under /etc/glance directory after installing the
  glance-api yoga package.

  -------------------------------------------------------------
  # ls -1 /etc/glance/
  glance-api-paste.ini
  glance-api.conf
  glance-cache.conf
  glance-image-import.conf.sample
  glance-manage.conf
  glance-scrubber.conf
  metadefs
  rootwrap.conf
  rootwrap.d
  schema-image.json
  -------------------------------------------------------------

To manage notifications about this bug go to:
https://bugs.launchpad.net/cloud-archive/+bug/1989098/+subscriptions




More information about the Ubuntu-openstack-bugs mailing list