exp: use the patches that I submitted for review.
Change-Id: I82b077496af46e728080afa3bf18390898f72aac
diff --git a/patches/openstack/cinder/storpool-clone-volume.patch b/patches/openstack/cinder/storpool-clone-volume.patch
index 8b8c55c..6e1a83e 100644
--- a/patches/openstack/cinder/storpool-clone-volume.patch
+++ b/patches/openstack/cinder/storpool-clone-volume.patch
@@ -1,27 +1,33 @@
-commit 5563b42f8ba435bc45e08399c77ac350156d9aa2
-Author: Peter Penchev <openstack-dev@storpool.com>
-Date: Wed Apr 20 15:47:39 2022 +0300
+From 78a748a4abd7aa1aa56256222754a1206001af12 Mon Sep 17 00:00:00 2001
+From: Peter Penchev <openstack-dev@storpool.com>
+Date: Wed, 20 Apr 2022 15:47:39 +0300
+Subject: [PATCH 6/8] StorPool: create_cloned_volume() improvements
- StorPool: create_cloned_volume() improvements
-
- If the source and destination volumes are in the same StorPool template
- (as defined by either the volume type or the global config setting),
- forego the need to create the transient snapshot at all and use
- StorPool's "base this volume on that one" API call (which does the same
- thing internally, but much more efficiently and atomically).
-
- If the destination volume should be in a different StorPool template,
- then make sure that the transient snapshot is also in that template so
- that, if other volumes are cloned from the same source volume later,
- they can all use the same data underneath (the internal workings of
- StorPool will detect that all those snapshots are exactly the same and
- not duplicate any data in the destination template). This will avoid
- data duplication, sometimes with drastic results.
-
- Bump the minimum required version of the "storpool" third-party library
- for snapshotUpdate(template=...) support.
-
- Change-Id: Ib9bb76cf2e2f2b035b92e596b1ef185558b190d6
+If the source and destination volumes are in the same StorPool template
+(as defined by either the volume type or the global config setting),
+forego the need to create the transient snapshot at all and use
+StorPool's "base this volume on that one" API call (which does the same
+thing internally, but much more efficiently and atomically).
+
+If the destination volume should be in a different StorPool template,
+then make sure that the transient snapshot is also in that template so
+that, if other volumes are cloned from the same source volume later,
+they can all use the same data underneath (the internal workings of
+StorPool will detect that all those snapshots are exactly the same and
+not duplicate any data in the destination template). This will avoid
+data duplication, sometimes with drastic results.
+
+Bump the minimum required version of the "storpool" third-party library
+for snapshotUpdate(template=...) support.
+
+Change-Id: Ib9bb76cf2e2f2b035b92e596b1ef185558b190d6
+---
+ .../unit/volume/drivers/test_storpool.py | 152 +++++++++++++++---
+ cinder/volume/drivers/storpool.py | 87 ++++++++--
+ driver-requirements.txt | 2 +-
+ ...torpool-clone-better-dca90f40c9273de9.yaml | 6 +
+ 4 files changed, 211 insertions(+), 36 deletions(-)
+ create mode 100644 releasenotes/notes/storpool-clone-better-dca90f40c9273de9.yaml
diff --git a/cinder/tests/unit/volume/drivers/test_storpool.py b/cinder/tests/unit/volume/drivers/test_storpool.py
index 843283db4..51db7f292 100644
@@ -282,7 +288,7 @@
self.driver.create_volume({'id': 'cfgtempl2', 'name': 'v1', 'size': 1,
diff --git a/cinder/volume/drivers/storpool.py b/cinder/volume/drivers/storpool.py
-index 58ceed1be..36ad98ded 100644
+index d76957c88..696c86550 100644
--- a/cinder/volume/drivers/storpool.py
+++ b/cinder/volume/drivers/storpool.py
@@ -1,4 +1,4 @@
@@ -305,15 +311,15 @@
from cinder import exception
from cinder.i18n import _
from cinder import interface
-@@ -94,6 +96,7 @@ class StorPoolDriver(driver.VolumeDriver):
- 2.0.0 - Drop _attach_volume() and _detach_volume(), our os-brick
- connector will handle this.
+@@ -96,6 +98,7 @@ class StorPoolDriver(driver.VolumeDriver):
+ - Detach temporary snapshots and volumes after copying data
+ to or from from Glance images.
- Drop backup_volume()
+ - Avoid data duplication in create_cloned_volume()
"""
VERSION = '2.0.0'
-@@ -200,30 +203,80 @@ class StorPoolDriver(driver.VolumeDriver):
+@@ -202,30 +205,80 @@ class StorPoolDriver(driver.VolumeDriver):
def create_cloned_volume(self, volume, src_vref):
refname = self._attach.volumeName(src_vref['id'])
@@ -423,3 +429,18 @@
storpool.spopenstack>=2.2.1 # Apache-2.0
# Datera
+diff --git a/releasenotes/notes/storpool-clone-better-dca90f40c9273de9.yaml b/releasenotes/notes/storpool-clone-better-dca90f40c9273de9.yaml
+new file mode 100644
+index 000000000..180427d9e
+--- /dev/null
++++ b/releasenotes/notes/storpool-clone-better-dca90f40c9273de9.yaml
+@@ -0,0 +1,6 @@
++---
++features:
++ - |
++ StorPool driver: improved the way volumes are clonsed into different
++ StorPool templates (exposed as Cinder storage pools) if requested,
++ eliminating some data duplication in the underlying StorPool cluster.
+--
+2.35.1
+