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.