Changes-since not returning deleted servers

Bug #1243301 reported by Richard Theis
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Medium
Luis A. Garcia
Havana
Fix Released
Undecided
Unassigned

Bug Description

Based on the OpenStack documentation at http://docs.openstack.org/api/openstack-compute/2/content/ChangesSince.html..."To allow clients to keep track of changes, the changes-since filter displays items that have been recently deleted. Both images and servers contain a DELETED status that indicates that the resource has been removed." This allows OpenStack consumers to determine when images and servers are deleted when using the changes-since support. OpenStack works as documented for images. However, changes-since support in OpenStack Havana may not return deleted servers with a DELETED status.

The recreate scenario is as follows:
1) Boot a new server and wait for the boot to complete.
2) Save the current time
3) Use changes-since to get all servers changed since the time saved in step 2. It should be none.
4) Delete the server created in step 1 and wait for the delete to complete.
5) Use changes-since to get all servers changed since the time saved in step 2. It should include the server deleted in step 4 and the server's status should be DELETED. The actual result is that the server is included but its status is ERROR.

For the above recreate scenario, the boot failed because no valid host was found. As a result, the server is in ERROR status after step 1. I have not tested with a successful boot.

Richard Theis (rtheis)
affects: openstack-manuals → nova
Luis A. Garcia (luisg-8)
Changed in nova:
assignee: nobody → Luis A. Garcia (luisg-8)
Changed in nova:
status: New → In Progress
Revision history for this message
Matt Riedemann (mriedem) wrote :
Mark McLoughlin (markmc)
Changed in nova:
importance: Undecided → Medium
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (stable/havana)

Fix proposed to branch: stable/havana
Review: https://review.openstack.org/57576

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

Reviewed: https://review.openstack.org/53199
Committed: http://github.com/openstack/nova/commit/38018d32f9db5b9222436d0f860244ce38ba97fb
Submitter: Jenkins
Branch: master

commit 38018d32f9db5b9222436d0f860244ce38ba97fb
Author: Luis A. Garcia <email address hidden>
Date: Thu Oct 31 20:25:37 2013 +0000

    Ensure deleted instances' status is always DELETED

    Currently when deleting failed instances that were never assigned a
    host, their vm_state is left in 'error' instead of 'deleted'. This is a
    problem when invoking the Index Instances REST API with a Changes-Since
    query parameter since that API returns both deleted and non-deleted
    instances, but currently the failed deleted instances are incorrectly
    marked as status:ERROR instead of status:DELETED.

    This patch modifies the server ViewBuilder to ensure the status is
    correctly set.

    Change-Id: I614714676bab4986564b236d74f2c0d77400e48c
    Closes-bug: #1243301

Changed in nova:
status: In Progress → Fix Committed
Changed in nova:
milestone: none → icehouse-1
Thierry Carrez (ttx)
Changed in nova:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: icehouse-1 → 2014.1
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (stable/havana)

Reviewed: https://review.openstack.org/57576
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=cefa81a6f17da83a6cee319731df588999833f0e
Submitter: Jenkins
Branch: stable/havana

commit cefa81a6f17da83a6cee319731df588999833f0e
Author: Luis A. Garcia <email address hidden>
Date: Thu Oct 31 20:25:37 2013 +0000

    Ensure deleted instances' status is always DELETED

    Currently when deleting failed instances that were never assigned a
    host, their vm_state is left in 'error' instead of 'deleted'. This is a
    problem when invoking the Index Instances REST API with a Changes-Since
    query parameter since that API returns both deleted and non-deleted
    instances, but currently the failed deleted instances are incorrectly
    marked as status:ERROR instead of status:DELETED.

    This patch modifies the server ViewBuilder to ensure the status is
    correctly set.

    Change-Id: I614714676bab4986564b236d74f2c0d77400e48c
    Closes-bug: #1243301
    (cherry picked from commit 38018d32f9db5b9222436d0f860244ce38ba97fb)

tags: added: in-stable-havana
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.