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

Rikimaru Honjo 1989098 at bugs.launchpad.net
Thu Sep 8 12:18:24 UTC 2022


** 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 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.
+ following bug report.
  
  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 bug report.

  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