diff --git a/lib/backend.py b/lib/backend.py index 45b4b460753f64b1b2d06db38e7f7c04d7fdf2f1..6b45a40022c5c6646fbab0be7863d2584176c4a7 100644 --- a/lib/backend.py +++ b/lib/backend.py @@ -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()) diff --git a/lib/constants.py b/lib/constants.py index 79302cb3dd4a59b5dd48799bf7cf765ace50fcc6..deae46c2a6a5d11ba7fcd1cb08bfe37c31c38fb9 100644 --- a/lib/constants.py +++ b/lib/constants.py @@ -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