[Storwize] Retype of a non-rep mirror volume to mirror- volume-type with different mirror_pool is failing

Bug #1949061 reported by Mounika Sreeram
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Fix Released
Medium
Mounika Sreeram

Bug Description

On the SVC cinder driver, facing an issue while retyping a non_replication mirror volume(Local mirror copy) to a volume-type template with a different mirror_pool than the former one with which volume is being created.

ERROR cinder.volume.manager [req-5bac621a-80a4-46ad-9e73-eddbaafb60f9 req-eeeb5dfa-0ec9-4b25-8f18-f260d6345fb3 admin None] Volume 5ce4016d-079a-4b5b-a03d-011fffc69dd5: driver error when trying to retype, falling back to generic mechanism.: UnboundLocalError: local variable 'msg' referenced before assignment
ERROR cinder.volume.manager Traceback (most recent call last):
ERROR cinder.volume.manager File "/opt/stack/cinder/cinder/volume/manager.py", line 3039, in retype
ERROR cinder.volume.manager ret = self.driver.retype(context,
ERROR cinder.volume.manager File "/opt/stack/cinder/cinder/volume/drivers/ibm/storwize_svc/storwize_svc_common.py", line 5405, in retype
ERROR cinder.volume.manager self._verify_retype_params(volume, new_opts, old_opts, need_copy,
ERROR cinder.volume.manager File "/opt/stack/cinder/cinder/volume/drivers/ibm/storwize_svc/storwize_svc_common.py", line 5193, in _verify_retype_params
ERROR cinder.volume.manager raise exception.VolumeDriverException(message=msg)
ERROR cinder.volume.manager UnboundLocalError: local variable 'msg' referenced before assignment
ERROR cinder.volume.manager
ERROR oslo_messaging.rpc.server [req-5bac621a-80a4-46ad-9e73-eddbaafb60f9 req-eeeb5dfa-0ec9-4b25-8f18-f260d6345fb3 admin None] Exception during message handling: cinder.exception.VolumeMigrationFailed: Volume migration failed: Retype requires migration but is not allowed.

Steps to Reproduce:
1. Create two Non-replication mirror-volume-types with different mirror_pool spec value[Ex: mirror_volume_type_1 with mirror_pool = pool1, mirror_volume_type_2 with mirror_pool = pool2]
2. Create a Non-rep mirror volume(ex: non-rep-vol1) with the volume-type template 'mirror_volume_type1'
3. Retype the volume 'non-rep-vol1' to the volume-type template 'mirror_volume_type2'
4. Expected : Retype operation should be successful
   Actual result: Failing with UnboundLocalError: local variable 'msg' referenced before assignment

Changed in cinder:
assignee: nobody → Mounika Sreeram (mounika-sreeram)
description: updated
summary: - [Storwize] Retype of Thin provision mirror volume to another mirror
- volume type with change of mirror pool
+ [Storwize] Retype of a non-rep mirror volume to mirror- volume-type with
+ different mirror_pool is failing
Changed in cinder:
importance: Undecided → Medium
tags: added: replications retype storwize svc
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinder (master)

Fix proposed to branch: master
Review: https://review.opendev.org/c/openstack/cinder/+/816324

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

Reviewed: https://review.opendev.org/c/openstack/cinder/+/816324
Committed: https://opendev.org/openstack/cinder/commit/50e173101162b32949bc51eba288c5b773cb9cb1
Submitter: "Zuul (22348)"
Branch: master

commit 50e173101162b32949bc51eba288c5b773cb9cb1
Author: Mounika Sreeram <email address hidden>
Date: Tue Nov 2 10:23:02 2021 +0000

    [SVF] Fix Retype issue of mirror volume

    [Spectrum Virtualize Family] Retype of mirror-volume to volume-type
    with different mirror-pool scenario is not working.

    When there is a change of mirror-pool in retype operation then it is
    checking whether source/target type has data reduction pool. If it
    contains data reduction pool, it will throw an exception. If not,
    it has to continue the retype operation with change of mirror pool.
    Due to the incorrect place of raising an exception for
    data-reduction pool,it is effecting the retype operation of
    volume-type with different mirror-pool.

    Updated the code to raise an exception correctly to fix this issue.

    Closes-Bug: #1949061
    Change-Id: I12018c3a1f6e4e59a4923ef81da85c2d7c74e96d

Changed in cinder:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/cinder 20.0.0.0rc1

This issue was fixed in the openstack/cinder 20.0.0.0rc1 release candidate.

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.