resize instance: Instance type 7 could not be found..

Bug #1068539 reported by Alex Handle
22
This bug affects 3 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Low
Jian Wen

Bug Description

Hello!

I got the following error when i resized a instance:

instance: 98d7851b-ae9f-4e51-8f26-69d9bf77750d] Instance type 7 could not be found.. Setting instance vm_state to ERROR
2012-10-18 18:11:30 DEBUG nova.utils [req-a9d58663-0907-459e-baf6-e5c244d08d53 2676663dbafd4440aed7c5434d907e30 a68f316b69054f0095863905ca847c2a] Got semapho
re "compute_resources" for method "update_usage"... from (pid=19718) inner /usr/lib/python2.7/dist-packages/nova/utils.py:713
2012-10-18 18:11:30 DEBUG nova.utils [req-a9d58663-0907-459e-baf6-e5c244d08d53 2676663dbafd4440aed7c5434d907e30 a68f316b69054f0095863905ca847c2a] Got semapho
re "compute_resources" for method "update_usage"... from (pid=19718) inner /usr/lib/python2.7/dist-packages/nova/utils.py:713
2012-10-18 18:11:30 ERROR nova.openstack.common.rpc.amqp [-] Exception during message handling
2012-10-18 18:11:30 TRACE nova.openstack.common.rpc.amqp Traceback (most recent call last):
2012-10-18 18:11:30 TRACE nova.openstack.common.rpc.amqp File "/usr/lib/python2.7/dist-packages/nova/openstack/common/rpc/amqp.py", line 275, in _process_d
ata
2012-10-18 18:11:30 TRACE nova.openstack.common.rpc.amqp rval = self.proxy.dispatch(ctxt, version, method, **args)
2012-10-18 18:11:30 TRACE nova.openstack.common.rpc.amqp File "/usr/lib/python2.7/dist-packages/nova/openstack/common/rpc/dispatcher.py", line 145, in disp
atch
2012-10-18 18:11:30 TRACE nova.openstack.common.rpc.amqp return getattr(proxyobj, method)(ctxt, **kwargs)
2012-10-18 18:11:30 TRACE nova.openstack.common.rpc.amqp File "/usr/lib/python2.7/dist-packages/nova/exception.py", line 117, in wrapped
2012-10-18 18:11:30 TRACE nova.openstack.common.rpc.amqp temp_level, payload)
2012-10-18 18:11:30 TRACE nova.openstack.common.rpc.amqp File "/usr/lib/python2.7/contextlib.py", line 24, in __exit__
2012-10-18 18:11:30 TRACE nova.openstack.common.rpc.amqp self.gen.next()
2012-10-18 18:11:30 TRACE nova.openstack.common.rpc.amqp File "/usr/lib/python2.7/dist-packages/nova/exception.py", line 92, in wrapped
2012-10-18 18:11:30 TRACE nova.openstack.common.rpc.amqp return f(*args, **kw)
2012-10-18 18:11:30 TRACE nova.openstack.common.rpc.amqp File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 181, in decorated_function
2012-10-18 18:11:30 TRACE nova.openstack.common.rpc.amqp pass
2012-10-18 18:11:30 TRACE nova.openstack.common.rpc.amqp File "/usr/lib/python2.7/contextlib.py", line 24, in __exit__
2012-10-18 18:11:30 TRACE nova.openstack.common.rpc.amqp self.gen.next()
2012-10-18 18:11:30 TRACE nova.openstack.common.rpc.amqp File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 167, in decorated_function
2012-10-18 18:11:30 TRACE nova.openstack.common.rpc.amqp return function(self, context, *args, **kwargs)
2012-10-18 18:11:30 TRACE nova.openstack.common.rpc.amqp File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 202, in decorated_function
2012-10-18 18:11:30 TRACE nova.openstack.common.rpc.amqp kwargs['instance']['uuid'], e, sys.exc_info())
2012-10-18 18:11:30 TRACE nova.openstack.common.rpc.amqp File "/usr/lib/python2.7/contextlib.py", line 24, in __exit__
2012-10-18 18:11:30 TRACE nova.openstack.common.rpc.amqp self.gen.next()
2012-10-18 18:11:30 TRACE nova.openstack.common.rpc.amqp File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 196, in decorated_function
2012-10-18 18:11:30 TRACE nova.openstack.common.rpc.amqp return function(self, context, *args, **kwargs)
2012-10-18 18:11:30 TRACE nova.openstack.common.rpc.amqp File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 1565, in resize_instance
2012-10-18 18:11:30 TRACE nova.openstack.common.rpc.amqp migration_ref.new_instance_type_id)
2012-10-18 18:11:30 TRACE nova.openstack.common.rpc.amqp File "/usr/lib/python2.7/dist-packages/nova/db/api.py", line 1443, in instance_type_get
2012-10-18 18:11:30 TRACE nova.openstack.common.rpc.amqp return IMPL.instance_type_get(context, id)
2012-10-18 18:11:30 TRACE nova.openstack.common.rpc.amqp File "/usr/lib/python2.7/dist-packages/nova/db/sqlalchemy/api.py", line 129, in wrapper
2012-10-18 18:11:30 TRACE nova.openstack.common.rpc.amqp return f(*args, **kwargs)
2012-10-18 18:11:30 TRACE nova.openstack.common.rpc.amqp File "/usr/lib/python2.7/dist-packages/nova/db/sqlalchemy/api.py", line 3971, in instance_type_get
2012-10-18 18:11:30 TRACE nova.openstack.common.rpc.amqp raise exception.InstanceTypeNotFound(instance_type_id=id)
2012-10-18 18:11:30 TRACE nova.openstack.common.rpc.amqp InstanceTypeNotFound: Instance type 7 could not be found.
2012-10-18 18:11:30 TRACE nova.openstack.common.rpc.amqp

this only happens if there are deleted flavors with the same id.
Maybe there is some mismatch in the instance_type_get or in the migration table?

Thanks

Alex

Chuck Short (zulcss)
Changed in nova:
importance: Undecided → Low
status: New → Confirmed
Jian Wen (wenjianhn)
Changed in nova:
assignee: nobody → Jian Wen (wenjianhn)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

Fix proposed to branch: master
Review: https://review.openstack.org/15344

Changed in nova:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/15344
Committed: http://github.com/openstack/nova/commit/25743e4fc3dc845afacebe7f790c11cf35fbadea
Submitter: Jenkins
Branch: master

commit 25743e4fc3dc845afacebe7f790c11cf35fbadea
Author: Jian Wen <email address hidden>
Date: Sun Nov 4 15:39:51 2012 +0800

    Forbid resizing instance to deleted instance types

    Sets read_deleted="no" while get_instance_type_by_flavor_id to forbid
    resizing instance to deleted instance types

    Fixes bug 1068539

    Change-Id: I3859f63a33391a840e041f06f08af361b6d64157

Changed in nova:
status: In Progress → Fix Committed
Revision history for this message
Jian Wen (wenjianhn) wrote :

NOTE:
Fix Committed to folsom, not essex.

Thierry Carrez (ttx)
Changed in nova:
milestone: none → grizzly-1
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: grizzly-1 → 2013.1
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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