Remove cluster config option and comments, fix pep8 issues
Upon further discussion with the NetApp driver team and in light of [0] merging, the cluster-cinder-volume config has become non-functional for the moment as the driver does not support ACTIVE-ACTIVE [1] and the cinder code will not allow the driver to start in a clustered mode without supporting ACTIVE-ACTIVE [2]. [0] https://review.opendev.org/811472 [1]93fb8fbe16/cinder/volume/driver.py (L391)
[2]93fb8fbe16/cinder/volume/manager.py (L313)
This commit is contained in:
parent
8f8fd25f5f
commit
c649b02958
@ -3,11 +3,6 @@
|
||||
"type": "string"
|
||||
"default": "cinder_netapp"
|
||||
"description": "Service name to present to Cinder"
|
||||
"cluster-cinder-volume":
|
||||
"type": "boolean"
|
||||
"default": !!bool "false"
|
||||
"description": |
|
||||
Whether to handle all cinder-volume services as a cluster.
|
||||
"netapp-storage-family":
|
||||
"type": "string"
|
||||
"default": "ontap_cluster"
|
||||
|
@ -26,9 +26,7 @@ class CinderNetAppCharm(
|
||||
release = 'ocata'
|
||||
packages = []
|
||||
release_pkg = 'cinder-common'
|
||||
# iscsi is stateful, fibre channel can be either stateful or stateless,
|
||||
# nfs is stateless. Regardless, the driver may not cope well with
|
||||
# cinder-volume service clustering, so let's allow it to be configurable
|
||||
# The cinder-netapp driver currently does not support ACTIVE-ACTIVE
|
||||
stateless = False
|
||||
# Specify any config that the user *must* set.
|
||||
mandatory_config = [
|
||||
@ -39,12 +37,6 @@ class CinderNetAppCharm(
|
||||
cget = self.config.get
|
||||
service = cget('volume-backend-name')
|
||||
|
||||
# Regardless of stateless or stateful what we really want is whether
|
||||
# to configure cinder volume services as a cluster. This can be done
|
||||
# in different ways and for different reasons, ideally this
|
||||
# variable passed through relation should be renamed.
|
||||
self.stateless = cget('cluster-cinder-volume')
|
||||
|
||||
volumedriver = 'cinder.volume.drivers.netapp.common.NetAppDriver'
|
||||
driver_options_extension = []
|
||||
driver_transport = []
|
||||
@ -76,9 +68,11 @@ class CinderNetAppCharm(
|
||||
('nfs_shares_config', cget('netapp-nfs-shares-config'))]
|
||||
|
||||
if cget('netapp-storage-protocol') in ("iscsi", "fc"):
|
||||
lun_space_reservation = cget(
|
||||
'netapp-lun-space-reservation')
|
||||
lun_space_reservation = 'enabled' if lun_space_reservation is True else 'disabled'
|
||||
lun_space_reservation = cget('netapp-lun-space-reservation')
|
||||
if lun_space_reservation is True:
|
||||
lun_space_reservation = 'enabled'
|
||||
else:
|
||||
lun_space_reservation = 'disabled'
|
||||
driver_options_extension += [
|
||||
('netapp_pool_name_search_pattern', cget(
|
||||
'netapp-pool-name-search-pattern')),
|
||||
|
@ -49,11 +49,6 @@ class TestCinderNetAppCharm(test_utils.PatchHelper):
|
||||
self.assertEqual(config.get('volume_driver'),
|
||||
'cinder.volume.drivers.netapp.common.NetAppDriver')
|
||||
|
||||
def test_cinder_cluster_config(self):
|
||||
charm = self._patch_config_and_charm({'cluster-cinder-volume': True})
|
||||
charm.cinder_configuration()
|
||||
self.assertTrue(charm.stateless)
|
||||
|
||||
def test_cinder_https(self):
|
||||
charm = self._patch_config_and_charm({'netapp-server-port': 443})
|
||||
config = charm.cinder_configuration()
|
||||
|
Loading…
Reference in New Issue
Block a user