Ask Your Question

Error when deleting Image in glance with rbd backend

asked 2020-04-24 03:41:40 -0500

ChristianWienke gravatar image


i'm trying to delete images from glance but this failes with an error, that the backend does not have the capabilities to delete images.

I'm using the same configuration for creating images within rbd backend and this works. Cinder does also has the capabilities to create and delete volumes on the backend.

This is the config I use for the rbd backend.

Ceph auth on ceph mon host:

# ceph auth list

       key: AQDvyE9eU2+FFhAAaQRc4IAif/DJkqWnx6FmEQ==
       caps: [mon] allow r
       caps: [osd] allow class-read object_prefix rbd_children, allow rwx pool=images,allow rx pool=volumes

Now the ceph.conf on the glance host:

# cat  /etc/ceph/ceph.conf

    rbd cache = true
    rbd cache writethrough until flush = true
    admin socket = /var/run/ceph/guests/$cluster-$type.$id.$pid.$cctid.asok
    log file = /var/log/qemu/qemu-guest-$pid.log
    rbd concurrent management ops = 20

        keyring = /etc/ceph/ceph.client.cinder.keyring

        keyring = /etc/ceph/ceph.client.glance.keyring

        keyring = /etc/ceph/ceph.client.nova.keyring

This is the glance-api.conf

