← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1169560] Re: image creation causes stacktrace

 

** Changed in: nova/grizzly
       Status: Fix Committed => Fix Released

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1169560

Title:
  image creation causes stacktrace

Status in OpenStack Compute (Nova):
  Fix Committed
Status in OpenStack Compute (nova) grizzly series:
  Fix Released

Bug description:
  From a tempest test test_create_image_specify_name_over_256_chars when creating an image with 
  a name which is too long it causes a stacktrace in the logs because the exception from glance is 
  not caught. Though the end result is ok as the uncaught exception is still a 400 Bad Request.

  x-openstack-request-id: req-b9f7a737-6692-4d02-8101-cecce2f5b341

  400 Bad Request

  Image name too long: 269


  2013-04-16 17:10:37    ERROR [glanceclient.common.http] Request returned failure status.
  2013-04-16 17:10:37    ERROR [nova.api.openstack] Caught error: 400 Bad Request
  Image name too long: 269
      (HTTP 400)
  Traceback (most recent call last):
    File "/srv/compile/openstack/nova/nova/api/openstack/__init__.py", line 81, in __call__
      return 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 144, in __call__
      return resp(environ, start_response)
    File "/opt/stack/python-keystoneclient/keystoneclient/middleware/auth_token.py", line 451, in __call__
      return self.app(env, 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 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 "/srv/compile/openstack/nova/nova/api/openstack/wsgi.py", line 899, in __call__
      content_type, body, accept)
    File "/srv/compile/openstack/nova/nova/api/openstack/wsgi.py", line 951, in _process_stack
      action_result = self.dispatch(meth, request, action_args)
    File "/srv/compile/openstack/nova/nova/api/openstack/wsgi.py", line 1030, in dispatch
      return method(req=request, **action_args)   
    File "/srv/compile/openstack/nova/nova/api/openstack/common.py", line 448, in inner
      return f(*args, **kwargs)
    File "/srv/compile/openstack/nova/nova/api/openstack/compute/servers.py", line 1365, in _action_create_image
      extra_properties=props)
    File "/srv/compile/openstack/nova/nova/compute/api.py", line 167, in wrapped
      return func(self, context, target, *args, **kwargs)
    File "/srv/compile/openstack/nova/nova/compute/api.py", line 138, in inner
      return f(self, context, instance, *args, **kw)
    File "/srv/compile/openstack/nova/nova/compute/api.py", line 1505, in snapshot
      'snapshot', extra_properties=extra_properties)
    File "/srv/compile/openstack/nova/nova/compute/api.py", line 1579, in _create_image
      return self.image_service.create(context, sent_meta)
    File "/srv/compile/openstack/nova/nova/image/glance.py", line 295, in create
      context, 1, 'create', **sent_service_image_meta)
    File "/srv/compile/openstack/nova/nova/image/glance.py", line 182, in call
      return getattr(client.images, method)(*args, **kwargs)
    File "/usr/local/lib/python2.7/dist-packages/glanceclient/v1/images.py", line 250, in create
      'POST', '/v1/images', headers=hdrs, body=image_data)
    File "/usr/local/lib/python2.7/dist-packages/glanceclient/common/http.py", line 244, in raw_request
      return self._http_request(url, method, **kwargs)
    File "/usr/local/lib/python2.7/dist-packages/glanceclient/common/http.py", line 205, in _http_request
      raise exc.from_response(resp, body_str)
  HTTPBadRequest: 400 Bad Request
  Image name too long: 269
      (HTTP 400)
  2013-04-16 17:10:37     INFO [nova.api.openstack] http://192.168.1.18:8774/v2/9c238a60c19b45608c2a82f4687f266d/servers/9610fcd1-c29d-4b48-960a-062583e5e086/action returned with HTTP 400
  2013-04-16 17:10:37    DEBUG [nova.api.openstack.wsgi] Returning 400 to user: The server could not comply with the request since it is either malformed or otherwise incorrect.
  2013-04-16 17:10:37     INFO [nova.osapi_compute.wsgi.server] 192.168.1.18 "POST /v2/9c238a60c19b45608c2a82f4687f266d/servers/9610fcd1-c29d-4b48-960a-062583e5e086/action HTTP/1.1" status: 400 len: 338 time: 0.1240311

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