Revision f93427cd daemons/ganeti-noded
b/daemons/ganeti-noded | ||
---|---|---|
787 | 787 |
return backend.ValidateHVParams(hvname, hvparams) |
788 | 788 |
|
789 | 789 |
|
790 |
def CheckNoded(_, args): |
|
791 |
"""Initial checks whether to run or exit with a failure. |
|
792 |
|
|
793 |
""" |
|
794 |
if args: # noded doesn't take any arguments |
|
795 |
print >> sys.stderr, ("Usage: %s [-f] [-d] [-p port] [-b ADDRESS]" % |
|
796 |
sys.argv[0]) |
|
797 |
sys.exit(constants.EXIT_FAILURE) |
|
798 |
|
|
799 |
|
|
790 | 800 |
def ExecNoded(options, args): |
791 | 801 |
"""Main node daemon function, executed with the PID file held. |
792 | 802 |
|
... | ... | |
824 | 834 |
dirs = [(val, constants.RUN_DIRS_MODE) for val in constants.SUB_RUN_DIRS] |
825 | 835 |
dirs.append((constants.LOG_OS_DIR, 0750)) |
826 | 836 |
dirs.append((constants.LOCK_DIR, 1777)) |
827 |
daemon.GenericMain(constants.NODED, parser, dirs, None, ExecNoded)
|
|
837 |
daemon.GenericMain(constants.NODED, parser, dirs, CheckNoded, ExecNoded)
|
|
828 | 838 |
|
829 | 839 |
|
830 | 840 |
if __name__ == '__main__': |
Also available in: Unified diff