3 from monitor.reboot import *
6 logger.setLevel(logging.DEBUG)
7 ch = logging.StreamHandler()
8 ch.setLevel(logging.DEBUG)
9 formatter = logging.Formatter('LOGGER - %(message)s')
10 ch.setFormatter(formatter)
14 if "test" in sys.argv:
19 for node in sys.argv[1:]:
20 if node == "test": continue
22 print "Rebooting %s" % node
23 if reboot_policy(node, True, dryrun):
27 except Exception, err:
28 import traceback; traceback.print_exc()
29 from monitor.common import email_exception
33 if __name__ == '__main__':
35 f = open("/tmp/rebootlog", 'a')
36 f.write("reboot %s\n" % sys.argv)