logging.error("Received unhandled inotify event: %s" % event)
-def CheckCONFD(options, args):
- """Initial checks whether to run exit with a failure
+def CheckConfd(options, args):
+ """Initial checks whether to run exit with a failure.
"""
# TODO: collapse HMAC daemons handling in daemons GenericMain, when we'll
ssconf.CheckMasterCandidate(options.debug)
-def ExecCONFD(options, args):
- """Main CONFD function, executed with pidfile held
+def ExecConfd(options, args):
+ """Main confd function, executed with PID file held
"""
mainloop = daemon.Mainloop()
dirs = [(val, constants.RUN_DIRS_MODE) for val in constants.SUB_RUN_DIRS]
dirs.append((constants.LOG_OS_DIR, 0750))
dirs.append((constants.LOCK_DIR, 1777))
- daemon.GenericMain(constants.CONFD, parser, dirs, CheckCONFD, ExecCONFD)
+ daemon.GenericMain(constants.CONFD, parser, dirs, CheckConfd, ExecConfd)
-if __name__ == '__main__':
+if __name__ == "__main__":
main()
return result
-def CheckMASTERD(options, args):
- """Initial checks whether to run or exit with a failure
+
+def CheckMasterd(options, args):
+ """Initial checks whether to run or exit with a failure.
"""
rpc.Init()
rpc.Shutdown()
-def ExecMASTERD(options, args):
- """Main MASTERD function, executed with the pidfile held.
+def ExecMasterd (options, args):
+ """Main master daemon function, executed with the PID file held.
"""
# This is safe to do as the pid file guarantees against
(constants.SOCKET_DIR, constants.SOCKET_DIR_MODE),
]
daemon.GenericMain(constants.MASTERD, parser, dirs,
- CheckMASTERD, ExecMASTERD)
+ CheckMasterd, ExecMasterd)
+
if __name__ == "__main__":
main()
return backend.ValidateHVParams(hvname, hvparams)
-def ExecNODED(options, args):
- """Main NODED function, executed with the pidfile held.
+def ExecNoded(options, args):
+ """Main node daemon function, executed with the PID file held.
"""
global queue_lock
dirs = [(val, constants.RUN_DIRS_MODE) for val in constants.SUB_RUN_DIRS]
dirs.append((constants.LOG_OS_DIR, 0750))
dirs.append((constants.LOCK_DIR, 1777))
- daemon.GenericMain(constants.NODED, parser, dirs, None, ExecNODED)
+ daemon.GenericMain(constants.NODED, parser, dirs, None, ExecNoded)
if __name__ == '__main__':
return result
-def CheckRAPI(options, args):
- """Initial checks whether to run or exit with a failure
+def CheckRapi(options, args):
+ """Initial checks whether to run or exit with a failure.
"""
if len(args) != 0:
ssconf.CheckMaster(options.debug)
-def ExecRAPI(options, args):
- """Main RAPI function, executed with the pidfile held.
+def ExecRapi(options, args):
+ """Main remote API function, executed with the PID file held.
"""
# Read SSL certificate
dirs = [(val, constants.RUN_DIRS_MODE) for val in constants.SUB_RUN_DIRS]
dirs.append((constants.LOG_OS_DIR, 0750))
- daemon.GenericMain(constants.RAPI, parser, dirs, CheckRAPI, ExecRAPI)
+ daemon.GenericMain(constants.RAPI, parser, dirs, CheckRapi, ExecRapi)
-if __name__ == '__main__':
+if __name__ == "__main__":
main()