Comment 7 for bug 1334345

Revision history for this message
Matt Riedemann (mriedem) wrote : Re: State expected powering off but is None

I hit this in nova unit tests:

http://logs.openstack.org/94/102594/1/check/gate-nova-python27/014a5e6/console.html

Starting from this test:

nova.tests.api.ec2.test_cloud.CloudTestCase.test_create_image_with_reboot

2014-06-27 06:20:27.115 | Traceback (most recent call last):
2014-06-27 06:20:27.115 | File "nova/tests/api/ec2/test_cloud.py", line 2538, in test_create_image_with_reboot
2014-06-27 06:20:27.115 | self._do_test_create_image(False)
2014-06-27 06:20:27.116 | File "nova/tests/api/ec2/test_cloud.py", line 2511, in _do_test_create_image
2014-06-27 06:20:27.116 | no_reboot=no_reboot)
2014-06-27 06:20:27.116 | File "nova/api/ec2/cloud.py", line 1746, in create_image
2014-06-27 06:20:27.116 | self.compute_api.start(context, instance)
2014-06-27 06:20:27.116 | File "nova/compute/api.py", line 189, in inner
2014-06-27 06:20:27.116 | return function(self, context, instance, *args, **kwargs)
2014-06-27 06:20:27.116 | File "nova/compute/api.py", line 180, in wrapped
2014-06-27 06:20:27.116 | return function(self, context, instance, *args, **kwargs)
2014-06-27 06:20:27.116 | File "nova/compute/api.py", line 216, in _wrapped
2014-06-27 06:20:27.116 | return fn(self, context, instance, *args, **kwargs)
2014-06-27 06:20:27.116 | File "nova/compute/api.py", line 170, in inner
2014-06-27 06:20:27.117 | return f(self, context, instance, *args, **kw)
2014-06-27 06:20:27.117 | File "nova/compute/api.py", line 1775, in start
2014-06-27 06:20:27.117 | instance.save(expected_task_state=[None])
2014-06-27 06:20:27.117 | File "nova/objects/base.py", line 196, in wrapper
2014-06-27 06:20:27.117 | return fn(self, ctxt, *args, **kwargs)
2014-06-27 06:20:27.117 | File "nova/objects/instance.py", line 470, in save
2014-06-27 06:20:27.117 | columns_to_join=_expected_cols(expected_attrs))
2014-06-27 06:20:27.117 | File "nova/db/api.py", line 780, in instance_update_and_get_original
2014-06-27 06:20:27.117 | columns_to_join=columns_to_join)
2014-06-27 06:20:27.117 | File "nova/db/sqlalchemy/api.py", line 164, in wrapper
2014-06-27 06:20:27.117 | return f(*args, **kwargs)
2014-06-27 06:20:27.117 | File "nova/db/sqlalchemy/api.py", line 2229, in instance_update_and_get_original
2014-06-27 06:20:27.118 | columns_to_join=columns_to_join)
2014-06-27 06:20:27.118 | File "nova/db/sqlalchemy/api.py", line 2280, in _instance_update
2014-06-27 06:20:27.118 | actual=actual_state, expected=expected)
2014-06-27 06:20:27.118 | UnexpectedTaskStateError: Unexpected task state: expecting [None] but the actual state is powering-off