Usage gets updated and shows increase for a deleted instance

Bug #1074305 reported by Unmesh Gurjar
16
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Medium
Unmesh Gurjar
Folsom
Fix Released
Medium
Vish Ishaya

Bug Description

Branch: master

Scenario:
1. Configure the Compute server to run the '_cleanup_running_deleted_instances' periodic task (action=reap).
2. Spawn an instance and after the instance is up and running, stop the Compute service.
3. Now wait for more than 'service_down_time' period (default 60 seconds).
4. Send the request to delete the instance.
5. After the instance is no longer listed in the 'Instances' section of dashboard or CLI, start the host Compute service back again.
6. From the dashboard, check the 'Overview' section of the specific tenant/project and observe the instance 'Uptime'.
7. Check that the '_cleanup_running_deleted_instances' periodic task on the Compute host deletes the instance on hypervisor.
8. From the dashboard, check the 'Overview' section of the specific tenant/project and observe the instance 'Uptime'.

Expected Behavior:
Once the instance is marked as deleted its 'uptime' and all other metrics should stop incrementing on the dashboard.

Actual Result:
The instance 'Uptime' keeps going up all the time.
More importantly, the instance remains in state Active, deleting in Nova db.

Tags: ntt
Changed in nova:
assignee: nobody → Unmesh Gurjar (unmesh-gurjar)
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/15275

Changed in nova:
status: New → In Progress
Joe Gordon (jogo)
tags: added: folsom-backport-potential
Changed in nova:
importance: Undecided → Medium
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/15275
Committed: http://github.com/openstack/nova/commit/d00f09f2ebfa17b1b66ac080f4719f925e0777de
Submitter: Jenkins
Branch: master

commit d00f09f2ebfa17b1b66ac080f4719f925e0777de
Author: Unmesh Gurjar <email address hidden>
Date: Fri Nov 2 07:08:46 2012 -0700

    Fixed instance deletion issue from Nova API.

    When host Compute is down, Nova API deletes the resources associated with the
    instance. However, since the instance is marked deleted first, the next query
    to update the instance vm_state and task_state in DB fails. And instance
    remains in state vm_state=ACTIVE, task_state=DELETING, deleted=True.

    Fixes LP: #1074305

    Change-Id: I0a4e64d180b4b2c5e398a21a62b29b7d59549a9f

Changed in nova:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (stable/folsom)

Fix proposed to branch: stable/folsom
Review: https://review.openstack.org/15618

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

Reviewed: https://review.openstack.org/15618
Committed: http://github.com/openstack/nova/commit/9bf2c6a1b5a650d14f563f5727ad9c7636565062
Submitter: Jenkins
Branch: stable/folsom

commit 9bf2c6a1b5a650d14f563f5727ad9c7636565062
Author: Unmesh Gurjar <email address hidden>
Date: Fri Nov 2 07:08:46 2012 -0700

    Fixed instance deletion issue from Nova API.

    When host Compute is down, Nova API deletes the resources associated with the
    instance. However, since the instance is marked deleted first, the next query
    to update the instance vm_state and task_state in DB fails. And instance
    remains in state vm_state=ACTIVE, task_state=DELETING, deleted=True.

    Fixes LP: #1074305

    Change-Id: I0a4e64d180b4b2c5e398a21a62b29b7d59549a9f
    (cherry picked from commit d00f09f2ebfa17b1b66ac080f4719f925e0777de)

tags: added: in-stable-folsom
Thierry Carrez (ttx)
Changed in nova:
milestone: none → grizzly-1
status: Fix Committed → Fix Released
Joe Gordon (jogo)
tags: removed: folsom-backport-potential in-stable-folsom
Thierry Carrez (ttx)
Changed in nova:
milestone: grizzly-1 → 2013.1
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.