LVM: Disable multiattach for LIO iSCSI target

Multiattach does not yet work with the LIO iSCSI target.

Related-Bug: #1786327

Change-Id: I84f607de13bc17b00609ad37121d8678f7f4a920
This commit is contained in:
Eric Harney 2018-08-22 11:00:32 -04:00
parent 0652085f23
commit b4883db7c0
3 changed files with 11 additions and 1 deletions

View File

@ -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,

View File

@ -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)

View File

@ -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.