Commit 467c1078 authored by Guido Trotter's avatar Guido Trotter
Browse files

Merge branch 'stable-2.1' into devel-2.1



* stable-2.1:
  Add NLD constants to Ganeti
  Fix two potentially endless loops in http library
  Fix bug in LUQueryConfigValues
  Fix typo in LUVerifyCluster when checking node time
Signed-off-by: default avatarGuido Trotter <ultrotter@google.com>
Reviewed-by: default avatarIustin Pop <iustin@google.com>
parents 3f1cf151 4d32feba
......@@ -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)
......
......@@ -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"
......
......@@ -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,
......
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