← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1279446] [NEW] Glance image create should handle invalid location more gracefully.

 

Public bug reported:

On trying to create an image with invalid location uri, the following is the error message.
HTTPInternalServerError (HTTP 500)

This is not very informative. While it should be ideally 400 bad
request.

  File "/opt/stack/glance/glance/store/__init__.py", line 273, in get_size_from_backend
    return store.get_size(loc)
  File "/opt/stack/glance/glance/store/swift.py", line 355, in get_size
    connection = self.get_connection(location)
  File "/opt/stack/glance/glance/store/swift.py", line 612, in get_connection
    raise exception.BadStoreUri(message=reason)
BadStoreUri: Location is missing user:password information.

** Affects: glance
     Importance: Undecided
         Status: New

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

Title:
  Glance image create should handle invalid location more gracefully.

Status in OpenStack Image Registry and Delivery Service (Glance):
  New

Bug description:
  On trying to create an image with invalid location uri, the following is the error message.
  HTTPInternalServerError (HTTP 500)

  This is not very informative. While it should be ideally 400 bad
  request.

    File "/opt/stack/glance/glance/store/__init__.py", line 273, in get_size_from_backend
      return store.get_size(loc)
    File "/opt/stack/glance/glance/store/swift.py", line 355, in get_size
      connection = self.get_connection(location)
    File "/opt/stack/glance/glance/store/swift.py", line 612, in get_connection
      raise exception.BadStoreUri(message=reason)
  BadStoreUri: Location is missing user:password information.

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


Follow ups

References