← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1401520] [NEW] quota noop driver 'KeyError'

 

Public bug reported:

root@node-19:~# nova quota-show                                                                                                                                               [134/569]
+-----------------------------+-------+
| Quota                       | Limit |
+-----------------------------+-------+
| instances                   | -1    |
| cores                       | -1    |
| ram                         | -1    |
| floating_ips                | -1    |
| fixed_ips                   | -1    |
| metadata_items              | -1    |
| injected_files              | -1    |
| injected_file_content_bytes | -1    |
| injected_file_path_bytes    | -1    |
| key_pairs                   | -1    |
| security_groups             | -1    |
| security_group_rules        | -1    |
+-----------------------------+-------+

root@node-19:~# nova quota-update --instances 2 082cd5a6411e4acab173b8325290672e
ERROR: The server has either erred or is incapable of performing the requested operation. (HTTP 500) (Request-ID: req-7dd31dae-1d49-490e-a0f6-9c345304f60e)


from nova-api.log:
...
2014-12-11 06:42:23.349 5277 TRACE nova.api.openstack Traceback (most recent call last):
2014-12-11 06:42:23.349 5277 TRACE nova.api.openstack   File "/usr/lib/python2.7/dist-packages/nova/api/openstack/__init__.py", line 125, in __call__
2014-12-11 06:42:23.349 5277 TRACE nova.api.openstack     return req.get_response(self.application)
2014-12-11 06:42:23.349 5277 TRACE nova.api.openstack   File "/usr/lib/python2.7/dist-packages/webob/request.py", line 1296, in send
2014-12-11 06:42:23.349 5277 TRACE nova.api.openstack     application, catch_exc_info=False)
2014-12-11 06:42:23.349 5277 TRACE nova.api.openstack   File "/usr/lib/python2.7/dist-packages/webob/request.py", line 1260, in call_application
2014-12-11 06:42:23.349 5277 TRACE nova.api.openstack     app_iter = application(self.environ, start_response)
2014-12-11 06:42:23.349 5277 TRACE nova.api.openstack   File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 144, in __call__
2014-12-11 06:42:23.349 5277 TRACE nova.api.openstack     return resp(environ, start_response)
2014-12-11 06:42:23.349 5277 TRACE nova.api.openstack   File "/usr/lib/python2.7/dist-packages/keystoneclient/middleware/auth_token.py", line 582, in __call__
2014-12-11 06:42:23.349 5277 TRACE nova.api.openstack     return self.app(env, start_response)
2014-12-11 06:42:23.349 5277 TRACE nova.api.openstack   File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 144, in __call__
2014-12-11 06:42:23.349 5277 TRACE nova.api.openstack     return resp(environ, start_response)
2014-12-11 06:42:23.349 5277 TRACE nova.api.openstack   File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 144, in __call__
2014-12-11 06:42:23.349 5277 TRACE nova.api.openstack     return resp(environ, start_response)
2014-12-11 06:42:23.349 5277 TRACE nova.api.openstack   File "/usr/lib/python2.7/dist-packages/routes/middleware.py", line 131, in __call__
2014-12-11 06:42:23.349 5277 TRACE nova.api.openstack     response = self.app(environ, start_response)
2014-12-11 06:42:23.349 5277 TRACE nova.api.openstack   File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 144, in __call__
2014-12-11 06:42:23.349 5277 TRACE nova.api.openstack     return resp(environ, start_response)
2014-12-11 06:42:23.349 5277 TRACE nova.api.openstack   File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 130, in __call__
2014-12-11 06:42:23.349 5277 TRACE nova.api.openstack     resp = self.call_func(req, *args, **self.kwargs)
2014-12-11 06:42:23.349 5277 TRACE nova.api.openstack   File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 195, in call_func
2014-12-11 06:42:23.349 5277 TRACE nova.api.openstack     return self.func(req, *args, **kwargs)
2014-12-11 06:42:23.349 5277 TRACE nova.api.openstack   File "/usr/lib/python2.7/dist-packages/nova/api/openstack/wsgi.py", line 917, in __call__
2014-12-11 06:42:23.349 5277 TRACE nova.api.openstack     content_type, body, accept)
2014-12-11 06:42:23.349 5277 TRACE nova.api.openstack   File "/usr/lib/python2.7/dist-packages/nova/api/openstack/wsgi.py", line 983, in _process_stack
2014-12-11 06:42:23.349 5277 TRACE nova.api.openstack     action_result = self.dispatch(meth, request, action_args)
2014-12-11 06:42:23.349 5277 TRACE nova.api.openstack   File "/usr/lib/python2.7/dist-packages/nova/api/openstack/wsgi.py", line 1070, in dispatch
2014-12-11 06:42:23.349 5277 TRACE nova.api.openstack     return method(req=request, **action_args)
2014-12-11 06:42:23.349 5277 TRACE nova.api.openstack   File "/usr/lib/python2.7/dist-packages/nova/api/openstack/compute/contrib/quotas.py", line 135, in update
2014-12-11 06:42:23.349 5277 TRACE nova.api.openstack     user_id=user_id)
2014-12-11 06:42:23.349 5277 TRACE nova.api.openstack   File "/usr/lib/python2.7/dist-packages/nova/quota.py", line 1179, in get_settable_quotas
2014-12-11 06:42:23.349 5277 TRACE nova.api.openstack     user_id=user_id)
2014-12-11 06:42:23.349 5277 TRACE nova.api.openstack   File "/usr/lib/python2.7/dist-packages/nova/quota.py", line 748, in get_settable_quotas
2014-12-11 06:42:23.349 5277 TRACE nova.api.openstack     quotas[resource.name].update(minimum=0, maximum=-1)
2014-12-11 06:42:23.349 5277 TRACE nova.api.openstack KeyError: 'metadata_items'
2014-12-11 06:42:23.349 5277 TRACE nova.api.openstack
...

and from /usr/lib/python2.7/dist-packages/nova/quota.py:

 736     def get_settable_quotas(self, context, resources, project_id,
 737                             user_id=None):
 738         """Given a list of resources, retrieve the range of settable quotas for
 739         the given user or project.
 740
 741         :param context: The request context, for access checks.
 742         :param resources: A dictionary of the registered resources.
 743         :param project_id: The ID of the project to return quotas for.
 744         :param user_id: The ID of the user to return quotas for.
 745         """
 >746         quotas = {}
 747         for resource in resources.values():
 >748             quotas[resource.name].update(minimum=0, maximum=-1)
 749         return quotas

** Affects: nova
     Importance: Undecided
         Status: New


** Tags: quota

-- 
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/1401520

Title:
  quota noop driver 'KeyError'

Status in OpenStack Compute (Nova):
  New

Bug description:
  root@node-19:~# nova quota-show                                                                                                                                               [134/569]
  +-----------------------------+-------+
  | Quota                       | Limit |
  +-----------------------------+-------+
  | instances                   | -1    |
  | cores                       | -1    |
  | ram                         | -1    |
  | floating_ips                | -1    |
  | fixed_ips                   | -1    |
  | metadata_items              | -1    |
  | injected_files              | -1    |
  | injected_file_content_bytes | -1    |
  | injected_file_path_bytes    | -1    |
  | key_pairs                   | -1    |
  | security_groups             | -1    |
  | security_group_rules        | -1    |
  +-----------------------------+-------+

  root@node-19:~# nova quota-update --instances 2 082cd5a6411e4acab173b8325290672e
  ERROR: The server has either erred or is incapable of performing the requested operation. (HTTP 500) (Request-ID: req-7dd31dae-1d49-490e-a0f6-9c345304f60e)

  
  from nova-api.log:
  ...
  2014-12-11 06:42:23.349 5277 TRACE nova.api.openstack Traceback (most recent call last):
  2014-12-11 06:42:23.349 5277 TRACE nova.api.openstack   File "/usr/lib/python2.7/dist-packages/nova/api/openstack/__init__.py", line 125, in __call__
  2014-12-11 06:42:23.349 5277 TRACE nova.api.openstack     return req.get_response(self.application)
  2014-12-11 06:42:23.349 5277 TRACE nova.api.openstack   File "/usr/lib/python2.7/dist-packages/webob/request.py", line 1296, in send
  2014-12-11 06:42:23.349 5277 TRACE nova.api.openstack     application, catch_exc_info=False)
  2014-12-11 06:42:23.349 5277 TRACE nova.api.openstack   File "/usr/lib/python2.7/dist-packages/webob/request.py", line 1260, in call_application
  2014-12-11 06:42:23.349 5277 TRACE nova.api.openstack     app_iter = application(self.environ, start_response)
  2014-12-11 06:42:23.349 5277 TRACE nova.api.openstack   File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 144, in __call__
  2014-12-11 06:42:23.349 5277 TRACE nova.api.openstack     return resp(environ, start_response)
  2014-12-11 06:42:23.349 5277 TRACE nova.api.openstack   File "/usr/lib/python2.7/dist-packages/keystoneclient/middleware/auth_token.py", line 582, in __call__
  2014-12-11 06:42:23.349 5277 TRACE nova.api.openstack     return self.app(env, start_response)
  2014-12-11 06:42:23.349 5277 TRACE nova.api.openstack   File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 144, in __call__
  2014-12-11 06:42:23.349 5277 TRACE nova.api.openstack     return resp(environ, start_response)
  2014-12-11 06:42:23.349 5277 TRACE nova.api.openstack   File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 144, in __call__
  2014-12-11 06:42:23.349 5277 TRACE nova.api.openstack     return resp(environ, start_response)
  2014-12-11 06:42:23.349 5277 TRACE nova.api.openstack   File "/usr/lib/python2.7/dist-packages/routes/middleware.py", line 131, in __call__
  2014-12-11 06:42:23.349 5277 TRACE nova.api.openstack     response = self.app(environ, start_response)
  2014-12-11 06:42:23.349 5277 TRACE nova.api.openstack   File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 144, in __call__
  2014-12-11 06:42:23.349 5277 TRACE nova.api.openstack     return resp(environ, start_response)
  2014-12-11 06:42:23.349 5277 TRACE nova.api.openstack   File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 130, in __call__
  2014-12-11 06:42:23.349 5277 TRACE nova.api.openstack     resp = self.call_func(req, *args, **self.kwargs)
  2014-12-11 06:42:23.349 5277 TRACE nova.api.openstack   File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 195, in call_func
  2014-12-11 06:42:23.349 5277 TRACE nova.api.openstack     return self.func(req, *args, **kwargs)
  2014-12-11 06:42:23.349 5277 TRACE nova.api.openstack   File "/usr/lib/python2.7/dist-packages/nova/api/openstack/wsgi.py", line 917, in __call__
  2014-12-11 06:42:23.349 5277 TRACE nova.api.openstack     content_type, body, accept)
  2014-12-11 06:42:23.349 5277 TRACE nova.api.openstack   File "/usr/lib/python2.7/dist-packages/nova/api/openstack/wsgi.py", line 983, in _process_stack
  2014-12-11 06:42:23.349 5277 TRACE nova.api.openstack     action_result = self.dispatch(meth, request, action_args)
  2014-12-11 06:42:23.349 5277 TRACE nova.api.openstack   File "/usr/lib/python2.7/dist-packages/nova/api/openstack/wsgi.py", line 1070, in dispatch
  2014-12-11 06:42:23.349 5277 TRACE nova.api.openstack     return method(req=request, **action_args)
  2014-12-11 06:42:23.349 5277 TRACE nova.api.openstack   File "/usr/lib/python2.7/dist-packages/nova/api/openstack/compute/contrib/quotas.py", line 135, in update
  2014-12-11 06:42:23.349 5277 TRACE nova.api.openstack     user_id=user_id)
  2014-12-11 06:42:23.349 5277 TRACE nova.api.openstack   File "/usr/lib/python2.7/dist-packages/nova/quota.py", line 1179, in get_settable_quotas
  2014-12-11 06:42:23.349 5277 TRACE nova.api.openstack     user_id=user_id)
  2014-12-11 06:42:23.349 5277 TRACE nova.api.openstack   File "/usr/lib/python2.7/dist-packages/nova/quota.py", line 748, in get_settable_quotas
  2014-12-11 06:42:23.349 5277 TRACE nova.api.openstack     quotas[resource.name].update(minimum=0, maximum=-1)
  2014-12-11 06:42:23.349 5277 TRACE nova.api.openstack KeyError: 'metadata_items'
  2014-12-11 06:42:23.349 5277 TRACE nova.api.openstack
  ...

  and from /usr/lib/python2.7/dist-packages/nova/quota.py:

   736     def get_settable_quotas(self, context, resources, project_id,
   737                             user_id=None):
   738         """Given a list of resources, retrieve the range of settable quotas for
   739         the given user or project.
   740
   741         :param context: The request context, for access checks.
   742         :param resources: A dictionary of the registered resources.
   743         :param project_id: The ID of the project to return quotas for.
   744         :param user_id: The ID of the user to return quotas for.
   745         """
   >746         quotas = {}
   747         for resource in resources.values():
   >748             quotas[resource.name].update(minimum=0, maximum=-1)
   749         return quotas

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


Follow ups

References