← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1367059] [NEW] When creating an image, --id option can't be set in v2 api

 

Public bug reported:

When creating an image using '--id' option in v2 api, will get an error
like this:

$ glance  --os-image-api-version 2 image-create --id
459b20d0-e0b7-4715-bbc4-58a8d23e8236 --name test2 --container-format
bare --disk-format qcow2

  File "/usr/local/lib/python2.7/dist-packages/eventlet/wsgi.py", line 433, 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 394, in __call__
    response = req.get_response(self.application)
  File "/usr/local/lib/python2.7/dist-packages/webob/request.py", line 1320, in send
    application, catch_exc_info=False)
  File "/usr/local/lib/python2.7/dist-packages/webob/request.py", line 1284, 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 "/usr/local/lib/python2.7/dist-packages/osprofiler/web.py", line 106, in __call__
    return request.get_response(self.application)
  File "/usr/local/lib/python2.7/dist-packages/webob/request.py", line 1320, in send
    application, catch_exc_info=False)
  File "/usr/local/lib/python2.7/dist-packages/webob/request.py", line 1284, in call_application
    app_iter = application(self.environ, start_response)
  File "/usr/local/lib/python2.7/dist-packages/keystonemiddleware/auth_token.py", line 570, 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 394, in __call__
    response = req.get_response(self.application)
  File "/usr/local/lib/python2.7/dist-packages/webob/request.py", line 1320, in send
    application, catch_exc_info=False)
  File "/usr/local/lib/python2.7/dist-packages/webob/request.py", line 1284, 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 394, in __call__
    response = req.get_response(self.application)
  File "/usr/local/lib/python2.7/dist-packages/webob/request.py", line 1320, in send
    application, catch_exc_info=False)
  File "/usr/local/lib/python2.7/dist-packages/webob/request.py", line 1284, 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 394, in __call__
    response = req.get_response(self.application)
  File "/usr/local/lib/python2.7/dist-packages/webob/request.py", line 1320, in send
    application, catch_exc_info=False)
  File "/usr/local/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/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/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 673, in __call__
    request, **action_args)
  File "/opt/stack/glance/glance/common/wsgi.py", line 697, in dispatch
    return method(*args, **kwargs)
  File "/opt/stack/glance/glance/common/utils.py", line 449, in wrapped
    return func(self, req, *args, **kwargs)
  File "/opt/stack/glance/glance/api/v2/images.py", line 64, in create
    tags=tags, **image)
  File "/opt/stack/glance/glance/api/authorization.py", line 189, in new_image
    return super(ImageFactoryProxy, self).new_image(owner=owner, **kwargs)
  File "/opt/stack/glance/glance/domain/proxy.py", line 114, in new_image
    return self.helper.proxy(self.base.new_image(**kwargs))
  File "/opt/stack/glance/glance/domain/proxy.py", line 114, in new_image
    return self.helper.proxy(self.base.new_image(**kwargs))
  File "/opt/stack/glance/glance/api/policy.py", line 261, in new_image
    return super(ImageFactoryProxy, self).new_image(**kwargs)
  File "/opt/stack/glance/glance/domain/proxy.py", line 114, in new_image
    return self.helper.proxy(self.base.new_image(**kwargs))
  File "/opt/stack/glance/glance/quota/__init__.py", line 127, in new_image
    return super(ImageFactoryProxy, self).new_image(tags=tags, **kwargs)
  File "/opt/stack/glance/glance/domain/proxy.py", line 114, in new_image
    return self.helper.proxy(self.base.new_image(**kwargs))
  File "/opt/stack/glance/glance/location.py", line 135, in new_image
    return super(ImageFactoryProxy, self).new_image(**kwargs)
  File "/opt/stack/glance/glance/domain/proxy.py", line 114, in new_image
    return self.helper.proxy(self.base.new_image(**kwargs))
  File "/opt/stack/glance/glance/domain/__init__.py", line 78, in new_image
    self._check_unexpected(other_args)
  File "/opt/stack/glance/glance/domain/__init__.py", line 65, in _check_unexpected
    raise TypeError(msg % kwargs.keys())
TypeError: new_image() got unexpected keywords ['id']

** Affects: glance
     Importance: Undecided
     Assignee: Haiwei Xu (xu-haiwei)
         Status: In Progress

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

