From eb5c8183b6dcd2800acd04d9254b1be11adcba9f Mon Sep 17 00:00:00 2001 From: Simon Dodsley Date: Fri, 16 Jul 2021 09:52:18 -0400 Subject: [PATCH] [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 --- cinder/volume/drivers/pure.py | 4 ++-- releasenotes/notes/pure_fix_clone_cg-cfdf7d16b63882f8.yaml | 7 +++++++ 2 files changed, 9 insertions(+), 2 deletions(-) create mode 100644 releasenotes/notes/pure_fix_clone_cg-cfdf7d16b63882f8.yaml diff --git a/cinder/volume/drivers/pure.py b/cinder/volume/drivers/pure.py index 7e19529eeb9..cdc3f41be8e 100644 --- a/cinder/volume/drivers/pure.py +++ b/cinder/volume/drivers/pure.py @@ -1804,9 +1804,9 @@ class PureBaseVolumeDriver(san.SanDriver): elif snapshot.cgsnapshot: group_snap = snapshot.cgsnapshot - pg_vol_snap_name = "%(group_snap)s.%(volume_name)s-cinder" % { + pg_vol_snap_name = "%(group_snap)s.%(volume_name)s" % { 'group_snap': self._get_pgroup_snap_name(group_snap), - 'volume_name': snapshot.volume_name + 'volume_name': self._get_vol_name(snapshot.volume) } return pg_vol_snap_name diff --git a/releasenotes/notes/pure_fix_clone_cg-cfdf7d16b63882f8.yaml b/releasenotes/notes/pure_fix_clone_cg-cfdf7d16b63882f8.yaml new file mode 100644 index 00000000000..33cd3d52dd5 --- /dev/null +++ b/releasenotes/notes/pure_fix_clone_cg-cfdf7d16b63882f8.yaml @@ -0,0 +1,7 @@ +--- +fixes: + - | + Pure Storage FlashArray driver `bug #1936663 + `_: Fixes issue where + cloning a consistency group containing volumes with very long names + causes a crash - Required for PowerVC support