Error when deleting Image in glance with rbd backend
Hi,
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
client.glance
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
[client]
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
[client.cinder]
keyring = /etc/ceph/ceph.client.cinder.keyring
[client.glance]
keyring = /etc/ceph/ceph.client.glance.keyring
[client.nova]
keyring = /etc/ceph/ceph.client.nova.keyring
This is the glance-api.conf
[DEFAULT]
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 = http://10.10.10.110/image
registry_host = 10.10.10.110
enable_v1_api = False
transport_url = rabbit://stackrabbit:password@10.10.10.110:5672/
image_cache_dir = /opt/stack/data/glance/cache/
use_syslog = False
debug = True
show_image_direct_url = True
enabled_backends = fast:rbd
[database]
connection = mysql+pymysql://root:password@127.0.0.1/glance?charset=utf8
[oslo_concurrency]
lock_path = /opt/stack/data/glance/locks
[paste_deploy]
flavor = keystone
[keystone_authtoken]
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 = http://10.10.10.110/identity
auth_type = password
[oslo_messaging_notifications]
driver = messagingv2
[glance_store]
default_backend = fast
[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
[cors]
allowed_origin = http://10.10.10.110
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 ...
Can you please run delete command with debug option and provide log
openstack image delete 5aafce2a-5a32-4764-9820-11cb2ee8aaef --debug
Hi, I posted the logs in a new answer as the comment section is limited in characters.
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.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.Hi, there is only one regular snapshot. Creating and deleting images works flawlessly