Bug 2332 - mettre en service une page clusterstatus pour physix
- désormais, la page physix cluster status est disponible. Pour cela, il a fallu : - ajouter un mécanisme d'export/import de clef publique ssh utilisateur (pour que intranet.ipr.univ-rennes1.fr puisse exécuter des commandes sge sur physix-master) - adapter la view clusterstatus pour qu'elle sache gérer les commandes sge déportées. Au final, cette vue permet d'afficher le pages cluterstatus de simpatix (commandes sge locales) et physix (commandes sge déportées)
This commit is contained in:
		
							parent
							
								
									879b559db6
								
							
						
					
					
						commit
						2dbf8ceea0
					
				
							
								
								
									
										10
									
								
								Util.py
								
								
								
								
							
							
						
						
									
										10
									
								
								Util.py
								
								
								
								
							|  | @ -63,15 +63,21 @@ def executeCommand(command): | |||
|     return result | ||||
| 
 | ||||
| 
 | ||||
| def executeCommandOn(target_machine_fqdn, strCommand): | ||||
| def executeCommandOn(target_machine_fqdn, strCommand, remote_user=None): | ||||
|     """ | ||||
|     execute command on a local or remote machine (using ssh then) | ||||
|     :param str remote_user:  | ||||
|     """ | ||||
|     print("comparing %s and %s" % (getHostName(), target_machine_fqdn.split('.')[0])) | ||||
|     if getHostName() == target_machine_fqdn.split('.')[0]: | ||||
|         return executeCommand(strCommand) | ||||
|     else: | ||||
|         return executeProgram(['ssh', target_machine_fqdn, "%s" % strCommand]) | ||||
|         if not remote_user is None: | ||||
|             target = '%s@%s' % (remote_user, target_machine_fqdn) | ||||
|         else: | ||||
|             target = target_machine_fqdn | ||||
|          | ||||
|         return executeProgram(['ssh', target, "%s" % strCommand]) | ||||
| 
 | ||||
| 
 | ||||
| def getUpsStatus(): | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue