yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #21621
[Bug 962549] Re: Deleting a flavor can cause servers/detail to return HTTP 400
This is fixed with the system metadata flavor saving
** Changed in: nova
Status: Incomplete => Invalid
** Changed in: nova
Assignee: Sirisha Guduru (guduru-sirisha) => (unassigned)
--
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/962549
Title:
Deleting a flavor can cause servers/detail to return HTTP 400
Status in OpenStack Compute (Nova):
Invalid
Bug description:
Steps to reproduce on essex-4:
1. Boot an instance using flavor ID 1
2. After the instance is active, delete the flavor (nova-manage flavor delete m1.tiny)
3. Make a call to /servers/details (ie nova list)
# nova list
The server could not comply with the request since it is either malformed or otherwise incorrect. (HTTP 400)
from nova-api.log:
2012-03-22 14:56:40 INFO nova.api.openstack.wsgi [req-43268d0b-0b3f-451f-b36f-bfcb49b68ff9 ryan test] GET http://10.10.10.90:8774/v1.1/test/servers/detail
2012-03-22 14:56:40 DEBUG nova.api.openstack.wsgi [req-43268d0b-0b3f-451f-b36f-bfcb49b68ff9 ryan test] Unrecognized Content-Type provided in request from (pid=23300
) get_body /usr/lib/python2.6/site-packages/nova/api/openstack/wsgi.py:694
2012-03-22 14:56:40 DEBUG nova.compute.api [req-43268d0b-0b3f-451f-b36f-bfcb49b68ff9 ryan test] Searching by: {'deleted': False, 'project_id': 'test'} from (pid=233
00) get_all /usr/lib/python2.6/site-packages/nova/compute/api.py:1009
2012-03-22 14:56:40 DEBUG nova.api.openstack.common [req-43268d0b-0b3f-451f-b36f-bfcb49b68ff9 ryan test] Generated ACTIVE from vm_state=active task_state=None. from
(pid=23300) status_from_state /usr/lib/python2.6/site-packages/nova/api/openstack/common.py:98
2012-03-22 14:56:40 ERROR nova.api.openstack.wsgi [req-43268d0b-0b3f-451f-b36f-bfcb49b68ff9 ryan test] Exception handling resource: 'NoneType' object is unsubscript
able
(nova.api.openstack.wsgi): TRACE: Traceback (most recent call last):
(nova.api.openstack.wsgi): TRACE: File "/usr/lib/python2.6/site-packages/nova/api/openstack/wsgi.py", line 848, in _process_stack
(nova.api.openstack.wsgi): TRACE: action_result = self.dispatch(meth, request, action_args)
(nova.api.openstack.wsgi): TRACE: File "/usr/lib/python2.6/site-packages/nova/api/openstack/wsgi.py", line 924, in dispatch
(nova.api.openstack.wsgi): TRACE: return method(req=request, **action_args)
(nova.api.openstack.wsgi): TRACE: File "/usr/lib/python2.6/site-packages/nova/api/openstack/compute/servers.py", line 382, in detail
(nova.api.openstack.wsgi): TRACE: servers = self._get_servers(req, is_detail=True)
(nova.api.openstack.wsgi): TRACE: File "/usr/lib/python2.6/site-packages/nova/api/openstack/compute/servers.py", line 465, in _get_servers
(nova.api.openstack.wsgi): TRACE: return self._view_builder.detail(req, limited_list)
(nova.api.openstack.wsgi): TRACE: File "/usr/lib/python2.6/site-packages/nova/api/openstack/compute/views/servers.py", line 123, in detail
(nova.api.openstack.wsgi): TRACE: return self._list_view(self.show, request, instances)
(nova.api.openstack.wsgi): TRACE: File "/usr/lib/python2.6/site-packages/nova/api/openstack/compute/views/servers.py", line 127, in _list_view
(nova.api.openstack.wsgi): TRACE: server_list = [func(request, server)["server"] for server in servers]
(nova.api.openstack.wsgi): TRACE: File "/usr/lib/python2.6/site-packages/nova/api/openstack/compute/views/servers.py", line 61, in wrapped
(nova.api.openstack.wsgi): TRACE: return func(self, request, instance)
(nova.api.openstack.wsgi): TRACE: File "/usr/lib/python2.6/site-packages/nova/api/openstack/compute/views/servers.py", line 97, in show
(nova.api.openstack.wsgi): TRACE: "flavor": self._get_flavor(request, instance),
(nova.api.openstack.wsgi): TRACE: File "/usr/lib/python2.6/site-packages/nova/api/openstack/compute/views/servers.py", line 172, in _get_flavor
(nova.api.openstack.wsgi): TRACE: flavor_id = instance["instance_type"]["flavorid"]
(nova.api.openstack.wsgi): TRACE: TypeError: 'NoneType' object is unsubscriptable
(nova.api.openstack.wsgi): TRACE:
2012-03-22 14:56:40 INFO nova.api.openstack.wsgi [req-43268d0b-0b3f-451f-b36f-bfcb49b68ff9 ryan test] http://10.10.10.90:8774/v1.1/test/servers/detail returned with
HTTP 400
Either users should be blocked from deleting a flavor until all
instances booted from it terminate, or this should be more robust (I'd
propose the latter).
To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/962549/+subscriptions