Bug 1826907 - GlanceMultiStoreConfig does not apply section removal to glance configuration files
Summary: GlanceMultiStoreConfig does not apply section removal to glance configuration...
Keywords:
Status: CLOSED INSUFFICIENT_DATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: puppet-glance
Version: 16.0 (Train)
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: ---
Assignee: Alan Bishop
QA Contact: Mike Abrams
Chuck Copello
URL:
Whiteboard:
Depends On:
Blocks: 1802774
TreeView+ depends on / blocked
 
Reported: 2020-04-22 18:20 UTC by John Fulton
Modified: 2020-06-09 19:56 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-06-09 19:56:55 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description John Fulton 2020-04-22 18:20:21 UTC
If I have a deployment where Glance is configured with three stores (default, dcn0, dcn1) [1] and I remove one of the stores (e.g. remove dcn1) and do a stack update, then the glance-api.conf is not updated [2] and the backend for dcn1 is still present [2]

[1]
parameter_defaults:
  ControllerExtraConfig:
    glance::api::enabled_import_methods: 'glance-direct,web-download,copy-image'
  GlanceBackend: rbd
  GlanceStoreDescription: 'central rbd glance store'
  CephClusterName: central
  GlanceMultistoreConfig:
    dcn0:
      GlanceBackend: rbd
      GlanceStoreDescription: 'dcn0 rbd glance store'
      CephClientUserName: 'external'
      CephClusterName: dcn0
    dcn1:
      GlanceBackend: rbd
      GlanceStoreDescription: 'dcn1 rbd glance store'
      CephClientUserName: 'external'
      CephClusterName: dcn1

[2]
$ sudo tail -20 /var/lib/config-data/puppet-generated/glance_api/etc/glance/glance-api.conf
Warning: Permanently added '192.168.24.10' (ECDSA) to the list of known hosts.
# below.
#conversion_format = raw

[default_backend]
rbd_store_ceph_conf=/etc/ceph/central.conf
rbd_store_user=openstack
rbd_store_pool=images
store_description=central rbd glance store

[dcn0]
rbd_store_ceph_conf=/etc/ceph/dcn0.conf
rbd_store_user=external
rbd_store_pool=images
store_description=dcn0 rbd glance store

[dcn1]
rbd_store_ceph_conf=/etc/ceph/dcn1.conf
rbd_store_user=glance
rbd_store_pool=images
store_description=dcn1 rbd glance store
$

Comment 1 John Fulton 2020-04-22 18:23:57 UTC
Just to clarify If I have already deployed with this:

parameter_defaults:
  ControllerExtraConfig:
    glance::api::enabled_import_methods: 'glance-direct,web-download,copy-image'
  GlanceBackend: rbd
  GlanceStoreDescription: 'central rbd glance store'
  CephClusterName: central
  GlanceMultistoreConfig:
    dcn0:
      GlanceBackend: rbd
      GlanceStoreDescription: 'dcn0 rbd glance store'
      CephClientUserName: 'external'
      CephClusterName: dcn0
    dcn1:
      GlanceBackend: rbd
      GlanceStoreDescription: 'dcn1 rbd glance store'
      CephClientUserName: 'external'
      CephClusterName: dcn1

and I update the above to this:

parameter_defaults:
  ControllerExtraConfig:
    glance::api::enabled_import_methods: 'glance-direct,web-download,copy-image'
  GlanceBackend: rbd
  GlanceStoreDescription: 'central rbd glance store'
  CephClusterName: central
  GlanceMultistoreConfig:
    dcn0:
      GlanceBackend: rbd
      GlanceStoreDescription: 'dcn0 rbd glance store'
      CephClientUserName: 'external'
      CephClusterName: dcn0

Then after the stack update I expect the last 15 lines of my glance-api.conf to look like this:

$ sudo tail -15 /var/lib/config-data/puppet-generated/glance_api/etc/glance/glance-api.conf
# below.
#conversion_format = raw

[default_backend]
rbd_store_ceph_conf=/etc/ceph/central.conf
rbd_store_user=openstack
rbd_store_pool=images
store_description=central rbd glance store

[dcn0]
rbd_store_ceph_conf=/etc/ceph/dcn0.conf
rbd_store_user=external
rbd_store_pool=images
store_description=dcn0 rbd glance store

$

The bug is that the glance.conf still has [dcn1] and the items under it.

Comment 2 Alan Bishop 2020-05-13 20:48:47 UTC
John, I cannot reproduce this. I did a sequence of deployments (stack updates) that added and removed entries from the GlanceMultistoreConfig THT parameter, and always got the correct set of enabled_backends and backend sections in the updated glance-api.conf.

Can you reproduce this?

Comment 3 John Fulton 2020-06-09 19:56:55 UTC
If it can't be reproduced let's close it. If I'm able to reproduce I will re-open


Note You need to log in before you can comment on or make changes to this bug.