diff --git a/lib/cmdlib.py b/lib/cmdlib.py index 1f70ccf1dcfc04b3765bc954f697e13af760a246..93ce8d63c6d4b31e0d376576ec4f97dddf0b0ad4 100644 --- a/lib/cmdlib.py +++ b/lib/cmdlib.py @@ -1457,7 +1457,7 @@ class LUVerifyCluster(LogicalUnit): try: ntime_merged = utils.MergeTime(ntime) except (ValueError, TypeError): - _ErrorIf(test, self.ENODETIME, node, "Node returned invalid time") + _ErrorIf(True, self.ENODETIME, node, "Node returned invalid time") if ntime_merged < (nvinfo_starttime - constants.NODE_MAX_CLOCK_SKEW): ntime_diff = abs(nvinfo_starttime - ntime_merged) @@ -3396,7 +3396,7 @@ class LUQueryConfigValues(NoHooksLU): elif field == "drain_flag": entry = os.path.exists(constants.JOB_QUEUE_DRAIN_FILE) elif field == "watcher_pause": - return utils.ReadWatcherPauseFile(constants.WATCHER_PAUSEFILE) + entry = utils.ReadWatcherPauseFile(constants.WATCHER_PAUSEFILE) else: raise errors.ParameterError(field) values.append(entry) diff --git a/lib/constants.py b/lib/constants.py index 20d63fe7781f501315c4a4ccb970dc87b0d4d608..c98d37a5d6483019ba9cd71e5b27e583de432597 100644 --- a/lib/constants.py +++ b/lib/constants.py @@ -119,6 +119,8 @@ NODED = "ganeti-noded" CONFD = "ganeti-confd" RAPI = "ganeti-rapi" MASTERD = "ganeti-masterd" +# used in the ganeti-nbma project +NLD = "ganeti-nld" MULTITHREADED_DAEMONS = frozenset([MASTERD]) @@ -133,10 +135,14 @@ DAEMONS_PORTS = { NODED: ("tcp", 1811), CONFD: ("udp", 1814), RAPI: ("tcp", 5080), + # used in the ganeti-nbma project + NLD: ("udp", 1816), } DEFAULT_NODED_PORT = DAEMONS_PORTS[NODED][1] DEFAULT_CONFD_PORT = DAEMONS_PORTS[CONFD][1] DEFAULT_RAPI_PORT = DAEMONS_PORTS[RAPI][1] +# used in the ganeti-nbma project +DEFAULT_NLD_PORT = DAEMONS_PORTS[NLD][1] FIRST_DRBD_PORT = 11000 LAST_DRBD_PORT = 14999 @@ -149,6 +155,8 @@ DAEMONS_LOGFILES = { CONFD: LOG_DIR + "conf-daemon.log", RAPI: LOG_DIR + "rapi-daemon.log", MASTERD: LOG_DIR + "master-daemon.log", + # used in the ganeti-nbma project + NLD: LOG_DIR + "nl-daemon.log", } LOG_OS_DIR = LOG_DIR + "os" LOG_WATCHER = LOG_DIR + "watcher.log" diff --git a/scripts/gnt-cluster b/scripts/gnt-cluster index 98de367eb74ba1925ff83065cc2f8af33cb525bb..2a72811645d4f833bad5e1308f9686e1df2189c2 100755 --- a/scripts/gnt-cluster +++ b/scripts/gnt-cluster @@ -206,6 +206,7 @@ def ShowClusterMaster(opts, args): ToStdout(master) return 0 + def _PrintGroupedParams(paramsdict): """Print Grouped parameters (be, nic, disk) by group. @@ -218,6 +219,7 @@ def _PrintGroupedParams(paramsdict): for item, val in gr_dict.iteritems(): ToStdout(" %s: %s", item, val) + def ShowClusterConfig(opts, args): """Shows cluster information. @@ -594,7 +596,7 @@ def WatcherOps(opts, args): elif command == "info": result = client.QueryConfigValues(["watcher_pause"]) - _ShowWatcherPause(result) + _ShowWatcherPause(result[0]) else: raise errors.OpPrereqError("Command '%s' is not valid." % command,