From b4883db7c09d8254bfbe34669873919dbc008943 Mon Sep 17 00:00:00 2001 From: Eric Harney Date: Wed, 22 Aug 2018 11:00:32 -0400 Subject: [PATCH] LVM: Disable multiattach for LIO iSCSI target Multiattach does not yet work with the LIO iSCSI target. Related-Bug: #1786327 Change-Id: I84f607de13bc17b00609ad37121d8678f7f4a920 --- cinder/tests/unit/volume/drivers/test_lvm_driver.py | 1 + cinder/volume/drivers/lvm.py | 6 +++++- .../notes/lio-multiattach-disabled-a6ee89072fe5d032.yaml | 5 +++++ 3 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 releasenotes/notes/lio-multiattach-disabled-a6ee89072fe5d032.yaml diff --git a/cinder/tests/unit/volume/drivers/test_lvm_driver.py b/cinder/tests/unit/volume/drivers/test_lvm_driver.py index 884af0103f7..08cd428b79e 100644 --- a/cinder/tests/unit/volume/drivers/test_lvm_driver.py +++ b/cinder/tests/unit/volume/drivers/test_lvm_driver.py @@ -957,6 +957,7 @@ class LVMISCSITestCase(test_driver.BaseDriverTestCase): # This value is set in check_for_setup_error. self.configuration = conf.Configuration(None) self.configuration.lvm_type = 'thin' + self.configuration.target_helper = 'lioadm' vg_obj = fake_lvm.FakeBrickLVM('cinder-volumes', False, None, diff --git a/cinder/volume/drivers/lvm.py b/cinder/volume/drivers/lvm.py index e8c21ec7acc..8210bb43a17 100644 --- a/cinder/volume/drivers/lvm.py +++ b/cinder/volume/drivers/lvm.py @@ -242,6 +242,10 @@ class LVMVolumeDriver(driver.VolumeDriver): # This includes volumes and snapshots. total_volumes = len(self.vg.get_volumes()) + supports_multiattach = True + if self.configuration.target_helper == 'lioadm': + supports_multiattach = False + # Skip enabled_pools setting, treat the whole backend as one pool # XXX FIXME if multipool support is added to LVM driver. single_pool = {} @@ -260,7 +264,7 @@ class LVMVolumeDriver(driver.VolumeDriver): total_volumes=total_volumes, filter_function=self.get_filter_function(), goodness_function=self.get_goodness_function(), - multiattach=True, + multiattach=supports_multiattach, backend_state='up' )) data["pools"].append(single_pool) diff --git a/releasenotes/notes/lio-multiattach-disabled-a6ee89072fe5d032.yaml b/releasenotes/notes/lio-multiattach-disabled-a6ee89072fe5d032.yaml new file mode 100644 index 00000000000..d12e9be7543 --- /dev/null +++ b/releasenotes/notes/lio-multiattach-disabled-a6ee89072fe5d032.yaml @@ -0,0 +1,5 @@ +--- +issues: + - | + Multiattach support is disabled for the LVM driver when using the LIO iSCSI + target. This functionality will be fixed in a later release.