Tautology in libvirt driver cleanup method

Bug #1544103 reported by Timofey Durakov on 2016-02-10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)

Bug Description

for clean up phase in driver destroy_disks parameter is calculated in compute manager https://github.com/openstack/nova/blob/8615de1bb7afac8ffbd7d9c8f8e7235c49df9b39/nova/compute/manager.py#L5303 like:
 destroy_disks = not is_shared_block_storage
Then in libvirt driver cleanup method there is expression

if destroy_disks or is_shared_block_storage:

which doesn't make sense as its tautology and always evaluated to True.

Changed in nova:
status: New → Confirmed
importance: Undecided → Low
Sana Khan (sana.khan) on 2016-02-11
Changed in nova:
assignee: nobody → Sana Khan (sana.khan)
Changed in nova:
assignee: Sana Khan (sana.khan) → Timofey Durakov (tdurakov)
status: Confirmed → In Progress
Sana Khan (sana.khan) wrote :

The expression 'if destroy_disks or is_shared_block_storage:'

will be a Tautology only when both the ifs are evaluated as true:


For other cases, it won't be a Tautology.

Changed in nova:
status: In Progress → Confirmed
Timofey Durakov (tdurakov) wrote :

@sana.khan, yes, and it's exactly libvirt driver case.

Changed in nova:
status: Confirmed → In Progress

Change abandoned by Michael Still (<email address hidden>) on branch: master
Review: https://review.openstack.org/302611
Reason: This patch has been sitting unchanged for more than 12 weeks. I am therefore going to abandon it to keep the nova review queue sane. Please feel free to restore the change if you're still working on it.

Sean Dague (sdague) wrote :

There are no currently open reviews on this bug, changing
the status back to the previous state and unassigning. If
there are active reviews related to this bug, please include
links in comments.

Changed in nova:
status: In Progress → Confirmed
assignee: Timofey Durakov (tdurakov) → nobody
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers