2021-11-16 09:58:45 |
Hemanth Nakkina |
description |
glance-api service stops with the following error with cinder storage backend.
ERROR: 'NoneType' object has no attribute 'user_id'
Glance-api configuration that lead to the error:
[DEFAULT]
...
enabled_backends = local:file, ceph:rbd, __DEFAULT__:cinder
...
[glance_store]
default_backend = ceph
filesystem_store_datadir = /var/lib/glance/images/
...
...
[local]
filesystem_store_datadir = /var/lib/glance/images/
store_description = Local filesystem store
[ceph]
rbd_store_chunk_size = 8
rbd_store_pool = glance
rbd_store_user = glance
rados_connect_timeout = 0
rbd_store_ceph_conf = /etc/ceph/ceph.conf
[__DEFAULT__]
cinder_volume_type = __DEFAULT__
The error occurs in specific case where cinder_volume_type is defined for the store but not cinder_store_user_name, cinder_store_password, cinder_store_auth_address, cinder_store_project_name, cinder_store_project_domain_name.
Since there is no context passed while creating cinderclient [1] and cinder_store_user_name is not defined, failed to create cinderclient object.
Probably this should leave a WARNING message in logs instead of stopping the glance-api service just like the behaviour when cinder service is not started.
[1] https://opendev.org/openstack/glance_store/src/branch/master/glance_store/_drivers/cinder.py#L498 |
glance-api service stops with the following error with cinder storage backend (verified in xena).
ERROR: 'NoneType' object has no attribute 'user_id'
Glance-api configuration that lead to the error:
[DEFAULT]
...
enabled_backends = local:file, ceph:rbd, __DEFAULT__:cinder
...
[glance_store]
default_backend = ceph
filesystem_store_datadir = /var/lib/glance/images/
...
...
[local]
filesystem_store_datadir = /var/lib/glance/images/
store_description = Local filesystem store
[ceph]
rbd_store_chunk_size = 8
rbd_store_pool = glance
rbd_store_user = glance
rados_connect_timeout = 0
rbd_store_ceph_conf = /etc/ceph/ceph.conf
[__DEFAULT__]
cinder_volume_type = __DEFAULT__
The error occurs in specific case where cinder_volume_type is defined for the store but not cinder_store_user_name, cinder_store_password, cinder_store_auth_address, cinder_store_project_name, cinder_store_project_domain_name.
Since there is no context passed while creating cinderclient [1] and cinder_store_user_name is not defined, failed to create cinderclient object.
Probably this should leave a WARNING message in logs instead of stopping the glance-api service just like the behaviour when cinder service is not started.
[1] https://opendev.org/openstack/glance_store/src/branch/master/glance_store/_drivers/cinder.py#L498 |
|