Local delete emits delete.end notification without delete_at

Bug #1250206 reported by Andrew Melton
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Undecided
Unassigned

Bug Description

In cases where Nova falls back to doing a local delete at the API (compute host down), it is possible for the delete.end notification to get emitted without deleted_at being set.

Steps to reproduce (with notifications enabled):
1) Create instance and wait for it to go active
2) Take compute host for the instance down
3) Delete instance
4) Observe compute.instance.delete.end notification with a blank deleted_at

This seems to be happening because the Instance.destroy() function does not update the instance with the latest state from the database after calling db.instance_destroy. It is important that the instance is updated with the data from the database as the driver automatically sets the deleted_at value.

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

Reviewed: https://review.openstack.org/56264
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=1167a0f808dd746875be50f31d7ebc56f79d45d6
Submitter: Jenkins
Branch: master

commit 1167a0f808dd746875be50f31d7ebc56f79d45d6
Author: Andrew Melton <email address hidden>
Date: Wed Nov 27 13:57:37 2013 -0500

    Update Instance from database after destroy

    In cases where Nova falls back to simply locally deleting an
    instance, the Instance object was not updated with the deleted_at
    generated by the database implementation. Due to this, the
    notification emitted to signify that the delete finished was
    getting emitted without a deleted_at value.

    This change uses the result from the instance_destroy call to
    update the Instance object with the latest state from the database.
    Thus, the compute.instance.delete.end notification is emitted
    with the proper deleted_at value.

    Closes-Bug: #1250206
    Change-Id: I55ed37cf89dd6eb8ea901c6f813191a0ce1058e8

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