Comment 2 for bug 1254122

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/58829
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=63381a15ac3c2e36f5521f8a77108664f89bfab5
Submitter: Jenkins
Branch: master

commit 63381a15ac3c2e36f5521f8a77108664f89bfab5
Author: Phil Day <email address hidden>
Date: Wed Nov 27 17:31:23 2013 +0000

    Failure during termination should always leave state as Error(Deleting)

    Delete is a non-reversible operation for the user, and once the
    user has indicated that they want to delete the instance from that
    point on is the system's problem to complete the delete as soon as
    possible.

    If anything fails during the delete that the system cannot recover
    from then the instance should be left in an Error(Deleting) state.
    Anything else, in particular reverting to an Active(None) state, makes
    it look like the system has ignored the request.

    Currently InstanceTerminationFailure is explicitly caught, but the
    exception does not propagate so the instance_fault wrapper does not
    get a chance to log the failure. Also terminate_instance is wrapped
    by reverts_task_state which resets the state to Active(None)

    This change removes the revert_task_state wrapper and catches all
    exceptions so that unhandled exceptions always leave the instance
    in Error(Deleting)

    Change-Id: I5fb1bbd56035792f566a6e076edfe7a69df006ef
    Closes-Bug: 1254122