Exists notification sent even if rescue fails

Bug #1262639 reported by Anuj Mathur
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Undecided
Anuj Mathur

Bug Description

When a rescue operation is initiated in Nova, a partial-period .exists event is emitted to capture instance runtime, etc for the period before the rescue. Currently, this occurs just before the actual rescue operation is kicked off on the hypervisor.

If the rescue operation is interrupted by another user operation, such as a delete or rebuild, before it finishes, then the rescue will not complete, and the instance's launched_at time will not be reset. This will result in the instance runtime for the partial .exists, and the end-of day .exists overlapping.

To fix this, the notify_usage_exists() call in ComputeManager's rescue_instance method should be moved to after the driver.rescue() call completes, just before the instance update that changes the launched_at timestamp. This will prevent the extra .exists from being emitted if the rescue is interrupted, and the launched_at is not changed.

Anuj Mathur (anujm-g)
Changed in nova:
assignee: nobody → Anuj Mathur (anujm-g)
Anuj Mathur (anujm-g)
description: updated
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/63731

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/63731
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=7fbfb919b734cc6036bcc64641e531a45b7c3245
Submitter: Jenkins
Branch: master

commit 7fbfb919b734cc6036bcc64641e531a45b7c3245
Author: Anuj Mathur <email address hidden>
Date: Thu Dec 19 16:38:04 2013 +0530

    Change when exists notification is sent for rescue

    The exists notification is now generated only after the rescue
    operation completes successfully.

    Closes-Bug:1262639
    Change-Id: If79eb5065b11f28320e8a13de2ad15b2ef3119a9

Changed in nova:
status: In Progress → 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.