incorrect status comparison when doing non-disruptive volume backup for attached volume

Bug #1480734 reported by Peter Wang
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Fix Released
High
Lin Yang

Bug Description

Hi

when do backup for an attached volume, it's status should be 'in-use' instead of 'in_use'
see debug output
==============================

754 # then clean up the temp volume; if 'available', just backup the
755 # volume.
756 previous_status = volume.get('previous_status', None)
757 temp_vol_ref = None
758 import pdb;pdb.set_trace()
759 -> if previous_status == "in_use": ----->(Peter) here should be "in-user"
760 temp_vol_ref = self._create_temp_cloned_volume(
761 context, volume)
762 backup.temp_volume_id = temp_vol_ref['id']
763 backup.save()
764 volume = temp_vol_ref
(Pdb) print previous_status
in-use

so when doing backup, cloned volume will not be created, and driver tries to attach original volume to Cinder node.

this bug is introduced by https://review.openstack.org/#/c/193937

Thanks
Peter

Lin Yang (lin-a-yang)
Changed in cinder:
assignee: nobody → Lin Yang (lin-a-yang)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinder (master)

Fix proposed to branch: master
Review: https://review.openstack.org/208356

Changed in cinder:
status: New → In Progress
Xing Yang (xing-yang)
Changed in cinder:
importance: Undecided → High
milestone: none → liberty-3
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinder (master)

Reviewed: https://review.openstack.org/208356
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=878007122f6c2590893daea35ab92bb51d624b03
Submitter: Jenkins
Branch: master

commit 878007122f6c2590893daea35ab92bb51d624b03
Author: Lin Yang <email address hidden>
Date: Mon Aug 3 15:28:15 2015 +0800

    Fix status comparison for attached volume backup

    1) When do backup for an attached volume, its previous_status should be
    'in-use' instead of 'in_use'.
    2) Added more assertions in corresponding unittest case for this function
    to make sure it enter this if-block. Previous test case was passed even
    with the incorrect status.

    Change-Id: I80385aa593aea5d749409bf591e5a3c5f8ed478f
    Closes-Bug: #1480734

Changed in cinder:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in cinder:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in cinder:
milestone: liberty-3 → 7.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.