airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sma...@apache.org
Subject [39/50] airavata git commit: AIRAVATA-2339 Attempting to fix data staging with individual account
Date Mon, 03 Apr 2017 16:50:12 GMT
AIRAVATA-2339 Attempting to fix data staging with individual account

In ProcessContext I removed use of isUseUserCRPref() in methods related to
getting gateway storage information. Whether the current experiment is submitted
with user's compute resource preferences or not should not affect gateway
storage information. How to specify user's storage preferences is not yet
implemented and must be implemented with something other than isUseUserCRPref().

In SCPDataStageTask, I changed the construction of the sshSession for the SCP
connection to the compute resource to use
getComputerResourceSSHKeyAuthentication() instead of
getStorageSSHKeyAuthentication(), which would not be correct, if I understand
the code correctly.


Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/41cc9205
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/41cc9205
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/41cc9205

Branch: refs/heads/master
Commit: 41cc92057c603fb21fc3f1c719d525fbbc7ab281
Parents: 44abf36
Author: Marcus Christie <machristie@apache.org>
Authored: Sat Mar 25 20:29:32 2017 -0400
Committer: Marcus Christie <machristie@apache.org>
Committed: Sat Mar 25 20:29:48 2017 -0400

----------------------------------------------------------------------
 .../gfac/core/context/ProcessContext.java       | 39 +++-----------------
 .../gfac/impl/task/SCPDataStageTask.java        |  2 +-
 2 files changed, 7 insertions(+), 34 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/41cc9205/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/context/ProcessContext.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/context/ProcessContext.java
b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/context/ProcessContext.java
index 153f0ee..5dd06db 100644
--- a/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/context/ProcessContext.java
+++ b/modules/gfac/gfac-core/src/main/java/org/apache/airavata/gfac/core/context/ProcessContext.java
@@ -464,19 +464,10 @@ public class ProcessContext {
 	}
 
 	public String getStorageResourceCredentialToken(){
-		if (isUseUserCRPref()) {
-			if (userStoragePreference != null &&
-					isValid(userStoragePreference.getResourceSpecificCredentialStoreToken())) {
-				return userStoragePreference.getResourceSpecificCredentialStoreToken();
-			} else {
-				return userResourceProfile.getCredentialStoreToken();
-			}
+		if (isValid(gatewayStorageResourcePreference.getResourceSpecificCredentialStoreToken()))
{
+			return gatewayStorageResourcePreference.getResourceSpecificCredentialStoreToken();
 		} else {
-			if (isValid(gatewayStorageResourcePreference.getResourceSpecificCredentialStoreToken()))
{
-				return gatewayStorageResourcePreference.getResourceSpecificCredentialStoreToken();
-			} else {
-				return gatewayResourceProfile.getCredentialStoreToken();
-			}
+			return gatewayResourceProfile.getCredentialStoreToken();
 		}
 	}
 
@@ -616,33 +607,15 @@ public class ProcessContext {
 	}
 
 	public String getStorageResourceLoginUserName(){
-		if (isUseUserCRPref() &&
-				userStoragePreference != null &&
-				isValid(userStoragePreference.getLoginUserName())) {
-			return userStoragePreference.getLoginUserName();
-		} else {
-			return gatewayStorageResourcePreference.getLoginUserName();
-		}
+		return gatewayStorageResourcePreference.getLoginUserName();
 	}
 
 	public String getStorageFileSystemRootLocation(){
-		if (isUseUserCRPref() &&
-				userStoragePreference != null &&
-				isValid(userStoragePreference.getFileSystemRootLocation())) {
-			return userStoragePreference.getFileSystemRootLocation();
-		} else {
-			return gatewayStorageResourcePreference.getFileSystemRootLocation();
-		}
+		return gatewayStorageResourcePreference.getFileSystemRootLocation();
 	}
 
 	public String getStorageResourceId() {
-		if (isUseUserCRPref() &&
-				userStoragePreference != null &&
-				isValid(userStoragePreference.getStorageResourceId())) {
-			return userStoragePreference.getStorageResourceId();
-		} else {
-			return gatewayStorageResourcePreference.getStorageResourceId();
-		}
+		return gatewayStorageResourcePreference.getStorageResourceId();
 	}
 
 	private ComputationalResourceSchedulingModel getProcessCRSchedule() {

http://git-wip-us.apache.org/repos/asf/airavata/blob/41cc9205/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/impl/task/SCPDataStageTask.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/impl/task/SCPDataStageTask.java
b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/impl/task/SCPDataStageTask.java
index c4577ba..868a77a 100644
--- a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/impl/task/SCPDataStageTask.java
+++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/impl/task/SCPDataStageTask.java
@@ -150,7 +150,7 @@ public class SCPDataStageTask implements Task {
                 return status;
             }
 
-            authenticationInfo = Factory.getStorageSSHKeyAuthentication(processContext);
+            authenticationInfo = Factory.getComputerResourceSSHKeyAuthentication(processContext);
             status = new TaskStatus(TaskState.COMPLETED);
 
             ServerInfo serverInfo = processContext.getComputeResourceServerInfo();


Mime
View raw message