[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
This commit is contained in:
Simon Dodsley 2021-07-16 09:52:18 -04:00
parent a7e98dba5b
commit eb5c8183b6
2 changed files with 9 additions and 2 deletions

View File

@ -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

View File

@ -0,0 +1,7 @@
---
fixes:
- |
Pure Storage FlashArray driver `bug #1936663
<https://bugs.launchpad.net/cinder/+bug/1936663>`_: Fixes issue where
cloning a consistency group containing volumes with very long names
causes a crash - Required for PowerVC support