Unable to delete image from glance cinder store
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Glance |
Invalid
|
Undecided
|
Unassigned |
Bug Description
OpenStack master branch built using Devstack 6/30/23
Configuring glance to use cinder backends as multistores.
Configuration works as documented and images can be created in the cinder backend, however when trying to delete any image from glance that is located in a cinder store this will fail with the following:
stack@multi1:~$ glance image-delete 7934ed5e-
'HTTP 500 Internal Server Error: The server has either erred or is incapable of performing the requested operation.': Unable to delete image '7934ed5e-
The image in question is:
stack@multi1:~$ glance image-show 7934ed5e-
+------
| Property | Value |
+------
| checksum | a3bf59112e4930e
| container_format | bare |
| created_at | 2023-06-
| disk_format | raw |
| id | 7934ed5e-
| locations | [{"url": "cinder:
| | {"store": "pure2"}}] |
| min_disk | 0 |
| min_ram | 0 |
| name | Ubuntu 22.04 |
| os_hash_algo | sha512 |
| os_hash_value | 0bbfdb7382c8767
| | b82d8444a7adcfd
| os_hidden | False |
| owner | 6f9ddcf4d9f1487
| owner_specified
| owner_specified
| owner_specified
| protected | False |
| size | 2361393152 |
| status | active |
| stores | pure2 |
| tags | [] |
| updated_at | 2023-06-
| virtual_size | 2361393152 |
| visibility | public |
+------
The error in the glance-api log file is:
Jun 30 17:54:45 multi1 <email address hidden>[1052009]: ERROR glance.common.wsgi [None req-2e0ef496-
Jun 30 17:54:45 multi1 <email address hidden>[1052009]: ERROR glance.common.wsgi Traceback (most recent call last):
Jun 30 17:54:45 multi1 <email address hidden>[1052009]: ERROR glance.common.wsgi File "/opt/stack/
Jun 30 17:54:45 multi1 <email address hidden>[1052009]: ERROR glance.common.wsgi action_result = self.dispatch(
Jun 30 17:54:45 multi1 <email address hidden>[1052009]: ERROR glance.common.wsgi File "/opt/stack/
Jun 30 17:54:45 multi1 <email address hidden>[1052009]: ERROR glance.common.wsgi return method(*args, **kwargs)
Jun 30 17:54:45 multi1 <email address hidden>[1052009]: ERROR glance.common.wsgi File "/opt/stack/
Jun 30 17:54:45 multi1 <email address hidden>[1052009]: ERROR glance.common.wsgi return func(self, req, *args, **kwargs)
Jun 30 17:54:45 multi1 <email address hidden>[1052009]: ERROR glance.common.wsgi File "/opt/stack/
Jun 30 17:54:45 multi1 <email address hidden>[1052009]: ERROR glance.common.wsgi staging_
Jun 30 17:54:45 multi1 <email address hidden>[1052009]: ERROR glance.common.wsgi File "/usr/local/
Jun 30 17:54:45 multi1 <email address hidden>[1052009]: ERROR glance.common.wsgi raise op_exec_
Jun 30 17:54:45 multi1 <email address hidden>[1052009]: ERROR glance.common.wsgi glance_
Jun 30 17:54:45 multi1 <email address hidden>[1052009]: ERROR glance.common.wsgi
The contents of glance-api.conf are:
[DEFAULT]
use_keystone_limits = True
enforce_secure_rbac = true
worker_
logging_
logging_
logging_
logging_
public_endpoint = http://
show_multiple_
show_image_
transport_url = rabbit:
image_cache_dir = /opt/stack/
use_syslog = False
debug = True
enabled_backends = pure1:cinder, pure2:cinder, pure3:cinder, pure4:cinder
[database]
connection = mysql+pymysql:
[oslo_concurrency]
lock_path = /opt/stack/
[paste_deploy]
flavor = keystone+
[keystone_
memcached_servers = localhost:11211
cafile = /opt/stack/
project_domain_name = Default
project_name = service
user_domain_name = Default
password = *******
username = glance
auth_url = http://
interface = public
auth_type = password
[oslo_messaging
driver = messagingv2
[glance_store]
filesystem_
stores = file,http,cinder
default_store = cinder
default_backend = pure2
[cors]
allowed_origin = http://
[oslo_policy]
enforce_
enforce_scope = true
[oslo_limit]
endpoint_id = a63e27f2e4cb402
system_scope = all
auth_url = http://
auth_type = password
username = glance
password = *******
user_domain_name = Default
[pure1]
store_description = Pure
cinder_
cinder_
cinder_
cinder_
cinder_volume_type = pure
[pure2]
store_description = Pure
cinder_
cinder_
cinder_
cinder_
cinder_volume_type = pure2
I understood that HTTP stores were read-only, but you should definitely be able to delete an image from a cinder backend store - it is only a volume in the end.
description: | updated |
Incorrect glance-api conf file.
Once the correct information was in there it works fine