yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #94242
[Bug 2061947] Re: stores-info --detail command fails if swift store is enabled
Reviewed: https://review.opendev.org/c/openstack/glance/+/920170
Committed: https://opendev.org/openstack/glance/commit/06c727cfb32db38d9d705b28236d699e1c2c2083
Submitter: "Zuul (22348)"
Branch: master
commit 06c727cfb32db38d9d705b28236d699e1c2c2083
Author: Pranali Deore <pdeore@xxxxxxxxxx>
Date: Wed May 22 09:51:59 2024 +0000
Fix 500 if multi-tenant swift is used
1. store-info --details and image-create apis fail with 500 if
swift configuration file is set in g-api.conf when muti-tenant
swift store is used. Fixed this by excluding the unregistered
conf parameter and added log warning.
2. Also, store-info --details fails with AttributeError, when
multitenant is enabled for swift store since it doesn not set
the container value during store configuration.
Fixed this by returing `None` incase of multitenant swift store.
Closes-Bug: #2061947
Change-Id: I6cbd11fd0ee5758169a2e0e9961660edb844e65f
** Changed in: glance
Status: In Progress => Fix Released
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to Glance.
https://bugs.launchpad.net/bugs/2061947
Title:
stores-info --detail command fails if swift store is enabled
Status in Glance:
Fix Released
Bug description:
If you enable swift store in multiple stores setup then glance stores-
info --detail or glance stores-info command fails with 500 error
"oslo_config.cfg.NoSuchOptError: no such option store_description in
group [dummy]".
Note: This error only occurs when you specify "swift_store_config_file
= /etc/glance/glance-swift-store.conf and swift_store_multi_tenant =
True" for swift store. Ideally it is recommended not to use
"swift_store_config_file" when multi tenant is enabled for swift but
it should not fail with 500 error and give appropriate 400 BadRequest
error to the user.
Sample configuration glance-api.conf:
[DEFAULT]
enabled_backends = dummy:swift
[dummy]
swift_store_multi_tenant = True
default_swift_reference = ref1
swift_store_config_file = /etc/glance/glance-swift-store.conf
swift_store_create_container_on_put = True
store_description = "This is swift store"
Also in second scenario if you set swift store as below in glance-api.conf then it gives 500 error "Apr 17 04:40:20 akekane-zed-dev glance-api[3389648]: ERROR glance.common.wsgi [None req-7dcd5c18-7b31-43e5-9b22-77e20505cab7 admin admin] Caught error: 'MultiTenantStore' object has no attribute 'container': AttributeError: 'MultiTenantStore' object has no attribute 'container'" fot glance stores-info --detail command
[dummy]
swift_store_multi_tenant = True
default_swift_reference = ref1
swift_store_create_container_on_put = True
store_description = "This is swift store"
Ideally in scenario 1 glance stores-info --detail command should raise 400 Bad Request and for scenario 2 we need to identify what is ideal configuration for swift multi tenant and return the response accordingly.
To manage notifications about this bug go to:
https://bugs.launchpad.net/glance/+bug/2061947/+subscriptions
References