Title:
  When creating an image, --id option can't be set in v2 api

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

Bug description:
  When creating an image using '--id' option in v2 api, will get an
  error like this:

  $ glance  --os-image-api-version 2 image-create --id
  459b20d0-e0b7-4715-bbc4-58a8d23e8236 --name test2 --container-format
  bare --disk-format qcow2

    File "/usr/local/lib/python2.7/dist-packages/eventlet/wsgi.py", line 433, 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 394, in __call__
      response = req.get_response(self.application)
    File "/usr/local/lib/python2.7/dist-packages/webob/request.py", line 1320, in send
      application, catch_exc_info=False)
    File "/usr/local/lib/python2.7/dist-packages/webob/request.py", line 1284, 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 "/usr/local/lib/python2.7/dist-packages/osprofiler/web.py", line 106, in __call__
      return request.get_response(self.application)
    File "/usr/local/lib/python2.7/dist-packages/webob/request.py", line 1320, in send
      application, catch_exc_info=False)
    File "/usr/local/lib/python2.7/dist-packages/webob/request.py", line 1284, in call_application
      app_iter = application(self.environ, start_response)
    File "/usr/local/lib/python2.7/dist-packages/keystonemiddleware/auth_token.py", line 570, 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 394, in __call__
      response = req.get_response(self.application)
    File "/usr/local/lib/python2.7/dist-packages/webob/request.py", line 1320, in send
      application, catch_exc_info=False)
    File "/usr/local/lib/python2.7/dist-packages/webob/request.py", line 1284, 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 394, in __call__
      response = req.get_response(self.application)
    File "/usr/local/lib/python2.7/dist-packages/webob/request.py", line 1320, in send
      application, catch_exc_info=False)
    File "/usr/local/lib/python2.7/dist-packages/webob/request.py", line 1284, 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 394, in __call__
      response = req.get_response(self.application)
    File "/usr/local/lib/python2.7/dist-packages/webob/request.py", line 1320, in send
      application, catch_exc_info=False)
    File "/usr/local/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/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/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 673, in __call__
      request, **action_args)
    File "/opt/stack/glance/glance/common/wsgi.py", line 697, in dispatch
      return method(*args, **kwargs)
    File "/opt/stack/glance/glance/common/utils.py", line 449, in wrapped
      return func(self, req, *args, **kwargs)
    File "/opt/stack/glance/glance/api/v2/images.py", line 64, in create
      tags=tags, **image)
    File "/opt/stack/glance/glance/api/authorization.py", line 189, in new_image
      return super(ImageFactoryProxy, self).new_image(owner=owner, **kwargs)
    File "/opt/stack/glance/glance/domain/proxy.py", line 114, in new_image
      return self.helper.proxy(self.base.new_image(**kwargs))
    File "/opt/stack/glance/glance/domain/proxy.py", line 114, in new_image
      return self.helper.proxy(self.base.new_image(**kwargs))
    File "/opt/stack/glance/glance/api/policy.py", line 261, in new_image
      return super(ImageFactoryProxy, self).new_image(**kwargs)
    File "/opt/stack/glance/glance/domain/proxy.py", line 114, in new_image
      return self.helper.proxy(self.base.new_image(**kwargs))
    File "/opt/stack/glance/glance/quota/__init__.py", line 127, in new_image
      return super(ImageFactoryProxy, self).new_image(tags=tags, **kwargs)
    File "/opt/stack/glance/glance/domain/proxy.py", line 114, in new_image
      return self.helper.proxy(self.base.new_image(**kwargs))
    File "/opt/stack/glance/glance/location.py", line 135, in new_image
      return super(ImageFactoryProxy, self).new_image(**kwargs)
    File "/opt/stack/glance/glance/domain/proxy.py", line 114, in new_image
      return self.helper.proxy(self.base.new_image(**kwargs))
    File "/opt/stack/glance/glance/domain/__init__.py", line 78, in new_image
      self._check_unexpected(other_args)
    File "/opt/stack/glance/glance/domain/__init__.py", line 65, in _check_unexpected
      raise TypeError(msg % kwargs.keys())
  TypeError: new_image() got unexpected keywords ['id']

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


Follow ups

References