Update the iSCSI patch.
Change-Id: I0da25ad5abc3529c6c035352db495dc95e13167b
diff --git a/patches/openstack/cinder/storpool-iscsi.patch b/patches/openstack/cinder/storpool-iscsi.patch
index 1f8dbbc..88e84eb 100644
--- a/patches/openstack/cinder/storpool-iscsi.patch
+++ b/patches/openstack/cinder/storpool-iscsi.patch
@@ -1,4 +1,4 @@
-From d3730dc49d52228fc771d514b853dc536ef1b534 Mon Sep 17 00:00:00 2001
+From 279148e7d77da3390d4417836fc0e970ec1f7fc8 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 8/8] Add iSCSI export support to the StorPool driver
@@ -19,11 +19,15 @@
- iscsi_learn_initiator_iqns: automatically create StorPool configuration
records for an initiator when a volume is first exported to it
+When exporting volumes via iSCSI, report the storage protocol as "iSCSI" and
+disable multiattach (the StorPool CI failures with iSCSI multiattach may need
+further investigation).
+
Change-Id: I9de64306e0e6976268df782053b0651dd1cca96f
---
- .../unit/volume/drivers/test_storpool.py | 64 ++-
- cinder/volume/drivers/storpool.py | 369 +++++++++++++++++-
- 2 files changed, 429 insertions(+), 4 deletions(-)
+ .../unit/volume/drivers/test_storpool.py | 64 +++-
+ cinder/volume/drivers/storpool.py | 361 +++++++++++++++++-
+ 2 files changed, 420 insertions(+), 5 deletions(-)
diff --git a/cinder/tests/unit/volume/drivers/test_storpool.py b/cinder/tests/unit/volume/drivers/test_storpool.py
index 51db7f292..aafaf7108 100644
@@ -127,7 +131,7 @@
+ 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 401e3709a..aeed8dc62 100644
+index 401e3709a..6eaf1f42a 100644
--- a/cinder/volume/drivers/storpool.py
+++ b/cinder/volume/drivers/storpool.py
@@ -15,6 +15,7 @@
@@ -186,7 +190,7 @@
@staticmethod
def get_driver_options():
-@@ -171,10 +199,322 @@ class StorPoolDriver(driver.VolumeDriver):
+@@ -171,10 +199,312 @@ class StorPoolDriver(driver.VolumeDriver):
raise StorPoolConfigurationInvalid(
section=hostname, param='SP_OURID', error=e)
@@ -320,16 +324,6 @@
+ raise
+
+ if cfg['initiator'] is None:
-+ LOG.info(
-+ 'RDBG initiator? learn %(learn)s vol %(vol)s want %(want)s',
-+ {
-+ 'learn': repr(
-+ self.configuration.iscsi_learn_initiator_iqns
-+ ),
-+ 'vol': repr(self.configuration.iscsi_cinder_volume),
-+ 'want': repr(connector.get('storpool_wants_iscsi')),
-+ }
-+ )
+ if not (self.configuration.iscsi_learn_initiator_iqns or
+ self.configuration.iscsi_cinder_volume and
+ connector.get('storpool_wants_iscsi')):
@@ -509,7 +503,7 @@
return {'driver_volume_type': 'storpool',
'data': {
'client_id': self._storpool_client_id(connector),
-@@ -183,6 +523,9 @@ class StorPoolDriver(driver.VolumeDriver):
+@@ -183,6 +513,9 @@ class StorPoolDriver(driver.VolumeDriver):
}}
def terminate_connection(self, volume, connector, **kwargs):
@@ -519,7 +513,7 @@
pass
def create_snapshot(self, snapshot):
-@@ -284,11 +627,20 @@ class StorPoolDriver(driver.VolumeDriver):
+@@ -284,11 +617,20 @@ class StorPoolDriver(driver.VolumeDriver):
)
def create_export(self, context, volume, connector):
@@ -541,7 +535,7 @@
def delete_volume(self, volume):
name = self._attach.volumeName(volume['id'])
try:
-@@ -325,6 +677,17 @@ class StorPoolDriver(driver.VolumeDriver):
+@@ -325,6 +667,17 @@ class StorPoolDriver(driver.VolumeDriver):
LOG.error("StorPoolDriver API initialization failed: %s", e)
raise
@@ -559,7 +553,16 @@
def _update_volume_stats(self):
try:
dl = self._attach.api().disksList()
-@@ -368,7 +731,9 @@ class StorPoolDriver(driver.VolumeDriver):
+@@ -350,7 +703,7 @@ class StorPoolDriver(driver.VolumeDriver):
+ 'total_capacity_gb': total / units.Gi,
+ 'free_capacity_gb': free / units.Gi,
+ 'reserved_percentage': 0,
+- 'multiattach': True,
++ 'multiattach': not self._use_iscsi,
+ 'QoS_support': False,
+ 'thick_provisioning_support': False,
+ 'thin_provisioning_support': True,
+@@ -368,7 +721,9 @@ class StorPoolDriver(driver.VolumeDriver):
'volume_backend_name') or 'storpool',
'vendor_name': 'StorPool',
'driver_version': self.VERSION,