Commit ee2f0ed4 authored by Luca Bigliardi's avatar Luca Bigliardi
Browse files

Set drbd usermode helper on config upgrade


Signed-off-by: default avatarLuca Bigliardi <shammash@google.com>
Reviewed-by: default avatarIustin Pop <iustin@google.com>
parent 51cb1581
......@@ -441,6 +441,7 @@ IP6_ADDRESS_ANY = "::"
TCP_PING_TIMEOUT = 10
GANETI_RUNAS = "root"
DEFAULT_VG = "xenvg"
DEFAULT_DRBD_HELPER = "/bin/true"
MIN_VG_SIZE = 20480
DEFAULT_MAC_PREFIX = "aa:00:00"
LVM_STRIPECOUNT = _autoconf.LVM_STRIPECOUNT
......
......@@ -364,6 +364,12 @@ class ConfigData(ConfigObject):
node.UpgradeConfig()
for instance in self.instances.values():
instance.UpgradeConfig()
if self.cluster.drbd_usermode_helper is None:
# To decide if we set an helper let's check if at least one instance has
# a DRBD disk. This does not cover all the possible scenarios but it
# gives a good approximation.
if self.HasAnyDiskOfType(constants.LD_DRBD8):
self.cluster.drbd_usermode_helper = constants.DEFAULT_DRBD_HELPER
class NIC(ConfigObject):
......
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