← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1393958] [NEW] VMware: HTTPInternalServerError (HTTP 500) using --location vsphere://

 

Public bug reported:

If I run the following command to create a new image using glance CLI,
the glance API server will throw a 500 error and exception in the logs.
Looks like the code needs to be more robust on handling junk in the URI.

glance image-create --location "vsphere://10.1.1.1/folder/images
/openstack-template/openstack-template.vmdk"

I think this occurs because I did not include ?dcpath=Datacenter/&dsName
in the URI

2014-11-18 21:59:05.266 11866 INFO glance.wsgi.server [1dd339bd-bb0d-4ae1-a6cc-b3abc64a0644 3380f60eedc54f6eab23ed465b57b24c acbc0289cb974fee9e96e22674b7847f - - -] Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/eventlet/wsgi.py", line 384, in handle_one_response
    result = self.application(self.environ, start_response)
  File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 130, in __call__
    resp = self.call_func(req, *args, **self.kwargs)
  File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 195, in call_func
    return self.func(req, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/glance/common/wsgi.py", line 378, in __call__
    response = req.get_response(self.application)
  File "/usr/lib/python2.7/dist-packages/webob/request.py", line 1320, in send
    application, catch_exc_info=False)
  File "/usr/lib/python2.7/dist-packages/webob/request.py", line 1284, in call_application
    app_iter = application(self.environ, start_response)
  File "/usr/lib/python2.7/dist-packages/keystoneclient/middleware/auth_token.py", line 582, in __call__
    return self.app(env, start_response)
  File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 130, in __call__
    resp = self.call_func(req, *args, **self.kwargs)
  File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 195, in call_func
    return self.func(req, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/glance/common/wsgi.py", line 378, in __call__
    response = req.get_response(self.application)
  File "/usr/lib/python2.7/dist-packages/webob/request.py", line 1320, in send
    application, catch_exc_info=False)
  File "/usr/lib/python2.7/dist-packages/webob/request.py", line 1284, in call_application
    app_iter = application(self.environ, start_response)
  File "/usr/lib/python2.7/dist-packages/paste/urlmap.py", line 206, in __call__
    return app(environ, start_response)
  File "/usr/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/lib/python2.7/dist-packages/webob/dec.py", line 144, in __call__
    return resp(environ, start_response)
  File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 130, in __call__
    resp = self.call_func(req, *args, **self.kwargs)
  File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 195, in call_func
    return self.func(req, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/glance/common/wsgi.py", line 644, in __call__
    request, **action_args)
  File "/usr/lib/python2.7/dist-packages/glance/common/wsgi.py", line 668, in dispatch
    return method(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/glance/common/utils.py", line 438, in wrapped
    return func(self, req, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/glance/api/v1/images.py", line 795, in create
    image_meta = self._reserve(req, image_meta)
  File "/usr/lib/python2.7/dist-packages/glance/api/v1/images.py", line 504, in _reserve
    store = get_store_from_location(location)
  File "/usr/lib/python2.7/dist-packages/glance/store/__init__.py", line 314, in get_store_from_location
    loc = location.get_location_from_uri(uri)
  File "/usr/lib/python2.7/dist-packages/glance/store/location.py", line 75, in get_location_from_uri
    store_location_class=scheme_info['location_class'])
  File "/usr/lib/python2.7/dist-packages/glance/store/location.py", line 116, in __init__
    self.store_location.parse_uri(uri)
  File "/usr/lib/python2.7/dist-packages/glance/store/vmware_datastore.py", line 398, in parse_uri
    self.query = path[1]
IndexError: list index out of range

** Affects: glance
     Importance: Undecided
         Status: New


** Tags: vmware

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

Title:
  VMware: HTTPInternalServerError (HTTP 500) using --location vsphere://

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

Bug description:
  If I run the following command to create a new image using glance CLI,
  the glance API server will throw a 500 error and exception in the
  logs.  Looks like the code needs to be more robust on handling junk in
  the URI.

  glance image-create --location "vsphere://10.1.1.1/folder/images
  /openstack-template/openstack-template.vmdk"

  I think this occurs because I did not include
  ?dcpath=Datacenter/&dsName in the URI

  2014-11-18 21:59:05.266 11866 INFO glance.wsgi.server [1dd339bd-bb0d-4ae1-a6cc-b3abc64a0644 3380f60eedc54f6eab23ed465b57b24c acbc0289cb974fee9e96e22674b7847f - - -] Traceback (most recent call last):
    File "/usr/lib/python2.7/dist-packages/eventlet/wsgi.py", line 384, in handle_one_response
      result = self.application(self.environ, start_response)
    File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 130, in __call__
      resp = self.call_func(req, *args, **self.kwargs)
    File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 195, in call_func
      return self.func(req, *args, **kwargs)
    File "/usr/lib/python2.7/dist-packages/glance/common/wsgi.py", line 378, in __call__
      response = req.get_response(self.application)
    File "/usr/lib/python2.7/dist-packages/webob/request.py", line 1320, in send
      application, catch_exc_info=False)
    File "/usr/lib/python2.7/dist-packages/webob/request.py", line 1284, in call_application
      app_iter = application(self.environ, start_response)
    File "/usr/lib/python2.7/dist-packages/keystoneclient/middleware/auth_token.py", line 582, in __call__
      return self.app(env, start_response)
    File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 130, in __call__
      resp = self.call_func(req, *args, **self.kwargs)
    File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 195, in call_func
      return self.func(req, *args, **kwargs)
    File "/usr/lib/python2.7/dist-packages/glance/common/wsgi.py", line 378, in __call__
      response = req.get_response(self.application)
    File "/usr/lib/python2.7/dist-packages/webob/request.py", line 1320, in send
      application, catch_exc_info=False)
    File "/usr/lib/python2.7/dist-packages/webob/request.py", line 1284, in call_application
      app_iter = application(self.environ, start_response)
    File "/usr/lib/python2.7/dist-packages/paste/urlmap.py", line 206, in __call__
      return app(environ, start_response)
    File "/usr/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/lib/python2.7/dist-packages/webob/dec.py", line 144, in __call__
      return resp(environ, start_response)
    File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 130, in __call__
      resp = self.call_func(req, *args, **self.kwargs)
    File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 195, in call_func
      return self.func(req, *args, **kwargs)
    File "/usr/lib/python2.7/dist-packages/glance/common/wsgi.py", line 644, in __call__
      request, **action_args)
    File "/usr/lib/python2.7/dist-packages/glance/common/wsgi.py", line 668, in dispatch
      return method(*args, **kwargs)
    File "/usr/lib/python2.7/dist-packages/glance/common/utils.py", line 438, in wrapped
      return func(self, req, *args, **kwargs)
    File "/usr/lib/python2.7/dist-packages/glance/api/v1/images.py", line 795, in create
      image_meta = self._reserve(req, image_meta)
    File "/usr/lib/python2.7/dist-packages/glance/api/v1/images.py", line 504, in _reserve
      store = get_store_from_location(location)
    File "/usr/lib/python2.7/dist-packages/glance/store/__init__.py", line 314, in get_store_from_location
      loc = location.get_location_from_uri(uri)
    File "/usr/lib/python2.7/dist-packages/glance/store/location.py", line 75, in get_location_from_uri
      store_location_class=scheme_info['location_class'])
    File "/usr/lib/python2.7/dist-packages/glance/store/location.py", line 116, in __init__
      self.store_location.parse_uri(uri)
    File "/usr/lib/python2.7/dist-packages/glance/store/vmware_datastore.py", line 398, in parse_uri
      self.query = path[1]
  IndexError: list index out of range

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


Follow ups

References