Commit 9e33896b authored by Luca Bigliardi's avatar Luca Bigliardi
Browse files

Add drbd_usermode_helper to configuration


Signed-off-by: default avatarLuca Bigliardi <shammash@google.com>
Reviewed-by: default avatarIustin Pop <iustin@google.com>
parent 7ef40fbe
......@@ -1419,6 +1419,22 @@ class ConfigWriter:
self._config_data.cluster.serial_no += 1
self._WriteConfig()
@locking.ssynchronized(_config_lock, shared=1)
def GetDRBDHelper(self):
"""Return DRBD usermode helper.
"""
return self._config_data.cluster.drbd_usermode_helper
@locking.ssynchronized(_config_lock)
def SetDRBDHelper(self, drbd_helper):
"""Set DRBD usermode helper.
"""
self._config_data.cluster.drbd_usermode_helper = drbd_helper
self._config_data.cluster.serial_no += 1
self._WriteConfig()
@locking.ssynchronized(_config_lock, shared=1)
def GetMACPrefix(self):
"""Return the mac prefix.
......
......@@ -862,6 +862,7 @@ class Cluster(TaggableObject):
"tcpudp_port_pool",
"mac_prefix",
"volume_group_name",
"drbd_usermode_helper",
"default_bridge",
"default_hypervisor",
"master_node",
......
......@@ -68,6 +68,7 @@ class TestConfigRunner(unittest.TestCase):
highest_used_port=(constants.FIRST_DRBD_PORT - 1),
mac_prefix="aa:00:00",
volume_group_name="xenvg",
drbd_usermode_helper="/bin/true",
nicparams={constants.PP_DEFAULT: constants.NICC_DEFAULTS},
tcpudp_port_pool=set(),
enabled_hypervisors=[constants.HT_FAKE],
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment