deleted_at value in notification messages is wrong

Bug #1227080 reported by Phil Day
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Low
Phil Day

Bug Description

The deleted_at value in notification messages is set from the terminated_at value in the instance record.

Note that there is this comment in the notification code:

        # Nova's deleted vs terminated instance terminology is confusing,
        # this should be when the instance was deleted (i.e. terminated_at),
        # not when the db record was deleted. (mdragon)
        deleted_at=null_safe_isotime(instance_ref.get('terminated_at')),

While I can see that there might be some confusion between terminated_at and deleted_at - mapping from one name to the other in the notification message doesn't seem like a great way to resolve it. Surely it would be better to keep the names consistent and include both values in the message - so that the receiver can decide which one they want to use.

This current remapping just enforces one view of difference (or not) between a terminated and a deleted instance

Tiago Mello (timello)
Changed in nova:
importance: Undecided → Low
Changed in nova:
status: New → Confirmed
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/47558

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

Reviewed: https://review.openstack.org/47558
Committed: http://github.com/openstack/nova/commit/268a7d4e68a567aaeda93c4e828c34701390d7f2
Submitter: Jenkins
Branch: master

commit 268a7d4e68a567aaeda93c4e828c34701390d7f2
Author: Phil Day <email address hidden>
Date: Fri Sep 20 11:38:21 2013 +0000

    Correct deleted_at value in notification messages

    The deleted_at value in notification messages is currently
    set from the terminated_at value in the instance record.

    A comment in the code says this is to avoid confusion between
    terminated_at and deleted_at, but swapping the names doesn't
    seem to be a great way to address that.

    In practice "terminated and not deleted" is a transient state
    unless an error occurs, and the time gap is very short. But
    deleted_at is always set when the entry is deleted in the DB,
    whereas terminated_at can be left unset in some error cases.

    Rather than present terminated_at as the deleted_at value in
    the message we include both and let the recipient decide which
    they want to use.

    Fixes bug: 1227080

    Change-Id: Ic67f66b6c64be1a8f43f4fdd5b1fac25f1414247

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