X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/hpcvm.git/blobdiff_plain/d83793da6e881ebab006a50a47fbba914e65f9cf..f74ee61df3fbc8cf8371347069a715270a3e8a72:/src/and/hpcvm/VirtualMachine.java diff --git a/src/and/hpcvm/VirtualMachine.java b/src/and/hpcvm/VirtualMachine.java index 95a6683..adeab1b 100644 --- a/src/and/hpcvm/VirtualMachine.java +++ b/src/and/hpcvm/VirtualMachine.java @@ -10,7 +10,7 @@ import java.io.InputStreamReader; import java.util.ArrayList; public class VirtualMachine -{ +{ private String name ; private String ip ; private String initial_archive_name ; @@ -25,7 +25,7 @@ public class VirtualMachine private Status status ; private int computation_id ; private String working_directory ; - private ArrayList save_neighbors ; + private ArrayList save_neighbors ; private String clientInVM ; private String vm_user ; private String vm_user_passwd ; @@ -50,7 +50,7 @@ public class VirtualMachine status = new Status() ; status.setStatus( "stopped" ) ; computation_id = -1 ; - save_neighbors = new ArrayList() ; + save_neighbors = new ArrayList() ; clientInVM = "/home/mpi/InGuest" ; vm_user = "mpi" ; vm_user_passwd = "mpi" ; @@ -66,18 +66,18 @@ public class VirtualMachine } - public ArrayList getSaveNeighbors() { return save_neighbors ; } + public ArrayList getSaveNeighbors() { return save_neighbors ; } @SuppressWarnings("unchecked") - public void setSaveNeighbors( ArrayList _sn ) + public void setSaveNeighbors( ArrayList _sn ) { if( _sn != null ) { - save_neighbors = (ArrayList) _sn.clone() ; + save_neighbors = (ArrayList) _sn.clone() ; } } - public void addSaveNeighbor( ServicesClient _sn ) + public void addSaveNeighbor( SaveNeighbor _sn ) { if( _sn != null ) { @@ -385,6 +385,10 @@ public class VirtualMachine public int checkVmx() { + deploy = false ; + first = false ; + deployFault = false ; + // Initial deployment File file = new File( working_directory + "/" + directory + "/initial.hpcvm" ) ; @@ -415,6 +419,12 @@ public class VirtualMachine file = null ; + // If nothing to do + if( ! deploy && ! first && ! deployFault ) + { + return 0 ; + } + // Deployment of the VM if( deploy ) @@ -531,7 +541,7 @@ public class VirtualMachine if( p.exitValue() == 0 ) { - System.out.println( "Successfully deletion of the deployment mark." ) ; + System.out.println( "Successful deletion of the deployment mark." ) ; } else { System.err.println( "Unsuccessful deletion of the deployment mark!" ) ; printProcessError( p ) ; @@ -661,7 +671,7 @@ public class VirtualMachine if( p.exitValue() == 0 ) { - System.out.println( "Successfully deletion of the first start mark." ) ; + System.out.println( "Successful deletion of the first start mark." ) ; } else { System.err.println( "Unsuccessful deletion of the first start mark!" ) ; printProcessError( p ) ; @@ -817,7 +827,7 @@ public class VirtualMachine if( p.exitValue() == 0 ) { - System.out.println( "Successfully deletion of the fault mark." ) ; + System.out.println( "Successful deletion of the fault mark." ) ; } else { System.err.println( "Unsuccessful deletion of the fault mark!" ) ; printProcessError( p ) ;