X-Git-Url: https://code.grnet.gr/git/ganeti-local/blobdiff_plain/5a8648eb609f7e3a8d7ad7f82e93cfdd467a8fb5..cf572b1378a61db132d84a5e03b0e5a157848caa:/lib/ssconf.py?ds=sidebyside diff --git a/lib/ssconf.py b/lib/ssconf.py index 67d903c..babd148 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.