Glance depends on swift client

Bug #1537130 reported by Matt Kassawara
18
This bug affects 4 people
Affects Status Importance Assigned to Milestone
glance_store
Incomplete
Undecided
Unassigned
glance (Ubuntu)
Triaged
Medium
Unassigned
python-glance-store (Ubuntu)
Triaged
Medium
Unassigned

Bug Description

Using the cloud archive repository for Liberty, the glance-api service (2:11.0.0-0ubuntu1~cloud0) appears to depend on the swift client regardless of whether or not the glance configuration uses the swift back-end.

ERROR stevedore.extension [-] Could not load 'glance.store.swift.Store': No module named swiftclient
ERROR stevedore.extension [-] No module named swiftclient
ERROR stevedore.extension Traceback (most recent call last):
ERROR stevedore.extension File "/usr/lib/python2.7/dist-packages/stevedore/extension.py", line 162, in _load_plugins
ERROR stevedore.extension verify_requirements,
ERROR stevedore.extension File "/usr/lib/python2.7/dist-packages/stevedore/extension.py", line 183, in _load_one_plugin
ERROR stevedore.extension plugin = ep.resolve()
ERROR stevedore.extension File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 2361, in resolve
ERROR stevedore.extension module = __import__(self.module_name, fromlist=['__name__'], level=0)
ERROR stevedore.extension File "/usr/lib/python2.7/dist-packages/glance_store/_drivers/swift/__init__.py", line 17, in <module>
ERROR stevedore.extension from glance_store._drivers.swift.store import * # noqa
ERROR stevedore.extension File "/usr/lib/python2.7/dist-packages/glance_store/_drivers/swift/store.py", line 28, in <module>
ERROR stevedore.extension import swiftclient
ERROR stevedore.extension ImportError: No module named swiftclient
ERROR stevedore.extension
ERROR stevedore.extension [-] Could not load 'swift': cannot import name utils
ERROR stevedore.extension [-] cannot import name utils
ERROR stevedore.extension Traceback (most recent call last):
ERROR stevedore.extension File "/usr/lib/python2.7/dist-packages/stevedore/extension.py", line 162, in _load_plugins
ERROR stevedore.extension verify_requirements,
ERROR stevedore.extension File "/usr/lib/python2.7/dist-packages/stevedore/extension.py", line 183, in _load_one_plugin
ERROR stevedore.extension plugin = ep.resolve()
ERROR stevedore.extension File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 2361, in resolve
ERROR stevedore.extension module = __import__(self.module_name, fromlist=['__name__'], level=0)
ERROR stevedore.extension File "/usr/lib/python2.7/dist-packages/glance_store/_drivers/swift/__init__.py", line 16, in <module>
ERROR stevedore.extension from glance_store._drivers.swift import utils # noqa
ERROR stevedore.extension ImportError: cannot import name utils
ERROR stevedore.extension

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in glance (Ubuntu):
status: New → Confirmed
Revision history for this message
Alejandro Comisario (alejandro-f) wrote :

amazing, but true

Revision history for this message
Corey Bryant (corey.bryant) wrote :

Looking at the upstream code for glance_store stable/liberty (https://github.com/openstack/glance_store) there are optional dependencies listed in setup.cfg [extras], which include swiftclient. It looks like these need to be added to the package's debian/control Suggests or Depends section for glance_store. Typically we determine package dependencies based on the upstream (test-)requirements.txt, so I think this is a gap in where we're looking for upstream dependencies.

  55 [extras]
  56 # Dependencies for each of the optional stores
  57 s3 =
  58 boto>=2.32.1
  59 vmware =
  60 oslo.vmware>=1.16.0 # Apache-2.0
  61 swift =
  62 httplib2>=0.7.5
  63 python-swiftclient>=2.2.0,<3.0.0
  64 gridfs =
  65 pymongo>=3.0.2
  66 cinder =
  67 python-cinderclient>=1.3.1

Changed in glance (Ubuntu):
status: Confirmed → Triaged
importance: Undecided → Medium
Changed in python-glance-store (Ubuntu):
status: New → Triaged
importance: Undecided → Medium
Revision history for this message
Corey Bryant (corey.bryant) wrote :

After further consultation these should be added to debian/control Suggests since they are optional dependencies.

Revision history for this message
Corey Bryant (corey.bryant) wrote :

Matt, I'm going to also target this bug at upstream also since you're saying that you're not using the swift backend but the glance_store code is using the swift driver.

Revision history for this message
Ian Cordasco (icordasc) wrote :

Matt, what does your Glance configuration file look like?

affects: glance → glance-store
Changed in glance-store:
status: New → Incomplete
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.