This commit is contained in:
Lucio Lelii 2009-01-19 17:09:28 +00:00
parent 4153d838f7
commit 7491ee3434
1 changed files with 15 additions and 6 deletions

View File

@ -76,17 +76,24 @@ public class DeployVRE extends Thread{
while (resRelatedGHN.next()) GHNList.add(resRelatedGHN.getString(1));
if (deployManagerOnVRE(firstGHNId) && createVRE(GHNList, firstGHNId)){
DBInterface.ExecuteUpdate("UPDATE VRE SET STATUS='"+ModelerService.DEPLOYED+"' WHERE VRE.id='"+this.resourceId+"';");
logger.info("Deploying of the VRE with id "+this.resourceId+" FINISHED");
if (!deployManagerOnVRE(firstGHNId)){
if (!createVRE(GHNList, firstGHNId)){
DBInterface.ExecuteUpdate("UPDATE VRE SET STATUS='"+ModelerService.DEPLOYED+"' WHERE VRE.id='"+this.resourceId+"';");
logger.info("Deploying of the VRE with id "+this.resourceId+" FINISHED");
}
else{
logger.info("Deploying of the VRE with id "+this.resourceId+" FAILED on second step");
throw new Exception("Error Deployng the VRE failed on second step");
}
}else{
logger.info("Deploying of the VRE with id "+this.resourceId+" FAILED");
throw new Exception("Error Deployng the VRE");
getResource().setReportSecondStep("FAILED");
logger.info("Deploying of the VRE with id "+this.resourceId+" FAILED on first step");
throw new Exception("Error Deployng the VRE filed on first step");
}
}catch(Exception e){
try {
DBInterface.ExecuteUpdate("UPDATE VRE SET STATUS='"+ModelerService.FAILED+"' WHERE VRE.id='"+this.resourceId+"';");
} catch (GCUBEFault e1) {
} catch (Exception e1) {
logger.error("impossible to update the VRE Status");
e1.printStackTrace();
}
@ -145,6 +152,7 @@ public class DeployVRE extends Thread{
System.out.println("---------");
}while (!isDeploymentStatusFinished(report) && attempt<10);
}catch(Exception e){e.printStackTrace(); throw e;}
System.out.println( "is something failed in the first step?"+isSomethingFailed(report));
return isSomethingFailed(report);
}
};
@ -303,6 +311,7 @@ public class DeployVRE extends Thread{
getResource().setReportSecondStep(report);
}while (!isDeploymentStatusFinished(report) && attempt<20);
System.out.println( "is something failed in the second step?"+isSomethingFailed(report));
return isSomethingFailed(report);
}
};