Instance files doesn't clean up from destination node in revert-resize api for non-shared environment

Bug #1418855 reported by Rajesh Tailor
264
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Medium
Rajesh Tailor
OpenStack Security Advisory
Won't Fix
Undecided
Unassigned

Bug Description

When user reverts previously resized instance then it doesn’t clean up instance files from destination node in non-shared environment (instance path not mounted on shared storage).

Steps to reproduce:

1. Create an instance and wait until it's status is set to 'active'
2. Resize the instance
3. Check instance files are present on the source and destination compute nodes in the instance file path
4. Revert the instance previously resized in Step#2

Instance files are not deleted from the destination compute node.

This issue is introduced because of the LP bug [1] fixed lately.
Patch merged [2] in kilo-2 is also back ported to the stable/juno branch [3].

I have a fix for this problem. I am working on unit tests. As soon as patch is ready, I will attached it to this bug.

[1] https://bugs.launchpad.net/nova/+bug/1399244
[2] https://review.openstack.org/139693/
[3] https://review.openstack.org/#/c/149371/

Tags: ntt
Changed in nova:
assignee: nobody → Rajesh Tailor (rajesh-tailor)
Revision history for this message
Jeremy Stanley (fungi) wrote :

Since this report concerns a possible security risk, an incomplete security advisory task has been added while the core security reviewers for the affected project or projects confirm the bug and discuss the scope of any vulnerability along with potential solutions.

description: updated
Changed in ossa:
status: New → Incomplete
Revision history for this message
Rajesh Tailor (rajesh-tailor) wrote :
Revision history for this message
Tristan Cacqueray (tristan-cacqueray) wrote :

So basically, if this is not affecting a released version (2014.1 2014.1.1 2014.1.2 2014.1.3 2014.2 2014.2.1 2014.2.2), then this is good to be opened and fix in the open.

Good things the backport have not made it in last Juno release 2014.2.2.

Revision history for this message
Tristan Cacqueray (tristan-cacqueray) wrote :

The offending commit ( eec0937af9d88f3c7ffacf9ce7b8955b2e4be479 ) is only present in development tag 2015.1.0b2

Just in case I also look for the added test using: "git grep test_revert_resize_instance_destroy_disks 2014.1 2014.1.1 2014.1.2 2014.1.3 2014.2 2014.2.1 2014.2.2" without results.

I propose to open this next Monday.

Revision history for this message
Tristan Cacqueray (tristan-cacqueray) wrote :

This bug is not affecting a released version, let's open it. Feel free to send patch directly to gerrit now.

information type: Private Security → Public Security
Changed in ossa:
status: Incomplete → Won't Fix
Changed in nova:
status: New → Confirmed
importance: Undecided → Medium
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/154761

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

commit fde77d49ff550b73f5f1671edc7366c9b7646200
Author: Rajesh Tailor <email address hidden>
Date: Thu Feb 5 02:57:59 2015 -0800

    Delete instance files from dest host in revert-resize

    When revert-resize call is finished, it doesn't clear instance
    files from destination node for non-shared instance storage.

    The driver call, which is responsible for destroying destination
    host instance is not deleting instance files, because it finds that
    both source and destination host shares the same instance storage.

    The check_instance_shared_storage rpc-call had no host information,
    hence the manager call for check_instance_shared_storage was checking
    instance storage on destination host itself and returning True even
    if it is non-shared storage.

    Added host parameter to check_instance_shared_storage rpc-call,
    so that in manager call check_instance_shared_storage method get
    executed on source compute node and returns True/False based on
    shared/non-shared storage.

    Closes-Bug: #1418855
    Change-Id: Ic529b1c2c1cfd914facb14941e4bb641db6a0e82

Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
milestone: none → kilo-rc1
status: Fix Committed → Fix Released
Jeremy Stanley (fungi)
description: updated
Thierry Carrez (ttx)
Changed in nova:
milestone: kilo-rc1 → 2015.1.0
To post a comment you must log in.
This report contains Public Security information  
Everyone can see this security related information.

Other bug subscribers

Remote bug watches

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