Update the StorPool Cinder patches
We reordered some of the patches we apply upstream, so later patches would
generate conflicts if applied to an attempt to build earlier ones.
Change-Id: I4040830a11c5e5979dcaf1eaa50e8aa3f66a4412
diff --git a/patches/openstack/cinder/sep-clone-across-pools.patch b/patches/openstack/cinder/sep-clone-across-pools.patch
index 33064ec..fade092 100644
--- a/patches/openstack/cinder/sep-clone-across-pools.patch
+++ b/patches/openstack/cinder/sep-clone-across-pools.patch
@@ -1,7 +1,7 @@
-From c75191ca7990e28528b008066f4c2b89f6dab72f Mon Sep 17 00:00:00 2001
+From 8ce9bb75fb32c921043b14b43884c8b1660cd9b8 Mon Sep 17 00:00:00 2001
From: Peter Penchev <openstack-dev@storpool.com>
Date: Wed, 22 Jun 2022 10:04:31 +0300
-Subject: [PATCH 01/10] Add the clone_across_pools driver capability
+Subject: [PATCH 08/10] Add the clone_across_pools driver capability
Let drivers declare that they can clone a volume into a different pool and
relax the checks when creating a volume from an image (both with and
@@ -269,7 +269,7 @@
for image_volume in image_volumes:
# For the case image volume is stored in the service tenant,
diff --git a/cinder/volume/manager.py b/cinder/volume/manager.py
-index c2c52ec82..26e30d67b 100644
+index 104291563..88c037279 100644
--- a/cinder/volume/manager.py
+++ b/cinder/volume/manager.py
@@ -356,7 +356,8 @@ class VolumeManager(manager.CleanableManager,
@@ -283,10 +283,10 @@
LOG.info('Image-volume cache enabled for host %(host)s.',
{'host': self.host})
diff --git a/doc/source/reference/support-matrix.ini b/doc/source/reference/support-matrix.ini
-index 514e2c016..163a7a37c 100644
+index 6c3af739e..3bb2be72b 100644
--- a/doc/source/reference/support-matrix.ini
+++ b/doc/source/reference/support-matrix.ini
-@@ -1035,3 +1035,81 @@ driver.win_iscsi=missing
+@@ -1048,3 +1048,81 @@ driver.win_iscsi=missing
driver.win_smb=missing
driver.yadro=complete
driver.zadara=missing
@@ -369,5 +369,5 @@
+driver.yadro=missing
+driver.zadara=missing
--
-2.40.1
+2.42.0
diff --git a/patches/openstack/cinder/sep-sp-clone-across-pools.patch b/patches/openstack/cinder/sep-sp-clone-across-pools.patch
index 0cd1b26..4862989 100644
--- a/patches/openstack/cinder/sep-sp-clone-across-pools.patch
+++ b/patches/openstack/cinder/sep-sp-clone-across-pools.patch
@@ -1,7 +1,7 @@
-From a0ff072ee506ff7eedda4b727cd613b6032fcfd9 Mon Sep 17 00:00:00 2001
+From 381f77449f30d9a860eeef532963e21f895c00e9 Mon Sep 17 00:00:00 2001
From: Peter Penchev <openstack-dev@storpool.com>
Date: Wed, 22 Jun 2022 10:48:25 +0300
-Subject: [PATCH 02/10] StorPool: declare the clone_across_pools capability
+Subject: [PATCH 09/10] StorPool: declare the clone_across_pools capability
Change-Id: I5338c6c4f53a448e495f695cd64b36b722cd947d
---
@@ -12,22 +12,22 @@
create mode 100644 releasenotes/notes/storpool-clone-across-pools-b3f7923dee35503a.yaml
diff --git a/cinder/volume/drivers/storpool.py b/cinder/volume/drivers/storpool.py
-index 47685cb3f..328f76c00 100644
+index 5b4ea0d31..b15a201c3 100644
--- a/cinder/volume/drivers/storpool.py
+++ b/cinder/volume/drivers/storpool.py
-@@ -308,6 +308,7 @@ class StorPoolDriver(driver.VolumeDriver):
+@@ -362,6 +362,7 @@ class StorPoolDriver(driver.VolumeDriver):
'driver_version': self.VERSION,
'storage_protocol': constants.STORPOOL,
-
+ # Driver capabilities
+ 'clone_across_pools': True,
'sparse_copy_volume': True,
-
+ # The actual pools data
'pools': pools
diff --git a/doc/source/reference/support-matrix.ini b/doc/source/reference/support-matrix.ini
-index 163a7a37c..7ee51b722 100644
+index 3bb2be72b..7964d9807 100644
--- a/doc/source/reference/support-matrix.ini
+++ b/doc/source/reference/support-matrix.ini
-@@ -1102,7 +1102,7 @@ driver.rbd=missing
+@@ -1115,7 +1115,7 @@ driver.rbd=missing
driver.rbd_iscsi=missing
driver.sandstone=missing
driver.seagate=missing
@@ -49,5 +49,5 @@
+ which allows it to create a volume into an arbitrary StorPool-backed
+ volume type from a StorPool-backed Glance image.
--
-2.40.1
+2.42.0
diff --git a/patches/openstack/cinder/sep-sp-clone-volume.patch b/patches/openstack/cinder/sep-sp-clone-volume.patch
index 4e18294..6e7f90f 100644
--- a/patches/openstack/cinder/sep-sp-clone-volume.patch
+++ b/patches/openstack/cinder/sep-sp-clone-volume.patch
@@ -1,7 +1,7 @@
-From dacb33483344276f909e1be008d0eb45758f1923 Mon Sep 17 00:00:00 2001
+From 842b39e2e8e73ea2dda84955d3ab99d9efbfa527 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 09/10] StorPool: create_cloned_volume() improvements
+Subject: [PATCH 07/10] 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),
@@ -282,7 +282,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 dcad96bb8..b15a201c3 100644
+index 97d188fd4..5b4ea0d31 100644
--- a/cinder/volume/drivers/storpool.py
+++ b/cinder/volume/drivers/storpool.py
@@ -19,11 +19,13 @@ import platform
@@ -422,5 +422,5 @@
+ StorPool templates (exposed as Cinder storage pools) if requested,
+ eliminating some data duplication in the underlying StorPool cluster.
--
-2.40.1
+2.42.0
diff --git a/patches/openstack/cinder/sep-sp-cosmetic-comments.patch b/patches/openstack/cinder/sep-sp-cosmetic-comments.patch
index d2ea5d3..0595830 100644
--- a/patches/openstack/cinder/sep-sp-cosmetic-comments.patch
+++ b/patches/openstack/cinder/sep-sp-cosmetic-comments.patch
@@ -1,7 +1,7 @@
-From 1bf20850bdbd86997a59bc639ae51be71dd99da8 Mon Sep 17 00:00:00 2001
+From 0912d760d1329eb3e1ccfc79b99a916e810d0f20 Mon Sep 17 00:00:00 2001
From: Peter Penchev <openstack-dev@storpool.com>
Date: Mon, 13 Feb 2023 11:15:27 +0200
-Subject: [PATCH 03/10] StorPool: cosmetic: comment headings instead of empty
+Subject: [PATCH 01/10] StorPool: cosmetic: comment headings instead of empty
lines
Instead of using empty lines to separate semantically different
@@ -14,10 +14,10 @@
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/cinder/volume/drivers/storpool.py b/cinder/volume/drivers/storpool.py
-index 328f76c00..8c2989fa8 100644
+index 47685cb3f..d42d1c68c 100644
--- a/cinder/volume/drivers/storpool.py
+++ b/cinder/volume/drivers/storpool.py
-@@ -302,15 +302,16 @@ class StorPoolDriver(driver.VolumeDriver):
+@@ -302,14 +302,15 @@ class StorPoolDriver(driver.VolumeDriver):
) for t in templates]
self._stats = {
@@ -29,7 +29,6 @@
'storage_protocol': constants.STORPOOL,
-
+ # Driver capabilities
- 'clone_across_pools': True,
'sparse_copy_volume': True,
-
+ # The actual pools data
@@ -37,5 +36,5 @@
}
--
-2.40.1
+2.42.0
diff --git a/patches/openstack/cinder/sep-sp-fix-test-rename.patch b/patches/openstack/cinder/sep-sp-fix-test-rename.patch
index 40a0f5f..720b62b 100644
--- a/patches/openstack/cinder/sep-sp-fix-test-rename.patch
+++ b/patches/openstack/cinder/sep-sp-fix-test-rename.patch
@@ -1,7 +1,7 @@
-From 769fa5b7ec1e333544f5b8e454225757db73fb87 Mon Sep 17 00:00:00 2001
+From 2835c8aeb39313e927a4c13a7ce78d5386c4d909 Mon Sep 17 00:00:00 2001
From: Peter Penchev <openstack-dev@storpool.com>
Date: Tue, 17 Jan 2023 01:20:59 +0200
-Subject: [PATCH 07/10] StorPool: fix the "rename volume" unit test emulation
+Subject: [PATCH 05/10] StorPool: fix the "rename volume" unit test emulation
Also update the "name" field of the actual data structure in
the fake list of volumes.
@@ -37,5 +37,5 @@
@mock_volume_types
def test_create_delete_volume(self):
--
-2.40.1
+2.42.0
diff --git a/patches/openstack/cinder/sep-sp-iscsi.patch b/patches/openstack/cinder/sep-sp-iscsi.patch
index 5571ce5..8c07013 100644
--- a/patches/openstack/cinder/sep-sp-iscsi.patch
+++ b/patches/openstack/cinder/sep-sp-iscsi.patch
@@ -1,4 +1,4 @@
-From 6e24ec90deb5e5977a4654c0e9f7f02e99ddb131 Mon Sep 17 00:00:00 2001
+From 15fe701cfc698a2d8d3ce12ba33983a42e50411e Mon Sep 17 00:00:00 2001
From: Peter Penchev <openstack-dev@storpool.com>
Date: Mon, 12 Mar 2018 12:00:10 +0200
Subject: [PATCH 10/10] Add iSCSI export support to the StorPool driver
@@ -25,15 +25,15 @@
Change-Id: I9de64306e0e6976268df782053b0651dd1cca96f
---
- .../unit/volume/drivers/test_storpool.py | 435 +++++++++++++++++-
+ .../unit/volume/drivers/test_storpool.py | 437 +++++++++++++++++-
cinder/volume/drivers/storpool.py | 374 ++++++++++++++-
.../drivers/storpool-volume-driver.rst | 60 ++-
- .../storpool-iscsi-cefcfe590a07c5c7.yaml | 10 +
- 4 files changed, 870 insertions(+), 9 deletions(-)
+ .../storpool-iscsi-cefcfe590a07c5c7.yaml | 13 +
+ 4 files changed, 874 insertions(+), 10 deletions(-)
create mode 100644 releasenotes/notes/storpool-iscsi-cefcfe590a07c5c7.yaml
diff --git a/cinder/tests/unit/volume/drivers/test_storpool.py b/cinder/tests/unit/volume/drivers/test_storpool.py
-index 95a1ffffd..842790ab4 100644
+index 95a1ffffd..2b76e7c75 100644
--- a/cinder/tests/unit/volume/drivers/test_storpool.py
+++ b/cinder/tests/unit/volume/drivers/test_storpool.py
@@ -14,15 +14,25 @@
@@ -403,6 +403,15 @@
({'no-host': None}, KeyError),
({'host': 'sbad'}, driver.StorPoolConfigurationInvalid),
)
+@@ -286,7 +584,7 @@ class StorPoolTestCase(test.TestCase):
+ self.assertEqual(21, pool['total_capacity_gb'])
+ self.assertEqual(5, int(pool['free_capacity_gb']))
+
+- self.assertTrue(pool['multiattach'])
++ self.assertFalse(pool['multiattach'])
+ self.assertFalse(pool['QoS_support'])
+ self.assertFalse(pool['thick_provisioning_support'])
+ self.assertTrue(pool['thin_provisioning_support'])
@@ -644,3 +942,136 @@ class StorPoolTestCase(test.TestCase):
self.driver.get_pool({
'volume_type': volume_type
@@ -541,7 +550,7 @@
+ volumeName(fconst.VOLUME_ID),
+ )
diff --git a/cinder/volume/drivers/storpool.py b/cinder/volume/drivers/storpool.py
-index b15a201c3..ba5aa10c3 100644
+index b15a201c3..d8c420a66 100644
--- a/cinder/volume/drivers/storpool.py
+++ b/cinder/volume/drivers/storpool.py
@@ -15,6 +15,7 @@
@@ -974,7 +983,7 @@
'free_capacity_gb': free / units.Gi,
'reserved_percentage': 0,
- 'multiattach': True,
-+ 'multiattach': not self._use_iscsi,
++ 'multiattach': self._use_iscsi,
'QoS_support': False,
'thick_provisioning_support': False,
'thin_provisioning_support': True,
@@ -1078,10 +1087,10 @@
diff --git a/releasenotes/notes/storpool-iscsi-cefcfe590a07c5c7.yaml b/releasenotes/notes/storpool-iscsi-cefcfe590a07c5c7.yaml
new file mode 100644
-index 000000000..c48686abb
+index 000000000..edf46d298
--- /dev/null
+++ b/releasenotes/notes/storpool-iscsi-cefcfe590a07c5c7.yaml
-@@ -0,0 +1,10 @@
+@@ -0,0 +1,13 @@
+---
+features:
+ - |
@@ -1092,6 +1101,9 @@
+ the Cinder documentation for more information on the ``iscsi_export_to``,
+ ``iscsi_portal_group``, ``iscsi_cinder_volume``, and
+ ``iscsi_learn_initiator_iqns`` options.
++ Note that multiattach support for StorPool is now only enabled if
++ ``iscsi_export_to`` is set to ``*`, that is, all StorPool volumes will be
++ exported via iSCSI to all initiators.
--
-2.40.1
+2.42.0
diff --git a/patches/openstack/cinder/sep-sp-leave-it-to-brick.patch b/patches/openstack/cinder/sep-sp-leave-it-to-brick.patch
index 1f3233d..e4583e8 100644
--- a/patches/openstack/cinder/sep-sp-leave-it-to-brick.patch
+++ b/patches/openstack/cinder/sep-sp-leave-it-to-brick.patch
@@ -1,7 +1,7 @@
-From ad5d9ec1cfb4dad9e3d4e2137d915ebe32e1d53f Mon Sep 17 00:00:00 2001
+From 9f79ab1ac4e5392b7c1ad8ab6f327abecea6e528 Mon Sep 17 00:00:00 2001
From: Peter Penchev <openstack-dev@storpool.com>
Date: Tue, 20 Apr 2021 17:46:41 +0300
-Subject: [PATCH 04/10] StorPool: drop _attach_volume() and _detach_volume()
+Subject: [PATCH 02/10] StorPool: drop _attach_volume() and _detach_volume()
Our os-brick connector already handles the "keep track of which volume
is attached for what reason" calls to storpool.spopenstack. However,
@@ -38,7 +38,7 @@
def test_noop_functions(self):
self.driver.terminate_connection(None, None)
diff --git a/cinder/volume/drivers/storpool.py b/cinder/volume/drivers/storpool.py
-index 8c2989fa8..cffbe9ee0 100644
+index d42d1c68c..1fc4262b2 100644
--- a/cinder/volume/drivers/storpool.py
+++ b/cinder/volume/drivers/storpool.py
@@ -168,6 +168,7 @@ class StorPoolDriver(driver.VolumeDriver):
@@ -49,7 +49,7 @@
}}
def terminate_connection(self, volume, connector, **kwargs):
-@@ -315,45 +316,6 @@ class StorPoolDriver(driver.VolumeDriver):
+@@ -314,45 +315,6 @@ class StorPoolDriver(driver.VolumeDriver):
'pools': pools
}
@@ -109,5 +109,5 @@
+ encrypted StorPool volumes by dropping the needlessly and incompletely
+ overridden `_attach_volume()` and `_detach_volume()` methods.
--
-2.40.1
+2.42.0
diff --git a/patches/openstack/cinder/sep-sp-retype-vol.patch b/patches/openstack/cinder/sep-sp-retype-vol.patch
index 1f42829..0e48852 100644
--- a/patches/openstack/cinder/sep-sp-retype-vol.patch
+++ b/patches/openstack/cinder/sep-sp-retype-vol.patch
@@ -1,7 +1,7 @@
-From 61908eaecc84808b77a4751ca890f92a6067c65e Mon Sep 17 00:00:00 2001
+From 816aa85f4b3b081f1e79436b9c6c60d47fb220e5 Mon Sep 17 00:00:00 2001
From: Peter Penchev <openstack-dev@storpool.com>
Date: Wed, 14 Dec 2022 17:55:56 +0200
-Subject: [PATCH 08/10] StorPool: fix the retype volume flow
+Subject: [PATCH 06/10] StorPool: fix the retype volume flow
Change-Id: I786733aae17dea47e3e6f2a393a947bfb46e70a3
Closes-Bug: #2002995
@@ -45,10 +45,10 @@
self.driver.delete_volume({'id': vid})
self.assertVolumeNames([])
diff --git a/cinder/volume/drivers/storpool.py b/cinder/volume/drivers/storpool.py
-index 956f7ae5a..dcad96bb8 100644
+index 37e36fd61..97d188fd4 100644
--- a/cinder/volume/drivers/storpool.py
+++ b/cinder/volume/drivers/storpool.py
-@@ -354,10 +354,12 @@ class StorPoolDriver(driver.VolumeDriver):
+@@ -353,10 +353,12 @@ class StorPoolDriver(driver.VolumeDriver):
update['template'] = templ
else:
update['replication'] = repl
@@ -65,7 +65,7 @@
if update:
name = self._attach.volumeName(volume['id'])
-@@ -382,21 +384,46 @@ class StorPoolDriver(driver.VolumeDriver):
+@@ -381,21 +383,46 @@ class StorPoolDriver(driver.VolumeDriver):
'created as part of the migration from '
'"%(oid)s".', {'tid': temp_id, 'oid': orig_id})
return {'_name_id': new_volume['_name_id'] or new_volume['id']}
@@ -119,5 +119,5 @@
+ {'tname': temp_name, 'oname': orig_name, 'err': e})
+ return {'_name_id': new_volume['_name_id'] or new_volume['id']}
--
-2.40.1
+2.42.0
diff --git a/patches/openstack/cinder/sep-sp-rm-backup.patch b/patches/openstack/cinder/sep-sp-rm-backup.patch
index 1f49d4c..8c7d334 100644
--- a/patches/openstack/cinder/sep-sp-rm-backup.patch
+++ b/patches/openstack/cinder/sep-sp-rm-backup.patch
@@ -1,7 +1,7 @@
-From 597e42b37bc722de3e075f3b1a34b79759cb5d86 Mon Sep 17 00:00:00 2001
+From a1b26cc52eb2855226052e19301e6e6827dcb699 Mon Sep 17 00:00:00 2001
From: Peter Penchev <openstack-dev@storpool.com>
Date: Mon, 11 May 2020 11:02:53 +0300
-Subject: [PATCH 05/10] StorPool driver: remove the obsolete backup_volume()
+Subject: [PATCH 03/10] StorPool driver: remove the obsolete backup_volume()
Follow suit with I984de3df803f12dbb95e3309e668b3fbd519e70f.
@@ -11,10 +11,10 @@
1 file changed, 29 deletions(-)
diff --git a/cinder/volume/drivers/storpool.py b/cinder/volume/drivers/storpool.py
-index cffbe9ee0..c183a506d 100644
+index 1fc4262b2..d1c6f0ca5 100644
--- a/cinder/volume/drivers/storpool.py
+++ b/cinder/volume/drivers/storpool.py
-@@ -316,35 +316,6 @@ class StorPoolDriver(driver.VolumeDriver):
+@@ -315,35 +315,6 @@ class StorPoolDriver(driver.VolumeDriver):
'pools': pools
}
@@ -51,5 +51,5 @@
req_id = context.request_id
volname = self._attach.volumeName(volume['id'])
--
-2.40.1
+2.42.0
diff --git a/patches/openstack/cinder/sep-sp-rm-copy-volimg.patch b/patches/openstack/cinder/sep-sp-rm-copy-volimg.patch
index 8dea089..74b04f2 100644
--- a/patches/openstack/cinder/sep-sp-rm-copy-volimg.patch
+++ b/patches/openstack/cinder/sep-sp-rm-copy-volimg.patch
@@ -1,7 +1,7 @@
-From 8991fe8faa2b05a1997259738c4feb3134565126 Mon Sep 17 00:00:00 2001
+From 682dc2d25fc7f04de77c8ea60e76189d5b714566 Mon Sep 17 00:00:00 2001
From: Peter Penchev <openstack-dev@storpool.com>
Date: Mon, 26 Sep 2022 16:04:36 +0300
-Subject: [PATCH 06/10] StorPool: drop copy_image_to_volume() and
+Subject: [PATCH 04/10] StorPool: drop copy_image_to_volume() and
copy_volume_to_image()
These methods seem to be leftovers from a bygone era when the parent
@@ -14,10 +14,10 @@
1 file changed, 43 deletions(-)
diff --git a/cinder/volume/drivers/storpool.py b/cinder/volume/drivers/storpool.py
-index c183a506d..956f7ae5a 100644
+index d1c6f0ca5..37e36fd61 100644
--- a/cinder/volume/drivers/storpool.py
+++ b/cinder/volume/drivers/storpool.py
-@@ -316,49 +316,6 @@ class StorPoolDriver(driver.VolumeDriver):
+@@ -315,49 +315,6 @@ class StorPoolDriver(driver.VolumeDriver):
'pools': pools
}
@@ -68,5 +68,5 @@
size = int(new_size) * units.Gi
name = self._attach.volumeName(volume['id'])
--
-2.40.1
+2.42.0
diff --git a/patches/series b/patches/series
index fbe9846..b2c76ad 100644
--- a/patches/series
+++ b/patches/series
@@ -1,6 +1,4 @@
openstack/cinder/sep-glance-upload-uri.patch
-openstack/cinder/sep-clone-across-pools.patch
-openstack/cinder/sep-sp-clone-across-pools.patch
openstack/cinder/sep-sp-cosmetic-comments.patch
openstack/cinder/sep-sp-leave-it-to-brick.patch
openstack/cinder/sep-sp-rm-backup.patch
@@ -8,5 +6,7 @@
openstack/cinder/sep-sp-fix-test-rename.patch
openstack/cinder/sep-sp-retype-vol.patch
openstack/cinder/sep-sp-clone-volume.patch
+openstack/cinder/sep-clone-across-pools.patch
+openstack/cinder/sep-sp-clone-across-pools.patch
openstack/cinderlib/storpool-test-20190910.patch
openstack/devstack/eatmydata.patch
diff --git a/patches/series.experimental b/patches/series.experimental
index 787989c..924837b 100644
--- a/patches/series.experimental
+++ b/patches/series.experimental
@@ -1,6 +1,4 @@
openstack/cinder/sep-glance-upload-uri.patch
-openstack/cinder/sep-clone-across-pools.patch
-openstack/cinder/sep-sp-clone-across-pools.patch
openstack/cinder/sep-sp-cosmetic-comments.patch
openstack/cinder/sep-sp-leave-it-to-brick.patch
openstack/cinder/sep-sp-rm-backup.patch
@@ -8,6 +6,8 @@
openstack/cinder/sep-sp-fix-test-rename.patch
openstack/cinder/sep-sp-retype-vol.patch
openstack/cinder/sep-sp-clone-volume.patch
+openstack/cinder/sep-clone-across-pools.patch
+openstack/cinder/sep-sp-clone-across-pools.patch
openstack/cinder/sep-sp-iscsi.patch
openstack/cinderlib/storpool-test-20190910.patch
openstack/devstack/eatmydata.patch