Merge "LVM: Disable multiattach for LIO iSCSI target"

This commit is contained in:
Zuul 2018-08-24 21:06:35 +00:00 committed by Gerrit Code Review
commit 1e65b764f6
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

@ -244,6 +244,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 = {}
@ -262,7 +266,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.