Updating an image with malformed location returns E500

Bug #1205015 reported by Stuart McLaren
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Glance
Confirmed
Undecided
Unassigned

Bug Description

$ glance image-create --name s1
+------------------+--------------------------------------+
| Property | Value |
+------------------+--------------------------------------+
| checksum | None |
| container_format | None |
| created_at | 2013-07-25T17:07:55 |
| deleted | False |
| deleted_at | None |
| disk_format | None |
| id | 9815e880-c053-448e-8d43-a13cdff01188 |
| is_public | False |
| min_disk | 0 |
| min_ram | 0 |
| name | s1 |
| owner | ecc4670241e842c991b8737802468e20 |
| protected | False |
| size | 0 |
| status | queued |
| updated_at | 2013-07-25T17:07:55 |
+------------------+--------------------------------------+

$ glance image-update 9815e880-c053-448e-8d43-a13cdff01188 --location 'swift://account:<email address hidden>/container/obj' --container-format bare --disk-format qcow2
Request returned failure status.
HTTPInternalServerError (HTTP 500)

Stacktrace:

4841 DEBUG eventlet.wsgi.server [ae3b8562-b22e-48b0-8f00-1db664ae28c2 f0e4d56b80ad49e8970f9ffed80e2b1f ecc4670241e842c991b8737802468e20] Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/eventlet/wsgi.py", line 384, in handle_one_response
    result = self.application(self.environ, start_response)
  File "/usr/local/lib/python2.7/dist-packages/webob/dec.py", line 130, in __call__
    resp = self.call_func(req, *args, **self.kwargs)
  File "/usr/local/lib/python2.7/dist-packages/webob/dec.py", line 195, in call_func
    return self.func(req, *args, **kwargs)
  File "/opt/stack/glance/glance/common/wsgi.py", line 377, in __call__
    response = req.get_response(self.application)
  File "/usr/local/lib/python2.7/dist-packages/webob/request.py", line 1296, in send
    application, catch_exc_info=False)
  File "/usr/local/lib/python2.7/dist-packages/webob/request.py", line 1260, in call_application
    app_iter = application(self.environ, start_response)
  File "/opt/stack/python-keystoneclient/keystoneclient/middleware/auth_token.py", line 461, in __call__
    return self.app(env, start_response)
  File "/usr/local/lib/python2.7/dist-packages/webob/dec.py", line 130, in __call__
    resp = self.call_func(req, *args, **self.kwargs)
  File "/usr/local/lib/python2.7/dist-packages/webob/dec.py", line 195, in call_func
    return self.func(req, *args, **kwargs)
  File "/opt/stack/glance/glance/common/wsgi.py", line 377, in __call__
    response = req.get_response(self.application)
  File "/usr/local/lib/python2.7/dist-packages/webob/request.py", line 1296, in send
    application, catch_exc_info=False)
  File "/usr/local/lib/python2.7/dist-packages/webob/request.py", line 1260, in call_application
    app_iter = application(self.environ, start_response)
  File "/usr/local/lib/python2.7/dist-packages/webob/dec.py", line 130, in __call__
    resp = self.call_func(req, *args, **self.kwargs)
  File "/usr/local/lib/python2.7/dist-packages/webob/dec.py", line 195, in call_func
    return self.func(req, *args, **kwargs)
  File "/opt/stack/glance/glance/common/wsgi.py", line 377, in __call__
    response = req.get_response(self.application)
  File "/usr/local/lib/python2.7/dist-packages/webob/request.py", line 1296, in send
    application, catch_exc_info=False)
  File "/usr/local/lib/python2.7/dist-packages/webob/request.py", line 1260, in call_application
    app_iter = application(self.environ, start_response)
  File "/usr/local/lib/python2.7/dist-packages/webob/dec.py", line 130, in __call__
    resp = self.call_func(req, *args, **self.kwargs)
  File "/usr/local/lib/python2.7/dist-packages/webob/dec.py", line 195, in call_func
    return self.func(req, *args, **kwargs)
  File "/opt/stack/glance/glance/common/wsgi.py", line 377, in __call__
    response = req.get_response(self.application)
  File "/usr/local/lib/python2.7/dist-packages/webob/request.py", line 1296, in send
    application, catch_exc_info=False)
  File "/usr/local/lib/python2.7/dist-packages/webob/request.py", line 1260, in call_application
    app_iter = application(self.environ, start_response)
  File "/usr/lib/python2.7/dist-packages/paste/urlmap.py", line 203, in __call__
    return app(environ, start_response)
  File "/usr/local/lib/python2.7/dist-packages/webob/dec.py", line 144, in __call__
    return resp(environ, start_response)
  File "/usr/lib/python2.7/dist-packages/routes/middleware.py", line 131, in __call__
    response = self.app(environ, start_response)
  File "/usr/local/lib/python2.7/dist-packages/webob/dec.py", line 144, in __call__
    return resp(environ, start_response)
  File "/usr/local/lib/python2.7/dist-packages/webob/dec.py", line 130, in __call__
    resp = self.call_func(req, *args, **self.kwargs)
  File "/usr/local/lib/python2.7/dist-packages/webob/dec.py", line 195, in call_func
    return self.func(req, *args, **kwargs)
  File "/opt/stack/glance/glance/common/wsgi.py", line 606, in __call__
    request, **action_args)
  File "/opt/stack/glance/glance/common/wsgi.py", line 623, in dispatch
    return method(*args, **kwargs)
  File "/opt/stack/glance/glance/common/utils.py", line 407, in wrapped
    return func(self, req, *args, **kwargs)
  File "/opt/stack/glance/glance/api/v1/images.py", line 681, in update
    location)
  File "/opt/stack/glance/glance/api/v1/images.py", line 511, in _get_size
    location)
  File "/opt/stack/glance/glance/store/__init__.py", line 242, in get_size_from_backend
    return store.get_size(loc)
  File "/opt/stack/glance/glance/store/swift.py", line 296, in get_size
    connection = self.get_connection(location)
  File "/opt/stack/glance/glance/store/swift.py", line 559, in get_connection
    raise exception.BadStoreUri()
BadStoreUri: The Store URI was malformed.

Revision history for this message
Feilong Wang (flwang) wrote :

I can recreate this 500 error. But what's the expected result? 400?

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