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/11/07 16:21:46 UTC
airavata git commit: fixing issue with scp
Repository: airavata
Updated Branches:
refs/heads/master f7c25ca51 -> c383cf3c4
fixing issue with scp
Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/c383cf3c
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/c383cf3c
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/c383cf3c
Branch: refs/heads/master
Commit: c383cf3c44287d2e3e20055eaf69ef0c6e153a01
Parents: f7c25ca
Author: lahiru <la...@apache.org>
Authored: Fri Nov 7 10:21:40 2014 -0500
Committer: lahiru <la...@apache.org>
Committed: Fri Nov 7 10:21:40 2014 -0500
----------------------------------------------------------------------
.../apache/airavata/gfac/core/context/JobExecutionContext.java | 2 +-
.../airavata/gfac/ssh/handler/AdvancedSCPInputHandler.java | 6 ++++--
2 files changed, 5 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/airavata/blob/c383cf3c/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/context/JobExecutionContext.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/context/JobExecutionContext.java b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/context/JobExecutionContext.java
index 2f94ec5..9abab8d 100644
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/context/JobExecutionContext.java
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/context/JobExecutionContext.java
@@ -234,7 +234,7 @@ public class JobExecutionContext extends AbstractContext implements Serializable
public SecurityContext getSecurityContext(String name) throws GFacException{
- SecurityContext secContext = securityContext.get(name+"-"+this.getApplicationContext().getHostDescription().getType().getHostAddress());
+ SecurityContext secContext = securityContext.get(name);
return secContext;
}
http://git-wip-us.apache.org/repos/asf/airavata/blob/c383cf3c/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/handler/AdvancedSCPInputHandler.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/handler/AdvancedSCPInputHandler.java b/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/handler/AdvancedSCPInputHandler.java
index a8c3ad0..26d0c29 100644
--- a/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/handler/AdvancedSCPInputHandler.java
+++ b/modules/gfac/gfac-ssh/src/main/java/org/apache/airavata/gfac/ssh/handler/AdvancedSCPInputHandler.java
@@ -156,12 +156,14 @@ public class AdvancedSCPInputHandler extends AbstractRecoverableHandler {
if ("URI".equals(actualParameter.getType().getType().toString())) {
try {
URL file = new URL(paramValue);
+ String key = file.getUserInfo() + file.getHost() + DEFAULT_SSH_PORT;
GFACSSHUtils.prepareSecurityContext(jobExecutionContext, authenticationInfo, file.getUserInfo(), file.getHost(), DEFAULT_SSH_PORT);
- pbsCluster = ((SSHSecurityContext)jobExecutionContext.getSecurityContext(SSHSecurityContext.SSH_SECURITY_CONTEXT)).getPbsCluster();
+ pbsCluster = ((SSHSecurityContext)jobExecutionContext.getSecurityContext(SSHSecurityContext.SSH_SECURITY_CONTEXT+key)).getPbsCluster();
paramValue = file.getPath();
} catch (MalformedURLException e) {
+ String key = this.userName + this.hostName + DEFAULT_SSH_PORT;
GFACSSHUtils.prepareSecurityContext(jobExecutionContext, authenticationInfo, this.userName, this.hostName, DEFAULT_SSH_PORT);
- pbsCluster = ((SSHSecurityContext)jobExecutionContext.getSecurityContext(SSHSecurityContext.SSH_SECURITY_CONTEXT)).getPbsCluster();
+ pbsCluster = ((SSHSecurityContext)jobExecutionContext.getSecurityContext(SSHSecurityContext.SSH_SECURITY_CONTEXT+key)).getPbsCluster();
log.error(e.getLocalizedMessage(), e);
}