You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by la...@apache.org on 2014/05/06 18:04:51 UTC
git commit: fixing errors came during gridTest run
Repository: airavata
Updated Branches:
refs/heads/master 04269ff81 -> a9e022b9a
fixing errors came during gridTest run
Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/a9e022b9
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/a9e022b9
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/a9e022b9
Branch: refs/heads/master
Commit: a9e022b9aed2e7bc3c79e45c1eb6cd2d8cef5fd5
Parents: 04269ff
Author: lahiru <la...@apache.org>
Authored: Tue May 6 12:04:38 2014 -0400
Committer: lahiru <la...@apache.org>
Committed: Tue May 6 12:04:38 2014 -0400
----------------------------------------------------------------------
.../org/apache/airavata/gfac/Scheduler.java | 10 +++++-----
.../gsissh/provider/impl/GSISSHProvider.java | 20 +++++++++++++-------
.../src/test/resources/gfac-config.xml | 8 ++++----
.../job/QstatMonitorTestWithMyProxyAuth.java | 10 +++++-----
modules/orchestrator/orchestrator-core/pom.xml | 15 ++++++++++++++-
.../core/OrchestratorTestWithMyProxyAuth.java | 10 +++-------
.../src/test/resources/gfac-config.xml | 4 +---
.../registry/jpa/impl/ExperimentRegistry.java | 1 +
8 files changed, 46 insertions(+), 32 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/airavata/blob/a9e022b9/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/Scheduler.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/Scheduler.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/Scheduler.java
index ef416f7..54ca221 100644
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/Scheduler.java
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/Scheduler.java
@@ -132,13 +132,13 @@ public class Scheduler {
throw new GFacException("Error During scheduling", e);
}catch (ClassNotFoundException e) {
log.error("Application Provider class: " + s + "couldn't find");
- throw new GFacException("Error initializing application specific Handler", e);
+ throw new GFacException("Error initializing application specific Handler: " +providerClassName , e);
} catch (InstantiationException e) {
- log.error("Error initializing application specific Handler");
- throw new GFacException("Error initializing application specific Handler", e);
+ log.error("Error initializing application specific Handler: " + providerClassName);
+ throw new GFacException("Error initializing Handler", e);
} catch (IllegalAccessException e) {
- log.error("Error initializing application specific Handler");
- throw new GFacException("Error initializing application specific Handler", e);
+ log.error("Error initializing application specific Handler: " + providerClassName);
+ throw new GFacException("Error initializing Handler", e);
}
return provider;
}
http://git-wip-us.apache.org/repos/asf/airavata/blob/a9e022b9/modules/gfac/gfac-gsissh/src/main/java/org/apache/airavata/gfac/gsissh/provider/impl/GSISSHProvider.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-gsissh/src/main/java/org/apache/airavata/gfac/gsissh/provider/impl/GSISSHProvider.java b/modules/gfac/gfac-gsissh/src/main/java/org/apache/airavata/gfac/gsissh/provider/impl/GSISSHProvider.java
index 880cfbd..eb3b4ce 100644
--- a/modules/gfac/gfac-gsissh/src/main/java/org/apache/airavata/gfac/gsissh/provider/impl/GSISSHProvider.java
+++ b/modules/gfac/gfac-gsissh/src/main/java/org/apache/airavata/gfac/gsissh/provider/impl/GSISSHProvider.java
@@ -20,6 +20,7 @@
*/
package org.apache.airavata.gfac.gsissh.provider.impl;
+import org.apache.airavata.gfac.ExecutionMode;
import org.apache.airavata.gfac.GFacException;
import org.apache.airavata.gfac.core.context.JobExecutionContext;
import org.apache.airavata.gfac.core.cpi.GFacImpl;
@@ -101,16 +102,21 @@ public class GSISSHProvider extends AbstractProvider {
for(ThreadedHandler threadedHandler:daemonHandlers){
if("org.apache.airavata.gfac.monitor.handlers.GridPullMonitorHandler".equals(threadedHandler.getClass().getName())){
pullMonitorHandler = threadedHandler;
+ String monitorMode = ((GsisshHostType) host).getMonitorMode();
+ if("".equals(monitorMode) || monitorMode == null || org.apache.airavata.common.utils.Constants.PULL.equals(monitorMode)){
+ log.info("Job is launched successfully now parsing it to monitoring in pull mode, JobID Returned: " + jobID);
+ pullMonitorHandler.invoke(jobExecutionContext);
+ }else{
+ log.error("Currently we only support Pull monitoring");
+ }
}
+ // have to handle the GridPushMonitorHandler logic
}
- // we know this host is type GsiSSHHostType
- String monitorMode = ((GsisshHostType) host).getMonitorMode();
- if("".equals(monitorMode) || monitorMode == null || org.apache.airavata.common.utils.Constants.PULL.equals(monitorMode)){
- log.info("Job is launched successfully now parsing it to monitoring in pull mode, JobID Returned: " + jobID);
- pullMonitorHandler.invoke(jobExecutionContext);
- }else{
- log.error("Currently we only support Pull monitoring");
+ if(pullMonitorHandler == null && ExecutionMode.ASYNCHRONOUS.equals(jobExecutionContext.getGFacConfiguration().getExecutionMode())){
+ log.error("No Daemon handler is configured in gfac-config.xml, either pull or push, so monitoring will not invoked" +
+ ", execution is configured as asynchronous, so Outhandler will not be invoked");
}
+ // we know this host is type GsiSSHHostType
} catch (SSHApiException e) {
String error = "Error submitting the job to host " + host.getHostAddress() + " message: " + e.getMessage();
log.error(error);
http://git-wip-us.apache.org/repos/asf/airavata/blob/a9e022b9/modules/gfac/gfac-gsissh/src/test/resources/gfac-config.xml
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-gsissh/src/test/resources/gfac-config.xml b/modules/gfac/gfac-gsissh/src/test/resources/gfac-config.xml
index 4a9d1ad..c8c1ab6 100644
--- a/modules/gfac/gfac-gsissh/src/test/resources/gfac-config.xml
+++ b/modules/gfac/gfac-gsissh/src/test/resources/gfac-config.xml
@@ -21,13 +21,13 @@
</GlobalHandlers>
- <Provider class="org.apache.airavata.gfac.provider.impl.GSISSHProvider" host="org.apache.airavata.schemas.gfac.impl.GsisshHostTypeImpl" executionMode="async">
+ <Provider class="org.apache.airavata.gfac.gsissh.provider.impl.GSISSHProvider" host="org.apache.airavata.schemas.gfac.impl.GsisshHostTypeImpl" executionMode="async">
<InHandlers>
- <Handler class="org.apache.airavata.gfac.handler.GSISSHDirectorySetupHandler"/>
- <Handler class="org.apache.airavata.gfac.handler.GSISSHInputHandler"/>
+ <Handler class="org.apache.airavata.gfac.gsissh.handler.GSISSHDirectorySetupHandler"/>
+ <Handler class="org.apache.airavata.gfac.gsissh.handler.GSISSHInputHandler"/>
</InHandlers>
<OutHandlers>
- <Handler class="org.apache.airavata.gfac.handler.GSISSHOutputHandler"/>
+ <Handler class="org.apache.airavata.gfac.gsissh.handler.GSISSHOutputHandler"/>
</OutHandlers>
</Provider>
</GFac>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/airavata/blob/a9e022b9/modules/gfac/gfac-monitor/src/test/java/org/apache/airavata/job/QstatMonitorTestWithMyProxyAuth.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-monitor/src/test/java/org/apache/airavata/job/QstatMonitorTestWithMyProxyAuth.java b/modules/gfac/gfac-monitor/src/test/java/org/apache/airavata/job/QstatMonitorTestWithMyProxyAuth.java
index bb797b3..3a762ec 100644
--- a/modules/gfac/gfac-monitor/src/test/java/org/apache/airavata/job/QstatMonitorTestWithMyProxyAuth.java
+++ b/modules/gfac/gfac-monitor/src/test/java/org/apache/airavata/job/QstatMonitorTestWithMyProxyAuth.java
@@ -60,11 +60,11 @@ public class QstatMonitorTestWithMyProxyAuth {
@org.testng.annotations.BeforeClass
public void setUp() throws Exception {
- System.setProperty("myproxy.username", "ogce");
- System.setProperty("myproxy.password", "");
- System.setProperty("basedir", "/Users/lahirugunathilake/work/airavata/sandbox/gsissh");
- System.setProperty("gsi.working.directory", "/home/ogce");
- System.setProperty("trusted.cert.location", "/Users/lahirugunathilake/Downloads/certificates");
+// System.setProperty("myproxy.username", "ogce");
+// System.setProperty("myproxy.password", "");
+// System.setProperty("basedir", "/Users/lahirugunathilake/work/airavata/sandbox/gsissh");
+// System.setProperty("gsi.working.directory", "/home/ogce");
+// System.setProperty("trusted.cert.location", "/Users/lahirugunathilake/Downloads/certificates");
myProxyUserName = System.getProperty("myproxy.username");
myProxyPassword = System.getProperty("myproxy.password");
workingDirectory = System.getProperty("gsi.working.directory");
http://git-wip-us.apache.org/repos/asf/airavata/blob/a9e022b9/modules/orchestrator/orchestrator-core/pom.xml
----------------------------------------------------------------------
diff --git a/modules/orchestrator/orchestrator-core/pom.xml b/modules/orchestrator/orchestrator-core/pom.xml
index c2085b5..e3de0b7 100644
--- a/modules/orchestrator/orchestrator-core/pom.xml
+++ b/modules/orchestrator/orchestrator-core/pom.xml
@@ -60,10 +60,23 @@ the License. -->
<artifactId>airavata-gfac-core</artifactId>
<version>${project.version}</version>
</dependency>
- <dependency>
+ <dependency>
<groupId>org.apache.airavata</groupId>
<artifactId>airavata-gfac-local</artifactId>
<version>${project.version}</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.airavata</groupId>
+ <artifactId>airavata-gfac-gsissh</artifactId>
+ <version>${project.version}</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.airavata</groupId>
+ <artifactId>airavata-gfac-hpc-monitor</artifactId>
+ <version>${project.version}</version>
+ <scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.airavata</groupId>
http://git-wip-us.apache.org/repos/asf/airavata/blob/a9e022b9/modules/orchestrator/orchestrator-core/src/test/java/org/apache/airavata/orchestrator/core/OrchestratorTestWithMyProxyAuth.java
----------------------------------------------------------------------
diff --git a/modules/orchestrator/orchestrator-core/src/test/java/org/apache/airavata/orchestrator/core/OrchestratorTestWithMyProxyAuth.java b/modules/orchestrator/orchestrator-core/src/test/java/org/apache/airavata/orchestrator/core/OrchestratorTestWithMyProxyAuth.java
index 3a3fa04..a609162 100644
--- a/modules/orchestrator/orchestrator-core/src/test/java/org/apache/airavata/orchestrator/core/OrchestratorTestWithMyProxyAuth.java
+++ b/modules/orchestrator/orchestrator-core/src/test/java/org/apache/airavata/orchestrator/core/OrchestratorTestWithMyProxyAuth.java
@@ -60,11 +60,9 @@ public class OrchestratorTestWithMyProxyAuth extends BaseOrchestratorTest {
AiravataUtils.setExecutionAsServer();
super.setUp();
orchestrator = new SimpleOrchestratorImpl();
-// System.setProperty("myproxy.user", "ogce");
-// System.setProperty("myproxy.pass", "");
-// System.setProperty("trusted.cert.location", "/Users/lahirugunathilake/Downloads/certificates");
- // this is the same propertySystem.getProperty("myproxy.user");
-// System.setProperty("myproxy.pass",System.getProperty("myproxy.password"));
+// System.setProperty("myproxy.username", "ogce");
+// System.setProperty("myproxy.password", "");
+ System.setProperty("trusted.cert.location", "/Users/lahirugunathilake/Downloads/certificates");
// System.setProperty("trusted.cert.location",System.getProperty("gsi.working.directory"));
}
@@ -106,6 +104,4 @@ public class OrchestratorTestWithMyProxyAuth extends BaseOrchestratorTest {
orchestrator.launchExperiment(simpleExperiment,test, taskDetail);
}
}
-
-
}
http://git-wip-us.apache.org/repos/asf/airavata/blob/a9e022b9/modules/orchestrator/orchestrator-core/src/test/resources/gfac-config.xml
----------------------------------------------------------------------
diff --git a/modules/orchestrator/orchestrator-core/src/test/resources/gfac-config.xml b/modules/orchestrator/orchestrator-core/src/test/resources/gfac-config.xml
index d7bb032..5110374 100644
--- a/modules/orchestrator/orchestrator-core/src/test/resources/gfac-config.xml
+++ b/modules/orchestrator/orchestrator-core/src/test/resources/gfac-config.xml
@@ -12,9 +12,7 @@
<GFac>
<DaemonHandlers>
- <Handler class="org.apache.airavata.gfac.monitor.handlers.GridPullMonitorHandler">
- <property name="listeners" value="org.apache.airavata.gfac.core.monitor.AiravataJobStatusUpdator"/>
- </Handler>
+ <Handler class="org.apache.airavata.gfac.monitor.handlers.GridPullMonitorHandler"/>
</DaemonHandlers>
<GlobalHandlers>
<InHandlers>
http://git-wip-us.apache.org/repos/asf/airavata/blob/a9e022b9/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/ExperimentRegistry.java
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/ExperimentRegistry.java b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/ExperimentRegistry.java
index 952791b..874cb5e 100644
--- a/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/ExperimentRegistry.java
+++ b/modules/registry/airavata-jpa-registry/src/main/java/org/apache/airavata/persistance/registry/jpa/impl/ExperimentRegistry.java
@@ -121,6 +121,7 @@ public class ExperimentRegistry {
logger.error("Error while saving experiment to registry", e.getMessage());
throw new Exception(e);
}
+ experiment.setExperimentID(experimentID);
return experimentID;
}