Bug 1116757

Summary: Glance fail to alert when rados packages are not installed
Product: Red Hat OpenStack Reporter: Yogev Rabl <yrabl>
Component: openstack-glanceAssignee: Flavio Percoco <fpercoco>
Status: CLOSED UPSTREAM QA Contact: Yogev Rabl <yrabl>
Severity: low Docs Contact:
Priority: low    
Version: 5.0 (RHEL 7)CC: adeza, eglynn, fpercoco, jdurgin, kdreyer, scohen, sgotliv, yeylon
Target Milestone: ---   
Target Release: 8.0 (Liberty)   
Hardware: x86_64   
OS: Linux   
Whiteboard: storage, ceph
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-08-19 07:59:50 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Yogev Rabl 2014-07-07 08:56:14 UTC
Description of problem:
When the Glance is configure to work with rbd backend (Ceph) & the Rados packages (python-ceph) are not installed the Error that the Glance's logs show is: 

2014-07-07 11:28:27.982 2222 TRACE glance.api.v1.upload_utils Traceback (most recent call last):
2014-07-07 11:28:27.982 2222 TRACE glance.api.v1.upload_utils   File "/usr/lib/python2.7/site-packages/glance/api/v1/upload_utils.py", line 99, in upload_data_to_store
2014-07-07 11:28:27.982 2222 TRACE glance.api.v1.upload_utils     store)
2014-07-07 11:28:27.982 2222 TRACE glance.api.v1.upload_utils   File "/usr/lib/python2.7/site-packages/glance/store/__init__.py", line 380, in store_add_to_backend
2014-07-07 11:28:27.982 2222 TRACE glance.api.v1.upload_utils     (location, size, checksum, metadata) = store.add(image_id, data, size)
2014-07-07 11:28:27.982 2222 TRACE glance.api.v1.upload_utils   File "/usr/lib/python2.7/site-packages/glance/store/rbd.py", line 319, in add
2014-07-07 11:28:27.982 2222 TRACE glance.api.v1.upload_utils     with rados.Rados(conffile=self.conf_file, rados_id=self.user) as conn:
2014-07-07 11:28:27.982 2222 TRACE glance.api.v1.upload_utils AttributeError: 'NoneType' object has no attribute 'Rados'
2014-07-07 11:28:27.982 2222 TRACE glance.api.v1.upload_utils 

Instead of catching an import error, the Glance should fail on the count of lack of Rados packages.  


Version-Release number of selected component (if applicable):
python-glance-2014.1-4.el7ost.noarch
python-glanceclient-0.12.0-1.el7ost.noarch
openstack-glance-2014.1-4.el7ost.noarch


How reproducible:
100%

Steps to Reproduce:
1. Configure the glance to work with rbd backend (see http://ceph.com/docs/master/rbd/rbd-openstack/?highlight=openstack). without installing the python-ceph packages.
2. try to create a new image.


Actual results:
The Glance catch an import error.

Expected results:
The Glance should alert that the Rados packages are missing.

Comment 11 Sergey Gotliv 2015-05-26 07:54:09 UTC
Ken/Alfredo,

Any updates?

Comment 15 Flavio Percoco 2015-08-19 07:59:50 UTC
We've taken a different route upstream and we're re-arrenging how exra dependencies are handled.

I'll close this bug since it's not of any use downstream.