should not be possible to delete used flavors

Bug #1000347 reported by Christian Berendt
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Invalid
Undecided
Unassigned

Bug Description

At the moment it's possible (tested with Essex) to delete an flavor that's used by an active instance. After deleting the flavor I have problems with several API calls, for example I can't list instances because I receive the following error:

2012-05-16 18:54:26 TRACE nova.api.openstack.wsgi Traceback (most recent call last):
2012-05-16 18:54:26 TRACE nova.api.openstack.wsgi File "/usr/lib64/python2.6/site-packages/nova/api/openstack/wsgi.py", line 851, in _process_stack
2012-05-16 18:54:26 TRACE nova.api.openstack.wsgi action_result = self.dispatch(meth, request, action_args)
2012-05-16 18:54:26 TRACE nova.api.openstack.wsgi File "/usr/lib64/python2.6/site-packages/nova/api/openstack/wsgi.py", line 926, in dispatch
2012-05-16 18:54:26 TRACE nova.api.openstack.wsgi return method(req=request, **action_args)
2012-05-16 18:54:26 TRACE nova.api.openstack.wsgi File "/usr/lib64/python2.6/site-packages/nova/api/openstack/compute/servers.py", line 382, in detail
2012-05-16 18:54:26 TRACE nova.api.openstack.wsgi servers = self._get_servers(req, is_detail=True)
2012-05-16 18:54:26 TRACE nova.api.openstack.wsgi File "/usr/lib64/python2.6/site-packages/nova/api/openstack/compute/servers.py", line 465, in _get_servers
2012-05-16 18:54:26 TRACE nova.api.openstack.wsgi return self._view_builder.detail(req, limited_list)
2012-05-16 18:54:26 TRACE nova.api.openstack.wsgi File "/usr/lib64/python2.6/site-packages/nova/api/openstack/compute/views/servers.py", line 123, in detail
2012-05-16 18:54:26 TRACE nova.api.openstack.wsgi return self._list_view(self.show, request, instances)
2012-05-16 18:54:26 TRACE nova.api.openstack.wsgi File "/usr/lib64/python2.6/site-packages/nova/api/openstack/compute/views/servers.py", line 127, in _list_view
2012-05-16 18:54:26 TRACE nova.api.openstack.wsgi server_list = [func(request, server)["server"] for server in servers]
2012-05-16 18:54:26 TRACE nova.api.openstack.wsgi File "/usr/lib64/python2.6/site-packages/nova/api/openstack/compute/views/servers.py", line 61, in wrapped
2012-05-16 18:54:26 TRACE nova.api.openstack.wsgi return func(self, request, instance)
2012-05-16 18:54:26 TRACE nova.api.openstack.wsgi File "/usr/lib64/python2.6/site-packages/nova/api/openstack/compute/views/servers.py", line 97, in show
2012-05-16 18:54:26 TRACE nova.api.openstack.wsgi "flavor": self._get_flavor(request, instance),
2012-05-16 18:54:26 TRACE nova.api.openstack.wsgi File "/usr/lib64/python2.6/site-packages/nova/api/openstack/compute/views/servers.py", line 172, in _get_flavor
2012-05-16 18:54:26 TRACE nova.api.openstack.wsgi flavor_id = instance["instance_type"]["flavorid"]
2012-05-16 18:54:26 TRACE nova.api.openstack.wsgi TypeError: 'NoneType' object is unsubscriptable
2012-05-16 18:54:26 TRACE nova.api.openstack.wsgi

Revision history for this message
Josh Kearney (jk0) wrote :
Changed in nova:
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.