InstanceInvalidState exception not caught in server start/stop

Bug #1266379 reported by Christopher Yeoh
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Undecided
Christopher Yeoh

Bug Description

A failed tempest run picked up this issue:

2014-01-06 06:50:04.124 26085 TRACE nova.api.openstack.extensions Traceback (most recent call last):
2014-01-06 06:50:04.124 26085 TRACE nova.api.openstack.extensions File "/opt/stack/new/nova/nova/api/openstack/extensions.py", line 470, in wrapped
2014-01-06 06:50:04.124 26085 TRACE nova.api.openstack.extensions return f(*args, **kwargs)
2014-01-06 06:50:04.124 26085 TRACE nova.api.openstack.extensions File "/opt/stack/new/nova/nova/api/openstack/compute/plugins/v3/servers.py", line 1305, in _start_server
2014-01-06 06:50:04.124 26085 TRACE nova.api.openstack.extensions self.compute_api.start(context, instance)
2014-01-06 06:50:04.124 26085 TRACE nova.api.openstack.extensions File "/opt/stack/new/nova/nova/compute/api.py", line 199, in wrapped
2014-01-06 06:50:04.124 26085 TRACE nova.api.openstack.extensions return func(self, context, target, *args, **kwargs)
2014-01-06 06:50:04.124 26085 TRACE nova.api.openstack.extensions File "/opt/stack/new/nova/nova/compute/api.py", line 189, in inner
2014-01-06 06:50:04.124 26085 TRACE nova.api.openstack.extensions return function(self, context, instance, *args, **kwargs)
2014-01-06 06:50:04.124 26085 TRACE nova.api.openstack.extensions File "/opt/stack/new/nova/nova/compute/api.py", line 180, in wrapped
2014-01-06 06:50:04.124 26085 TRACE nova.api.openstack.extensions return function(self, context, instance, *args, **kwargs)
2014-01-06 06:50:04.124 26085 TRACE nova.api.openstack.extensions File "/opt/stack/new/nova/nova/compute/api.py", line 216, in _wrapped
2014-01-06 06:50:04.124 26085 TRACE nova.api.openstack.extensions return fn(self, context, instance, *args, **kwargs)
2014-01-06 06:50:04.124 26085 TRACE nova.api.openstack.extensions File "/opt/stack/new/nova/nova/compute/api.py", line 154, in inner
2014-01-06 06:50:04.124 26085 TRACE nova.api.openstack.extensions method=f.__name__)
2014-01-06 06:50:04.124 26085 TRACE nova.api.openstack.extensions InstanceInvalidState: Instance 35a70836-21c4-4770-b929-a1bd080b85d3 in vm_state error. Cannot start while the instance is in this state.

We should catch this exception in both server start/stop

Tags: api
tags: added: api
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/66179

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

Reviewed: https://review.openstack.org/66179
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=6a7731754fd86f2dda760508e19fbb0c7fa5991c
Submitter: Jenkins
Branch: master

commit 6a7731754fd86f2dda760508e19fbb0c7fa5991c
Author: Christopher Yeoh <email address hidden>
Date: Fri Jan 10 21:45:27 2014 +0800

    Fix unhandled InvalidServerState exceptions in server start/stop

    Catch InvalidServerState exceptions in the server start/stop api
    and return a 409 conflict rather than causing 500 errors

    Closes-Bug: 1266379

    Change-Id: I9d2437319d2cef93b9b10184e257acbd8eb45359

Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
milestone: none → icehouse-3
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: icehouse-3 → 2014.1
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.