A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
hpcvm.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Refunding the restart mechanism.
[hpcvm.git]
/
src
/
and
/
hpcvm
/
VirtualMachine.java
diff --git
a/src/and/hpcvm/VirtualMachine.java
b/src/and/hpcvm/VirtualMachine.java
index
95a6683
..
adeab1b
100644
(file)
--- 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
import java.util.ArrayList;
public class VirtualMachine
-{
+{
private String name ;
private String ip ;
private String initial_archive_name ;
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 Status status ;
private int computation_id ;
private String working_directory ;
- private ArrayList<S
ervicesClient
> save_neighbors ;
+ private ArrayList<S
aveNeighbor
> save_neighbors ;
private String clientInVM ;
private String vm_user ;
private String vm_user_passwd ;
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 ;
status = new Status() ;
status.setStatus( "stopped" ) ;
computation_id = -1 ;
- save_neighbors = new ArrayList<S
ervicesClient
>() ;
+ save_neighbors = new ArrayList<S
aveNeighbor
>() ;
clientInVM = "/home/mpi/InGuest" ;
vm_user = "mpi" ;
vm_user_passwd = "mpi" ;
clientInVM = "/home/mpi/InGuest" ;
vm_user = "mpi" ;
vm_user_passwd = "mpi" ;
@@
-66,18
+66,18
@@
public class VirtualMachine
}
}
- public ArrayList<S
ervicesClient
> getSaveNeighbors() { return save_neighbors ; }
+ public ArrayList<S
aveNeighbor
> getSaveNeighbors() { return save_neighbors ; }
@SuppressWarnings("unchecked")
@SuppressWarnings("unchecked")
- public void setSaveNeighbors( ArrayList<S
ervicesClient
> _sn )
+ public void setSaveNeighbors( ArrayList<S
aveNeighbor
> _sn )
{
if( _sn != null )
{
{
if( _sn != null )
{
- save_neighbors = (ArrayList<S
ervicesClient
>) _sn.clone() ;
+ save_neighbors = (ArrayList<S
aveNeighbor
>) _sn.clone() ;
}
}
}
}
- public void addSaveNeighbor( S
ervicesClient
_sn )
+ public void addSaveNeighbor( S
aveNeighbor
_sn )
{
if( _sn != null )
{
{
if( _sn != null )
{
@@
-385,6
+385,10
@@
public class VirtualMachine
public int checkVmx()
{
public int checkVmx()
{
+ deploy = false ;
+ first = false ;
+ deployFault = false ;
+
// Initial deployment
File file = new File( working_directory + "/" + directory + "/initial.hpcvm" ) ;
// Initial deployment
File file = new File( working_directory + "/" + directory + "/initial.hpcvm" ) ;
@@
-415,6
+419,12
@@
public class VirtualMachine
file = null ;
file = null ;
+ // If nothing to do
+ if( ! deploy && ! first && ! deployFault )
+ {
+ return 0 ;
+ }
+
// Deployment of the VM
if( deploy )
// Deployment of the VM
if( deploy )
@@
-531,7
+541,7
@@
public class VirtualMachine
if( p.exitValue() == 0 )
{
if( p.exitValue() == 0 )
{
- System.out.println( "Successful
ly
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 ) ;
} else {
System.err.println( "Unsuccessful deletion of the deployment mark!" ) ;
printProcessError( p ) ;
@@
-661,7
+671,7
@@
public class VirtualMachine
if( p.exitValue() == 0 )
{
if( p.exitValue() == 0 )
{
- System.out.println( "Successful
ly
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 ) ;
} else {
System.err.println( "Unsuccessful deletion of the first start mark!" ) ;
printProcessError( p ) ;
@@
-817,7
+827,7
@@
public class VirtualMachine
if( p.exitValue() == 0 )
{
if( p.exitValue() == 0 )
{
- System.out.println( "Successful
ly
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 ) ;
} else {
System.err.println( "Unsuccessful deletion of the fault mark!" ) ;
printProcessError( p ) ;