Refresh the Cinder patches
Add the minor comment-only patch that was requested via a review.
Refresh the rest of the patches against the Cinder master branch.
Change-Id: I0a5f2b052654d36e2be2d86849c2436c0a34c80b
diff --git a/patches/openstack/cinder/sep-sp-iscsi.patch b/patches/openstack/cinder/sep-sp-iscsi.patch
index 23117a6..840007d 100644
--- a/patches/openstack/cinder/sep-sp-iscsi.patch
+++ b/patches/openstack/cinder/sep-sp-iscsi.patch
@@ -1,7 +1,7 @@
-From 51e163e721378ad280e588a2eb1195d220f6304c Mon Sep 17 00:00:00 2001
+From 9d022ada82cb1aa161e360890c4d86fce958aea4 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] Add iSCSI export support to the StorPool driver
+Subject: [PATCH 10/10] Add iSCSI export support to the StorPool driver
Add four new driver options:
- iscsi_cinder_volume: use StorPool iSCSI attachments whenever
@@ -25,14 +25,16 @@
Change-Id: I9de64306e0e6976268df782053b0651dd1cca96f
---
- .../unit/volume/drivers/test_storpool.py | 64 +++-
- cinder/volume/drivers/storpool.py | 360 +++++++++++++++++-
+ .../unit/volume/drivers/test_storpool.py | 64 ++-
+ cinder/volume/drivers/storpool.py | 374 +++++++++++++++++-
.../drivers/storpool-volume-driver.rst | 49 ++-
- 3 files changed, 464 insertions(+), 9 deletions(-)
+ 3 files changed, 478 insertions(+), 9 deletions(-)
+diff --git a/cinder/tests/unit/volume/drivers/test_storpool.py b/cinder/tests/unit/volume/drivers/test_storpool.py
+index 95a1ffffd..7e8a17800 100644
--- a/cinder/tests/unit/volume/drivers/test_storpool.py
+++ b/cinder/tests/unit/volume/drivers/test_storpool.py
-@@ -32,6 +32,7 @@
+@@ -32,6 +32,7 @@ fakeStorPool.sptypes = mock.Mock()
sys.modules['storpool'] = fakeStorPool
@@ -40,7 +42,7 @@
from cinder import exception
from cinder.tests.unit import test
from cinder.volume import configuration as conf
-@@ -222,7 +223,14 @@
+@@ -222,7 +223,14 @@ class StorPoolTestCase(test.TestCase):
self.cfg.volume_backend_name = 'storpool_test'
self.cfg.storpool_template = None
self.cfg.storpool_replication = 3
@@ -55,7 +57,7 @@
mock_exec = mock.Mock()
mock_exec.return_value = ('', '')
-@@ -231,7 +239,7 @@
+@@ -231,7 +239,7 @@ class StorPoolTestCase(test.TestCase):
self.driver.check_for_setup_error()
@ddt.data(
@@ -64,7 +66,7 @@
({'no-host': None}, KeyError),
({'host': 'sbad'}, driver.StorPoolConfigurationInvalid),
({'host': 's01'}, None),
-@@ -247,7 +255,7 @@
+@@ -247,7 +255,7 @@ class StorPoolTestCase(test.TestCase):
conn)
@ddt.data(
@@ -73,7 +75,7 @@
({'no-host': None}, KeyError),
({'host': 'sbad'}, driver.StorPoolConfigurationInvalid),
)
-@@ -644,3 +652,55 @@
+@@ -644,3 +652,55 @@ class StorPoolTestCase(test.TestCase):
self.driver.get_pool({
'volume_type': volume_type
}))
@@ -129,6 +131,8 @@
+ # look at the specified expected value.
+ check({"storpool_wants_iscsi": False}, use_iscsi, expected)
+ check({}, use_iscsi, expected)
+diff --git a/cinder/volume/drivers/storpool.py b/cinder/volume/drivers/storpool.py
+index 58b64bced..f238dc217 100644
--- a/cinder/volume/drivers/storpool.py
+++ b/cinder/volume/drivers/storpool.py
@@ -15,6 +15,7 @@
@@ -139,7 +143,7 @@
import platform
from oslo_config import cfg
-@@ -44,6 +45,31 @@
+@@ -44,6 +45,31 @@ if storpool:
storpool_opts = [
@@ -171,7 +175,7 @@
cfg.StrOpt('storpool_template',
default=None,
help='The StorPool template for volumes with no type.'),
-@@ -105,6 +131,7 @@
+@@ -105,6 +131,7 @@ class StorPoolDriver(driver.VolumeDriver):
self._ourId = None
self._ourIdInt = None
self._attach = None
@@ -179,7 +183,7 @@
@staticmethod
def get_driver_options():
-@@ -162,10 +189,326 @@
+@@ -162,10 +189,326 @@ class StorPoolDriver(driver.VolumeDriver):
raise StorPoolConfigurationInvalid(
section=hostname, param='SP_OURID', error=e)
@@ -506,7 +510,7 @@
return {'driver_volume_type': 'storpool',
'data': {
'client_id': self._storpool_client_id(connector),
-@@ -174,6 +517,9 @@
+@@ -174,6 +517,9 @@ class StorPoolDriver(driver.VolumeDriver):
}}
def terminate_connection(self, volume, connector, **kwargs):
@@ -516,7 +520,7 @@
pass
def create_snapshot(self, snapshot):
-@@ -275,11 +621,20 @@
+@@ -275,11 +621,20 @@ class StorPoolDriver(driver.VolumeDriver):
)
def create_export(self, context, volume, connector):
@@ -538,7 +542,7 @@
def delete_volume(self, volume):
name = self._attach.volumeName(volume['id'])
try:
-@@ -316,6 +671,17 @@
+@@ -316,6 +671,17 @@ class StorPoolDriver(driver.VolumeDriver):
LOG.error("StorPoolDriver API initialization failed: %s", e)
raise
@@ -556,7 +560,7 @@
def _update_volume_stats(self):
try:
dl = self._attach.api().disksList()
-@@ -341,7 +707,7 @@
+@@ -341,7 +707,7 @@ class StorPoolDriver(driver.VolumeDriver):
'total_capacity_gb': total / units.Gi,
'free_capacity_gb': free / units.Gi,
'reserved_percentage': 0,
@@ -565,7 +569,7 @@
'QoS_support': False,
'thick_provisioning_support': False,
'thin_provisioning_support': True,
-@@ -359,7 +725,9 @@
+@@ -360,7 +726,9 @@ class StorPoolDriver(driver.VolumeDriver):
'volume_backend_name') or 'storpool',
'vendor_name': 'StorPool',
'driver_version': self.VERSION,
@@ -573,12 +577,14 @@
+ 'storage_protocol': (
+ constants.ISCSI if self._use_iscsi else constants.STORPOOL
+ ),
-
+ # Driver capabilities
'clone_across_pools': True,
'sparse_copy_volume': True,
+diff --git a/doc/source/configuration/block-storage/drivers/storpool-volume-driver.rst b/doc/source/configuration/block-storage/drivers/storpool-volume-driver.rst
+index d2c5895a9..c891675bc 100644
--- a/doc/source/configuration/block-storage/drivers/storpool-volume-driver.rst
+++ b/doc/source/configuration/block-storage/drivers/storpool-volume-driver.rst
-@@ -19,12 +19,15 @@
+@@ -19,12 +19,15 @@ Prerequisites
* The controller and all the compute nodes must have access to the StorPool
API service.
@@ -598,7 +604,7 @@
* All nodes that need to access the StorPool API (the compute nodes and
the node running the ``cinder-volume`` service) must have the following
-@@ -34,6 +37,29 @@
+@@ -34,6 +37,29 @@ Prerequisites
* the storpool Python bindings package
* the storpool.spopenstack Python helper package
@@ -628,7 +634,7 @@
Configuring the StorPool volume driver
--------------------------------------
-@@ -55,6 +81,21 @@
+@@ -55,6 +81,21 @@ volume backend definition) and per volume type:
with the default placement constraints for the StorPool cluster.
The default value for the chain replication is 3.
@@ -650,3 +656,6 @@
Using the StorPool volume driver
--------------------------------
+--
+2.39.2
+