← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1602715] Re: If barbicanclient does not exist causes 500

 

** Changed in: glance
       Status: New => Invalid

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to Glance.
https://bugs.launchpad.net/bugs/1602715

Title:
  If barbicanclient does not exist causes 500

Status in Glance:
  Invalid

Bug description:
  2016-07-13 09:26:03.602 28677 ERROR glance.api.v2.image_data Traceback (most recent call last):
  2016-07-13 09:26:03.602 28677 ERROR glance.api.v2.image_data   File "/opt/stack/venv/glance-20160712T142933Z/lib/python2.7/site-packages/glance/api/v2/image_data.py", line 114, in upload
  2016-07-13 09:26:03.602 28677 ERROR glance.api.v2.image_data     image.set_data(data, size)
  2016-07-13 09:26:03.602 28677 ERROR glance.api.v2.image_data   File "/opt/stack/venv/glance-20160712T142933Z/lib/python2.7/site-packages/glance/domain/proxy.py", line 195, in set_data
  2016-07-13 09:26:03.602 28677 ERROR glance.api.v2.image_data     self.base.set_data(data, size)
  2016-07-13 09:26:03.602 28677 ERROR glance.api.v2.image_data   File "/opt/stack/venv/glance-20160712T142933Z/lib/python2.7/site-packages/glance/notifier.py", line 449, in set_data
  2016-07-13 09:26:03.602 28677 ERROR glance.api.v2.image_data     _send_notification(notify_error, 'image.upload', msg)
  2016-07-13 09:26:03.602 28677 ERROR glance.api.v2.image_data   File "/opt/stack/venv/glance-20160712T142933Z/lib/python2.7/site-packages/oslo_utils/excutils.py", line 220, in __exit__
  2016-07-13 09:26:03.602 28677 ERROR glance.api.v2.image_data     self.force_reraise()
  2016-07-13 09:26:03.602 28677 ERROR glance.api.v2.image_data   File "/opt/stack/venv/glance-20160712T142933Z/lib/python2.7/site-packages/oslo_utils/excutils.py", line 196, in force_reraise
  2016-07-13 09:26:03.602 28677 ERROR glance.api.v2.image_data     six.reraise(self.type_, self.value, self.tb)
  2016-07-13 09:26:03.602 28677 ERROR glance.api.v2.image_data   File "/opt/stack/venv/glance-20160712T142933Z/lib/python2.7/site-packages/glance/notifier.py", line 396, in set_data
  2016-07-13 09:26:03.602 28677 ERROR glance.api.v2.image_data     self.repo.set_data(data, size)
  2016-07-13 09:26:03.602 28677 ERROR glance.api.v2.image_data   File "/opt/stack/venv/glance-20160712T142933Z/lib/python2.7/site-packages/glance/api/policy.py", line 192, in set_data
  2016-07-13 09:26:03.602 28677 ERROR glance.api.v2.image_data     return self.image.set_data(*args, **kwargs)
  2016-07-13 09:26:03.602 28677 ERROR glance.api.v2.image_data   File "/opt/stack/venv/glance-20160712T142933Z/lib/python2.7/site-packages/glance/quota/__init__.py", line 298, in set_data
  2016-07-13 09:26:03.602 28677 ERROR glance.api.v2.image_data     self.image.set_data(data, size=size)
  2016-07-13 09:26:03.602 28677 ERROR glance.api.v2.image_data   File "/opt/stack/venv/glance-20160712T142933Z/lib/python2.7/site-packages/glance/location.py", line 415, in set_data
  2016-07-13 09:26:03.602 28677 ERROR glance.api.v2.image_data     self.context, self.image.extra_properties)
  2016-07-13 09:26:03.602 28677 ERROR glance.api.v2.image_data   File "/opt/stack/venv/glance-20160712T142933Z/lib/python2.7/site-packages/glance/common/signature_utils.py", line 271, in get_verifier
  2016-07-13 09:26:03.602 28677 ERROR glance.api.v2.image_data     signature_key_type)
  2016-07-13 09:26:03.602 28677 ERROR glance.api.v2.image_data   File "/opt/stack/venv/glance-20160712T142933Z/lib/python2.7/site-packages/glance/common/signature_utils.py", line 427, in get_public_key
  2016-07-13 09:26:03.602 28677 ERROR glance.api.v2.image_data     certificate = get_certificate(context, signature_certificate_uuid)
  2016-07-13 09:26:03.602 28677 ERROR glance.api.v2.image_data   File "/opt/stack/venv/glance-20160712T142933Z/lib/python2.7/site-packages/glance/common/signature_utils.py", line 453, in get_certificate
  2016-07-13 09:26:03.602 28677 ERROR glance.api.v2.image_data     keymgr_api = key_manager.API()
  2016-07-13 09:26:03.602 28677 ERROR glance.api.v2.image_data   File "/opt/stack/venv/glance-20160712T142933Z/lib/python2.7/site-packages/castellan/key_manager/__init__.py", line 30, in API
  2016-07-13 09:26:03.602 28677 ERROR glance.api.v2.image_data     cls = importutils.import_class(conf.key_manager.api_class)
  2016-07-13 09:26:03.602 28677 ERROR glance.api.v2.image_data   File "/opt/stack/venv/glance-20160712T142933Z/lib/python2.7/site-packages/oslo_utils/importutils.py", line 30, in import_class
  2016-07-13 09:26:03.602 28677 ERROR glance.api.v2.image_data     __import__(mod_str)
  2016-07-13 09:26:03.602 28677 ERROR glance.api.v2.image_data   File "/opt/stack/venv/glance-20160712T142933Z/lib/python2.7/site-packages/castellan/key_manager/barbican_key_manager.py", line 42, in <module>
  2016-07-13 09:26:03.602 28677 ERROR glance.api.v2.image_data     from barbicanclient import client as barbican_client
  2016-07-13 09:26:03.602 28677 ERROR glance.api.v2.image_data ImportError: No module named barbicanclient

  
  This should be caught rather than throwing a 500 error.

To manage notifications about this bug go to:
https://bugs.launchpad.net/glance/+bug/1602715/+subscriptions


References