logging_exception_prefix = ERROR %(name)s ^[[01;35m%(instance)s^[[00m
logging_default_format_string = %(color)s%(levelname)s %(name)s [^[[00;36m-%(color)s] ^[[01;35m%(instance)s%(color)s%(message)s^[[00m
logging_context_format_string = %(color)s%(levelname)s %(name)s [^[[01;36m%(global_request_id)s %(request_id)s ^[[00;36m%(project_name)s %(user_name)s%(color)s] ^[[01;35m%(instance)s%(color)s%(message)s^[[00m
logging_debug_format_suffix = ^[[00;33m{{(pid=%(process)d) %(funcName)s %(pathname)s:%(lineno)d}}^[[00m
public_endpoint =
registry_host =
enable_v1_api = False
transport_url = rabbit://stackrabbit:password@
image_cache_dir = /opt/stack/data/glance/cache/
use_syslog = False
debug = True
show_image_direct_url = True
enabled_backends = fast:rbd

connection = mysql+pymysql://root:password@

lock_path = /opt/stack/data/glance/locks

flavor = keystone

memcached_servers = localhost:11211
cafile = /opt/stack/data/ca-bundle.pem
project_domain_name = Default
project_name = service
user_domain_name = Default
password = password
username = glance
auth_url =
auth_type = password

driver = messagingv2

default_backend = fast

store_description = "Fast rbd backend"
rbd_store_pool = images
rbd_store_user = glance
rbd_store_ceph_conf = /etc/ceph/ceph.conf
rbd_store_chunk_size = 8
rados_connect_timeout = 0

allowed_origin =

What I tried:

#stack@openstack10:~$ openstack image delete 5aafce2a-5a32-4764-9820-11cb2ee8aaef
Failed to delete image with name or ID '5aafce2a-5a32-4764-9820-11cb2ee8aaef': HTTP 500 Internal Server Error: The server has either erred or is incapable of performing the requested operation.
Failed to delete 1 of 1 images.

Glance logs:

Apr 24 07:47:19 openstack10 devstack@g-api.service[18885]: #033[01;31mERROR glance.common.wsgi [#033[01;36mNone req-124f431a-1189-4728-a079-fca4a34c93e1 #033[00;36mdemo admin#033[01;31m] #033[01;35m#033[01;31mCaught error: Deleting images from this store is not supported.#033[00m: glance_store.exceptions.StoreDeleteNotSupported: Deleting images from this store is not supported.
Apr 24 07:47:19 openstack10 devstack@g-api.service[18885]: ERROR glance.common.wsgi #033[01;35m#033[00mTraceback (most recent call last):
Apr 24 07:47:19 ...
edit retag flag offensive close merge delete


Can you please run delete command with debug option and provide log

openstack image delete 5aafce2a-5a32-4764-9820-11cb2ee8aaef --debug

jayeshc gravatar imagejayeshc ( 2020-04-24 04:28:15 -0500 )edit

Hi, I posted the logs in a new answer as the comment section is limited in characters.

ChristianWienke gravatar imageChristianWienke ( 2020-04-24 04:46:53 -0500 )edit

Has this worked before or are you dealing with it since the beginning? I would try to create and delete an image with the rbd command to rule out the ceph layer. Try rbd --id glance -k <KEYRING_PATH> -p images create --image test -s 1G and then delete it with the same parameters.

eblock gravatar imageeblock ( 2020-04-24 13:47:44 -0500 )edit

Also check if the image has snapshots that weren't cleaned up: rbd -p images snap ls 5aafce2a-5a32-4764-9820-11cb2ee8aaef. If there's more than the one regular glance snapshot I would check if they can be deleted.

eblock gravatar imageeblock ( 2020-04-24 13:49:08 -0500 )edit

Hi, there is only one regular snapshot. Creating and deleting images works flawlessly

    toa5@openstack10:~$ rbd --id glance -k /etc/ceph/ceph.client.glance.keyring -p images remove --image test
Removing image: 100% complete...done.
ChristianWienke gravatar imageChristianWienke ( 2020-04-27 02:14:49 -0500 )edit

1 answer

Sort by ยป oldest newest most voted

answered 2020-04-24 04:46:14 -0500

ChristianWienke gravatar image

Debug logs:

stack@openstack10:~$ openstack image delete 5aafce2a-5a32-4764-9820-11cb2ee8aaef --debug

START with options: image delete 5aafce2a-5a32-4764-9820-11cb2ee8aaef --debug

options: Namespace(access_key='', access_secret='***', access_token='***', access_token_endpoint='', access_token_type='', application_credential_id='', application_credential_name='', application_credential_secret='***', auth_methods='', auth_type='password', auth_url='', cacert=None, cert='', client_id='', client_secret='***', cloud='', code='', consumer_key='', consumer_secret='***', debug=True, default_domain='default', default_domain_id='', default_domain_name='', deferred_help=False, discovery_endpoint='', domain_id='', domain_name='', endpoint='', identity_provider='', identity_provider_url='', insecure=None, interface='public', key='', log_file=None, openid_scope='', os_baremetal_api_version='1.61', os_beta_command=False, os_compute_api_version='', os_dns_api_version='2', os_identity_api_version='3', os_image_api_version='', os_key_manager_api_version='1', os_network_api_version='', os_object_api_version='', os_placement_api_version='1.0', os_project_id=None, os_project_name=None, os_volume_api_version='3', passcode='', password='***', profile='', project_domain_id='default', project_domain_name='', project_id='', project_name='demo', protocol='', redirect_uri='', region_name='RegionOne', remote_project_domain_id='', remote_project_domain_name='', remote_project_id='', remote_project_name='', service_provider='', service_provider_endpoint='', service_provider_entity_id='', system_scope='', timing=False, token='***', trust_id='', user_domain_id='default', user_domain_name='', user_id='', username='admin', verbose_level=3, verify=None)

Auth plugin password selected

auth_config_hook(): {'api_timeout': None, 'verify': True, 'cacert': None, 'cert': None, 'key': None, 'baremetal_status_code_retries': '5', 'baremetal_introspection_status_code_retries': '5', 'image_status_code_retries': '5', 'disable_vendor_agent': {}, 'interface': 'public', 'floating_ip_source': 'neutron', 'image_api_use_tasks': False, 'image_format': 'qcow2', 'message': '', 'network_api_version': '2', 'object_store_api_version': '1', 'secgroup_source': 'neutron', 'status': 'active', 'auth': {'user_domain_id': 'default', 'project_domain_id': 'default', 'project_name': 'demo'}, 'verbose_level': 3, 'deferred_help': False, 'debug': True, 'region_name': 'RegionOne', 'default_domain': 'default', 'timing': False, 'auth_url': '', 'username': 'admin', 'password': '***', 'beta_command': False, 'identity_api_version': '3', 'volume_api_version': '3', 'baremetal_api_version': '1.61', 'dns_api_version': '2', 'key_manager_api_version': '1', 'placement_api_version': '1.0', 'auth_type': 'password', 'networks': []}

defaults: {'api_timeout': None, 'verify': True, 'cacert': None, 'cert': None, 'key': None, 'auth_type': 'password', 'baremetal_status_code_retries': 5, 'baremetal_introspection_status_code_retries': 5, 'image_status_code_retries': 5, 'disable_vendor_agent': {}, 'interface': None, 'floating_ip_source': 'neutron', 'image_api_use_tasks': False, 'image_format': 'qcow2', 'message': '', 'network_api_version': '2', 'object_store_api_version': '1', 'secgroup_source': 'neutron', 'status': 'active'}

cloud cfg: {'api_timeout': None, 'verify': True, 'cacert': None, 'cert': None, 'key': None, 'baremetal_status_code_retries': '5', 'baremetal_introspection_status_code_retries': '5', 'image_status_code_retries': '5', 'disable_vendor_agent': {}, 'interface': 'public', 'floating_ip_source': 'neutron', 'image_api_use_tasks': False, 'image_format': 'qcow2', 'message': '', 'network_api_version': '2', 'object_store_api_version': '1', 'secgroup_source': 'neutron', 'status': 'active', 'auth': {'user_domain_id': 'default', 'project_domain_id': 'default', 'project_name': 'demo'}, 'verbose_level': 3, 'deferred_help': False, 'debug': True, 'region_name': 'RegionOne', 'default_domain': 'default', 'timing': False, 'auth_url': '', 'username': 'admin', 'password': '***', 'beta_command': False, 'identity_api_version': '3', 'volume_api_version': '3', 'baremetal_api_version': '1.61', 'dns_api_version': '2', 'key_manager_api_version': '1', 'placement_api_version': '1.0', 'auth_type': 'password', 'networks': []}

compute API version 2.1, cmd group openstack.compute.v2

identity API version 3, cmd group openstack.identity.v3

image API version 2, cmd group openstack.image.v2

network API version 2, cmd group

object_store API version 1, cmd group openstack.object_store.v1

volume API version 3, cmd group openstack.volume.v3

neutronclient API version 2, cmd group openstack.neutronclient.v2

baremetal API version 1.61, cmd group openstack.baremetal.v1

dns API version 2, cmd group openstack.dns.v2

key_manager API version 1, cmd group openstack.key_manager.v1

placement API version 1.0, cmd group openstack.placement.v1

command: image delete -> openstackclient.image.v2.image.DeleteImage (auth=True)

Auth plugin password selected

auth_config_hook(): {'api_timeout': None, 'verify': True, 'cacert': None, 'cert': None, 'key': None, 'baremetal_status_code_retries': '5', 'baremetal_introspection_status_code_retries': '5', 'image_status_code_retries': '5', 'disable_vendor_agent': {}, 'interface': 'public', 'floating_ip_source': 'neutron', 'image_api_use_tasks': False, 'image_format': 'qcow2', 'message': '', 'network_api_version': '2', 'object_store_api_version': '1', 'secgroup_source': 'neutron', 'status': 'active', 'auth': {'user_domain_id': 'default', 'project_domain_id': 'default', 'project_name': 'demo'}, 'additional_user_agent': [('osc-lib', '2.0.0')], 'verbose_level': 3, 'deferred_help ...
edit flag offensive delete link more


You will get exact error in ceph logs, please check ceph logs

jayeshc gravatar imagejayeshc ( 2020-04-25 16:04:04 -0500 )edit

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower


Asked: 2020-04-24 03:41:40 -0500

Seen: 549 times

Last updated: Apr 24 '20