← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1242734] Re: Error message encoding issue when using qpid

 

** Changed in: glance/havana
       Status: Fix Committed => Fix Released

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

Title:
  Error message encoding issue when using qpid

Status in OpenStack Image Registry and Delivery Service (Glance):
  Fix Released
Status in Glance havana series:
  Fix Released

Bug description:
  When I was trying to create a new image to recreate the storage full
  exception, I got 500 error code instead of 413. And I see below trace
  in log. Seems we need to call jsonutils.to_primitive to make the
  message can be encoded.

  2013-10-15 05:18:18.623 2430 ERROR glance.api.v1.upload_utils [b256bf1b-81e4-41b1-b89a-0a6bcb58b5ab 396ce5f3575a43abb636c489a959bf16 29db386367fa4c4e9ffb3c369a46ee90] Image storage media is full: There is not enough disk space on the image storage media.
  2013-10-15 05:18:18.691 2430 ERROR glance.notifier.notify_qpid [b256bf1b-81e4-41b1-b89a-0a6bcb58b5ab 396ce5f3575a43abb636c489a959bf16 29db386367fa4c4e9ffb3c369a46ee90] Notification error.  Priority: error Message: {'event_type': 'image.upload', 'timestamp': '2013-10-15 10:18:18.662667', 'message_id': 'b74ec17a-06ac-45b8-84c3-37a55af8dfe1', 'priority': 'ERROR', 'publisher_id': 'yangj228', 'payload': u'Image storage media is full: There is not enough disk space on the image storage media.'}
  2013-10-15 05:18:18.691 2430 TRACE glance.notifier.notify_qpid Traceback (most recent call last):
  2013-10-15 05:18:18.691 2430 TRACE glance.notifier.notify_qpid   File "/usr/lib/python2.6/site-packages/glance/notifier/notify_qpid.py", line 134, in _send
  2013-10-15 05:18:18.691 2430 TRACE glance.notifier.notify_qpid     sender.send(qpid_msg)
  2013-10-15 05:18:18.691 2430 TRACE glance.notifier.notify_qpid   File "<string>", line 6, in send
  2013-10-15 05:18:18.691 2430 TRACE glance.notifier.notify_qpid   File "/usr/lib/python2.6/site-packages/qpid/messaging/endpoints.py", line 879, in send
  2013-10-15 05:18:18.691 2430 TRACE glance.notifier.notify_qpid     self.sync(timeout=timeout)
  2013-10-15 05:18:18.691 2430 TRACE glance.notifier.notify_qpid   File "<string>", line 6, in sync
  2013-10-15 05:18:18.691 2430 TRACE glance.notifier.notify_qpid   File "/usr/lib/python2.6/site-packages/qpid/messaging/endpoints.py", line 890, in sync
  2013-10-15 05:18:18.691 2430 TRACE glance.notifier.notify_qpid     if not self._ewait(lambda: self.acked >= mno, timeout=timeout):
  2013-10-15 05:18:18.691 2430 TRACE glance.notifier.notify_qpid   File "/usr/lib/python2.6/site-packages/qpid/messaging/endpoints.py", line 804, in _ewait
  2013-10-15 05:18:18.691 2430 TRACE glance.notifier.notify_qpid     result = self.session._ewait(lambda: self.error or predicate(), timeout)
  2013-10-15 05:18:18.691 2430 TRACE glance.notifier.notify_qpid   File "/usr/lib/python2.6/site-packages/qpid/messaging/endpoints.py", line 571, in _ewait
  2013-10-15 05:18:18.691 2430 TRACE glance.notifier.notify_qpid     result = self.connection._ewait(lambda: self.error or predicate(), timeout)
  2013-10-15 05:18:18.691 2430 TRACE glance.notifier.notify_qpid   File "/usr/lib/python2.6/site-packages/qpid/messaging/endpoints.py", line 214, in _ewait
  2013-10-15 05:18:18.691 2430 TRACE glance.notifier.notify_qpid     self.check_error()
  2013-10-15 05:18:18.691 2430 TRACE glance.notifier.notify_qpid   File "/usr/lib/python2.6/site-packages/qpid/messaging/endpoints.py", line 207, in check_error
  2013-10-15 05:18:18.691 2430 TRACE glance.notifier.notify_qpid     raise self.error
  2013-10-15 05:18:18.691 2430 TRACE glance.notifier.notify_qpid InternalError: Traceback (most recent call last):
  2013-10-15 05:18:18.691 2430 TRACE glance.notifier.notify_qpid   File "/usr/lib/python2.6/site-packages/qpid/messaging/driver.py", line 497, in dispatch
  2013-10-15 05:18:18.691 2430 TRACE glance.notifier.notify_qpid     self.engine.dispatch()
  2013-10-15 05:18:18.691 2430 TRACE glance.notifier.notify_qpid   File "/usr/lib/python2.6/site-packages/qpid/messaging/driver.py", line 802, in dispatch
  2013-10-15 05:18:18.691 2430 TRACE glance.notifier.notify_qpid     self.process(ssn)
  2013-10-15 05:18:18.691 2430 TRACE glance.notifier.notify_qpid   File "/usr/lib/python2.6/site-packages/qpid/messaging/driver.py", line 1037, in process
  2013-10-15 05:18:18.691 2430 TRACE glance.notifier.notify_qpid     self.send(snd, msg)
  2013-10-15 05:18:18.691 2430 TRACE glance.notifier.notify_qpid   File "/usr/lib/python2.6/site-packages/qpid/messaging/driver.py", line 1248, in send
  2013-10-15 05:18:18.691 2430 TRACE glance.notifier.notify_qpid     body = enc(msg.content)
  2013-10-15 05:18:18.691 2430 TRACE glance.notifier.notify_qpid   File "/usr/lib/python2.6/site-packages/qpid/messaging/message.py", line 28, in encode
  2013-10-15 05:18:18.691 2430 TRACE glance.notifier.notify_qpid     sc.write_primitive(type, x)
  2013-10-15 05:18:18.691 2430 TRACE glance.notifier.notify_qpid   File "/usr/lib/python2.6/site-packages/qpid/codec010.py", line 73, in write_primitive
  2013-10-15 05:18:18.691 2430 TRACE glance.notifier.notify_qpid     getattr(self, "write_%s" % type.NAME)(v)
  2013-10-15 05:18:18.691 2430 TRACE glance.notifier.notify_qpid   File "/usr/lib/python2.6/site-packages/qpid/codec010.py", line 257, in write_map
  2013-10-15 05:18:18.691 2430 TRACE glance.notifier.notify_qpid     sc.write(string.joinfields(map(self._write_map_elem, m.keys(), m.values()), ""))
  2013-10-15 05:18:18.691 2430 TRACE glance.notifier.notify_qpid   File "/usr/lib/python2.6/site-packages/qpid/codec010.py", line 246, in _write_map_elem
  2013-10-15 05:18:18.691 2430 TRACE glance.notifier.notify_qpid     type = self.encoding(v)
  2013-10-15 05:18:18.691 2430 TRACE glance.notifier.notify_qpid   File "/usr/lib/python2.6/site-packages/qpid/codec010.py", line 59, in encoding
  2013-10-15 05:18:18.691 2430 TRACE glance.notifier.notify_qpid     raise CodecException("no encoding for %r" % obj)
  2013-10-15 05:18:18.691 2430 TRACE glance.notifier.notify_qpid CodecException: no encoding for u'Image storage media is full: There is not enough disk space on the image storage media.'
  2013-10-15 05:18:18.691 2430 TRACE glance.notifier.notify_qpid
  2013-10-15 05:18:18.691 2430 TRACE glance.notifier.notify_qpid

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