glance-api stops when cinder_store user credentials are not configured

Bug #1951081 reported by Hemanth Nakkina
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
glance_store
New
Undecided
Unassigned

Bug Description

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

Tags: seg
description: updated
tags: added: seg
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.