managed to get the cluster web application to use the cluster controller to retreive the machines state
This commit is contained in:
		
							parent
							
								
									1ae5ffd762
								
							
						
					
					
						commit
						b195bb98d1
					
				|  | @ -32,7 +32,7 @@ def isMachineResponding(machineName): | |||
| 
 | ||||
| 
 | ||||
| def machineNameToMacAddress( machineName ): | ||||
| 	conn = MySQLdb.connect('simpatix10', 'root', '', 'simpadb') | ||||
| 	conn = MySQLdb.connect('simpatix10', 'simpadb_reader', '', 'simpadb') | ||||
| 	assert(conn) | ||||
| 	sqlQuery = """SELECT mac_address FROM ethernet_cards WHERE machine_name='"""+machineName+"""' AND type='normal'""" | ||||
| 	#print sqlQuery | ||||
|  | @ -50,7 +50,7 @@ def getLightOutManagementIpAddress( machineName ): | |||
| 	""" | ||||
| 		the light out management ip of servers allows to talk to the server even when it's asleep | ||||
| 	""" | ||||
| 	conn = MySQLdb.connect('simpatix10', 'root', '', 'simpadb') | ||||
| 	conn = MySQLdb.connect('simpatix10', 'simpadb_reader', '', 'simpadb') | ||||
| 	assert(conn) | ||||
| 	sqlQuery = """SELECT ip_address_1,ip_address_2,ip_address_3,ip_address_4 FROM ethernet_cards WHERE machine_name='"""+machineName+"""' AND type='light_out_management'""" | ||||
| 	#print sqlQuery | ||||
|  | @ -67,7 +67,7 @@ def getLightOutManagementIpAddress( machineName ): | |||
| 
 | ||||
| def getClusterMachinesNames(): | ||||
| 	clusterMachinesNames = [] | ||||
| 	conn = MySQLdb.connect('simpatix10', 'root', '', 'simpadb') | ||||
| 	conn = MySQLdb.connect('simpatix10', 'simpadb_reader', '', 'simpadb') | ||||
| 	assert(conn) | ||||
| 	sqlQuery = """SELECT name FROM machines WHERE affectation='cluster'""" | ||||
| 	#print sqlQuery | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue