_poll_shelved_instances periodic task is offloading instances even if shelved_offload_time is -1

Bug #1472946 reported by Abhishek Kekane
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Medium
Abhishek Kekane
Juno
Invalid
Medium
Abhishek Kekane
Kilo
Fix Released
Medium
Abhishek Kekane

Bug Description

shelved_offload_time -1 means instance will remain in the SHELVED state until user unshelves it.
Current behavior of _poll_shelved_instances periodic task is not considering shelved_offload_time is configured as -1 and offloading all the instances which are in 'SHELVED' state.

Stpes to reproduce:
1. set shelved_offload_time to -1 and restart nova-compute service.
2. create instance and shelve it using command, "nova shelve <instance_id>"
3. verify instance is in SHELVED state and instance files are present in instance path.
4. wait until _poll_shelved_instances periodic task executes (default is 3600 seconds, you can change it to 120 seconds)
5. Once _poll_shelved_instances periodic task is executed, instance state changes to SHELVED_OFFLOADED and instance files are deleted from instance path.

Tags: compute
Changed in nova:
assignee: nobody → Abhishek Kekane (abhishek-kekane)
Gary Kotton (garyk)
tags: added: compute
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/201436

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

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

commit abf20cd57023039958091c39f6cdb775c912c9ac
Author: abhishekkekane <email address hidden>
Date: Thu Jul 9 02:58:30 2015 -0700

    Execute _poll_shelved_instances only if shelved_offload_time is > 0

    shelved_offload_time -1 means never offload shelved instance. Currently,
    the periodic task "_poll_shelved_instances" changes the vm state from
    SHELVED to SHELVED_OFFLOAD even when the shelved_offload_time is set to -1.

    Added check in _poll_shelved_instances to offload instances only if
    shelved_offload_time is greater than 0.

    DocImpact
    Closes-bug: #1472946
    Change-Id: I55368e961b65a5ca73718fdcd42823680f7cbfa4

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

Fix proposed to branch: stable/kilo
Review: https://review.openstack.org/205384

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

Fix proposed to branch: stable/juno
Review: https://review.openstack.org/205449

Thierry Carrez (ttx)
Changed in nova:
milestone: none → liberty-2
status: Fix Committed → Fix Released
Matt Riedemann (mriedem)
Changed in nova:
importance: Undecided → Medium
Revision history for this message
Matt Riedemann (mriedem) wrote :

Apparently this was regressed in kilo with change https://review.openstack.org/#/c/107057/. We don't need this for stable/juno though.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on nova (stable/juno)

Change abandoned by Abhishek Kekane (<email address hidden>) on branch: stable/juno
Review: https://review.openstack.org/205449

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

Reviewed: https://review.openstack.org/205384
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=701c88950c8c12660bec3f06a494e52f43051f61
Submitter: Jenkins
Branch: stable/kilo

commit 701c88950c8c12660bec3f06a494e52f43051f61
Author: abhishekkekane <email address hidden>
Date: Thu Jul 9 02:58:30 2015 -0700

    Execute _poll_shelved_instances only if shelved_offload_time is > 0

    shelved_offload_time -1 means never offload shelved instance. Currently,
    the periodic task "_poll_shelved_instances" changes the vm state from
    SHELVED to SHELVED_OFFLOAD even when the shelved_offload_time is set to -1.

    Added check in _poll_shelved_instances to offload instances only if
    shelved_offload_time is greater than 0.

    DocImpact
    Closes-bug: #1472946
    Change-Id: I55368e961b65a5ca73718fdcd42823680f7cbfa4
    (cherry picked from commit abf20cd57023039958091c39f6cdb775c912c9ac)

Thierry Carrez (ttx)
Changed in nova:
milestone: liberty-2 → 12.0.0
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.