Storwize: update_migrated_volume() fails to find source name

Bug #1721583 reported by Carl Pecinovsky
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Fix Released
Low
Carl Pecinovsky

Bug Description

When using retype to migrate a volume from one type to a Storwize driver volume type, the update_migrated_volume() driver method can fail to rename the backend volume:

2017-09-07 14:06:43.601 21819 ERROR cinder.volume.drivers.ibm.storwize_svc.storwize_svc_common [req-5ace7e9b-050c-4baf-953c-7c1c0fdf43c3 0688b01e6439ca32d698d20789d52169126fb41fb1a4ddafcebb97d854e836c9 1e1052e0b48b44fa85f92a9bc7226836 - default default] Error has occurred: Unexpected error while running command.
Command: svctask chvdisk -name volume-9d9a50a9-27d0-46b3-a0d7-7309ba13bced "volume-d43b8f81-61f7-44ee-89e6-3173c001900f"
Exit code: 1
Stdout: u''
Stderr: u'CMMVC5753E The specified object does not exist or is not a suitable candidate.\n': ProcessExecutionError: Unexpected error while running command.

The reason is that the implementation assumes the current backend volume name is based on a configuration property. In our case it no longer is based on the format of the config property:

        current_name = CONF.volume_name_template % new_volume['id']
        original_volume_name = CONF.volume_name_template % volume['id']

Also, the "original volume" can be coming from a completely different backend type with a config property that is different from the Storwize drivers. For greatest applicability, I don't see a downside to changing the code to (?):

        current_name = new_volume['name']
        original_volume_name = volume['name']

That seems to do the proper thing in my testing.

Isaac Beckman (isaacb)
Changed in cinder:
assignee: nobody → IBM Storage (ibm-storage)
tags: added: drivers storwize
Changed in cinder:
importance: Undecided → Low
Carl Pecinovsky (csky)
Changed in cinder:
assignee: IBM Storage (ibm-storage) → Carl Pecinovsky (csky)
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/533754

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.openstack.org/533754
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=22b73784ae4463b335456902c3cbf40acdc6e263
Submitter: Zuul
Branch: master

commit 22b73784ae4463b335456902c3cbf40acdc6e263
Author: Carl Pecinovsky <email address hidden>
Date: Mon Jan 15 13:15:08 2018 -0500

    Storwize: Use passed volume names in migrate

    For the storwize driver, update_migrated_volume() impl, the
    original and temporary volume names were generated from a
    configuration template value, rather than using the names of
    the volumes passed. This only works if the storwize driver
    created the original volume, but breaks down if it originated
    elsewhere.
    Make a small change to use the passed in volume name properties
    instead. Add a couple asserts to the test cases.

    Change-Id: I1c719e6858426416b56357d2f071584209757a78
    Closes-Bug: #1721583

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

This issue was fixed in the openstack/cinder 12.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.