diff --git a/lib/ssconf.py b/lib/ssconf.py index 67d903c17a37d5f6e6df6f4f60a23ffe6202b9cc..babd148e675650a482a1b8649505b6cccf3e6873 100644 --- a/lib/ssconf.py +++ b/lib/ssconf.py @@ -413,10 +413,15 @@ class SimpleStore(object): return self._ReadFile(constants.SS_MASTER_NETDEV) def GetMasterNetmask(self): - """Get the netdev to which we'll add the master ip. + """Get the master netmask. """ - return self._ReadFile(constants.SS_MASTER_NETMASK) + try: + return self._ReadFile(constants.SS_MASTER_NETMASK) + except errors.ConfigurationError: + family = self.GetPrimaryIPFamily() + ipcls = netutils.IPAddress.GetClassFromIpFamily(family) + return ipcls.iplen def GetMasterNode(self): """Get the hostname of the master node for this cluster.