+ utils.RemoveFile(constants.MASTER_SOCKET)
+
+
+def main():
+ """Main function"""
+ parser = OptionParser(description="Ganeti master daemon",
+ usage="%prog [-f] [-d]",
+ version="%%prog (ganeti) %s" %
+ constants.RELEASE_VERSION)
+ parser.add_option("--no-voting", dest="no_voting",
+ help="Do not check that the nodes agree on this node"
+ " being the master and start the daemon unconditionally",
+ default=False, action="store_true")
+ parser.add_option("--yes-do-it", dest="yes_do_it",
+ help="Override interactive check for --no-voting",
+ default=False, action="store_true")
+ dirs = [(constants.RUN_GANETI_DIR, constants.RUN_DIRS_MODE),
+ (constants.SOCKET_DIR, constants.SOCKET_DIR_MODE),
+ ]
+ daemon.GenericMain(constants.MASTERD, parser, dirs,
+ CheckMasterd, ExecMasterd)