[Pure Storage] Clone CG fails when volume names are very long

Bug #1936663 reported by Simon Dodsley
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Fix Released
Undecided
Simon Dodsley

Bug Description

In PowerVC, volume names can be very long and have to be truncated to be valid for a Pure Storage FlashArray.

When these long-named and therefore truncated volume names are in a consistency group, a clone of the CG is using the long, non-truncated, name of the volume and therefore crashes with "no such volume".

Crash example:

2021-07-15 07:44:52.344 3105570 ERROR oslo_messaging.rpc.server self._create_cg_from_cgsnap(volumes,snapshots)
2021-07-15 07:44:52.344 3105570 ERROR oslo_messaging.rpc.server File "/usr/lib/python3.6/site-packages/cinder/volume/drivers/pure.py", line 973, in _create_cg_from_cgsnap
2021-07-15 07:44:52.344 3105570 ERROR oslo_messaging.rpc.server self.create_volume_from_snapshot(volume, snapshot)
2021-07-15 07:44:52.344 3105570 ERROR oslo_messaging.rpc.server File "/usr/lib/python3.6/site-packages/cinder/volume/drivers/pure.py", line 194, in wrapper
2021-07-15 07:44:52.344 3105570 ERROR oslo_messaging.rpc.server result = f(*args, **kwargs)
2021-07-15 07:44:52.344 3105570 ERROR oslo_messaging.rpc.server File "/usr/lib/python3.6/site-packages/cinder/volume/drivers/pure.py", line 537, in create_volume_from_snapshot
2021-07-15 07:44:52.344 3105570 ERROR oslo_messaging.rpc.server current_array.copy_volume(snap_name, vol_name)
2021-07-15 07:44:52.344 3105570 ERROR oslo_messaging.rpc.server File "/usr/lib/python3.6/site-packages/purestorage/purestorage.py", line 572, in copy_volume
2021-07-15 07:44:52.344 3105570 ERROR oslo_messaging.rpc.server return self._request("POST", "volume/{0}".format(dest), data)
2021-07-15 07:44:52.344 3105570 ERROR oslo_messaging.rpc.server File "/usr/lib/python3.6/site-packages/cinder/volume/drivers/pure.py", line 1598, in wrapper
2021-07-15 07:44:52.344 3105570 ERROR oslo_messaging.rpc.server ret = fn(*args, **kwargs)
2021-07-15 07:44:52.344 3105570 ERROR oslo_messaging.rpc.server File "/usr/lib/python3.6/site-packages/purestorage/purestorage.py", line 202, in _request
2021-07-15 07:44:52.344 3105570 ERROR oslo_messaging.rpc.server raise PureHTTPError(self._target, str(self._rest_version), response)
2021-07-15 07:44:52.344 3105570 ERROR oslo_messaging.rpc.server purestorage.purestorage.PureHTTPError: PureHTTPError status code 400 returned by REST version 1.17 at 9.3.250.85: BAD REQUEST
2021-07-15 07:44:52.344 3105570 ERROR oslo_messaging.rpc.server [{"msg": "No such volume or snapshot.", "ctx": "consisgroup-5948fb3b-697e-4915-9485-06749f662d16-cinder.cgsnapshot-e7662e2d-4a05-4450-a2b8-124d0a7f045f-cinder.volume-jaffer-Image-Sal-NpIV-Image-volume-1--e265db11-8649-cinder"}]

Changed in cinder:
assignee: nobody → Simon Dodsley (simon-dodsley)
status: New → In Progress
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/+/801065

tags: added: purestorage
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinder (master)

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

commit eb5c8183b6dcd2800acd04d9254b1be11adcba9f
Author: Simon Dodsley <email address hidden>
Date: Fri Jul 16 09:52:18 2021 -0400

    [Pure Storage] Fix CG cloning crash when very long volume names

    Specifically for PowerVC when volumes have VERY long names they
    currently truncated to an acceptible length. This truncation
    was missing for volumes in a consistency group so when cloning
    of the CG occured, the clone command would fail due to an
    incorrect volume name.

    Change-Id: I84ff54268550e4e27fa8b2c8d7d02459c4f6d7c4
    Closes-Bug: #1936663

Changed in cinder:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinder (stable/wallaby)

Fix proposed to branch: stable/wallaby
Review: https://review.opendev.org/c/openstack/cinder/+/801321

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/cinder 19.0.0.0b1

This issue was fixed in the openstack/cinder 19.0.0.0b1 development milestone.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinder (stable/wallaby)

Reviewed: https://review.opendev.org/c/openstack/cinder/+/801321
Committed: https://opendev.org/openstack/cinder/commit/80f5ad51259ca82654f9f0307f29a25e748077be
Submitter: "Zuul (22348)"
Branch: stable/wallaby

commit 80f5ad51259ca82654f9f0307f29a25e748077be
Author: Simon Dodsley <email address hidden>
Date: Fri Jul 16 09:52:18 2021 -0400

    [Pure Storage] Fix CG cloning crash when very long volume names

    Specifically for PowerVC when volumes have VERY long names they
    currently truncated to an acceptable length. This truncation
    was missing for volumes in a consistency group so when cloning
    of the CG occured, the clone command would fail due to an
    incorrect volume name.

    Change-Id: I84ff54268550e4e27fa8b2c8d7d02459c4f6d7c4
    Closes-Bug: #1936663
    (cherry picked from commit eb5c8183b6dcd2800acd04d9254b1be11adcba9f)

tags: added: in-stable-wallaby
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/cinder 18.1.0

This issue was fixed in the openstack/cinder 18.1.0 release.

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.