7 This tool rejoins any isolated controllers to the cluster.
9 A file named 'cluster.json' containing a list of the IP addresses and
10 credentials of the controllers is required. It resides in the same
11 directory as monitor.py.
13 The file should look like this:
27 Usage:python rejoin.py
31 sys.path.append('../../../csit/libraries')
36 with open('cluster.json') as cluster_file:
37 data = json.load(cluster_file)
39 print str(sys.exc_info())
40 print "unable to open the file cluster.json"
43 cluster_list = data["cluster"]["controllers"]
44 user_name = data["cluster"]["user"]
45 user_pass = data["cluster"]["pass"]
47 print str(sys.exc_info())
48 print 'Error reading the file cluster.json'
51 print UtilLibrary.flush_iptables(cluster_list, user_name, user_pass)