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