Commit 16f41f24 authored by René Nussbaumer's avatar René Nussbaumer
Browse files

Adding additional VerifyNode checks to backend



This adds checks for out of band support. The helpers have to exist and
they have to be executable.
Signed-off-by: default avatarRené Nussbaumer <rn@google.com>
Reviewed-by: default avatarMichael Hanselmann <hansmi@google.com>
parent 62e999a5
......@@ -552,6 +552,22 @@ def VerifyNode(what, cluster_name):
result[constants.NV_MASTERIP] = netutils.TcpPing(master_ip, port,
source=source)
if constants.NV_OOB_PATHS in what:
result[constants.NV_OOB_PATHS] = tmp = []
for path in what[constants.NV_OOB_PATHS]:
try:
st = os.stat(path)
except OSError, err:
tmp.append("error stating out of band helper: %s" % err)
else:
if stat.S_ISREG(st.st_mode):
if stat.S_IMODE(st.st_mode) & stat.S_IXUSR:
tmp.append(None)
else:
tmp.append("out of band helper %s is not executable" % path)
else:
tmp.append("out of band helper %s is not a file" % path)
if constants.NV_LVLIST in what and vm_capable:
try:
val = GetVolumeList(utils.ListVolumeGroups().keys())
......
......@@ -835,6 +835,7 @@ NV_TIME = "time"
NV_VERSION = "version"
NV_VGLIST = "vglist"
NV_VMNODES = "vmnodes"
NV_OOB_PATHS = "oob-paths"
# SSL certificate check constants (in days)
SSL_CERT_EXPIRATION_WARN = 30
......
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