airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From shame...@apache.org
Subject [1/2] airavata git commit: Added info logs to track jureca file movements, initiate security property with every request
Date Mon, 28 Mar 2016 22:05:19 GMT
Repository: airavata
Updated Branches:
  refs/heads/master 3dce244cb -> f0198a43a


Added info logs to track jureca file movements, initiate security property with every request


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

Branch: refs/heads/master
Commit: 5444ba3edc02895ed1e08e97c4c6192729b81a8e
Parents: e8b7773
Author: Shameera Rathnayaka <shameerainfo@gmail.com>
Authored: Mon Mar 28 18:04:45 2016 -0400
Committer: Shameera Rathnayaka <shameerainfo@gmail.com>
Committed: Mon Mar 28 18:04:45 2016 -0400

----------------------------------------------------------------------
 .../airavata/gfac/impl/task/BESJobSubmissionTask.java     | 10 ++++++----
 .../gfac/impl/task/utils/bes/DataTransferrer.java         |  2 ++
 2 files changed, 8 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/5444ba3e/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/impl/task/BESJobSubmissionTask.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/impl/task/BESJobSubmissionTask.java
b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/impl/task/BESJobSubmissionTask.java
index 591ce69..6529395 100644
--- a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/impl/task/BESJobSubmissionTask.java
+++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/impl/task/BESJobSubmissionTask.java
@@ -105,9 +105,9 @@ public class BESJobSubmissionTask implements JobSubmissionTask {
         // FIXME - use original output dir
         setInputOutputLocations(processContext);
         try {
-            if (secProperties == null) {
-                secProperties = getSecurityConfig(processContext);
-            }  // try secProperties = secProperties.clone() if we can't use already initialized
ClientConfigurations.
+            // con't reuse if UserDN has been changed.
+            secProperties = getSecurityConfig(processContext);
+            // try secProperties = secProperties.clone() if we can't use already initialized
ClientConfigurations.
         } catch (GFacException e) {
             String msg = "Unicorn security context initialization error";
             log.error(msg, e);
@@ -266,6 +266,7 @@ public class BESJobSubmissionTask implements JobSubmissionTask {
                         fileName = localFilePath.substring(localFilePath.lastIndexOf("/")
+ 1);
                         URI destinationURI = TaskUtils.getDestinationURI(taskContext, hostName,
inputPath, fileName);
                         remoteFilePath = destinationURI.getPath();
+                        log.info("SCP local file :{} -> from remote :{}", localFilePath,
remoteFilePath);
                         SSHUtils.scpTo(localFilePath, remoteFilePath, sshSession);
                         output.setValue(destinationURI.toString());
                         break;
@@ -312,6 +313,7 @@ public class BESJobSubmissionTask implements JobSubmissionTask {
                     remoteFilePath = remoteFileURI.getPath();
                     fileName = remoteFilePath.substring(remoteFilePath.lastIndexOf("/") +
1);
                     localFilePath = pc.getInputDir() + File.separator + fileName;
+                    log.info("SCP remote file :{} -> to local :{}", remoteFilePath, localFilePath);
                     SSHUtils.scpFrom(remoteFilePath, localFilePath, sshSession);
                     input.setValue("file:/" + localFilePath);
                 }
@@ -338,7 +340,7 @@ public class BESJobSubmissionTask implements JobSubmissionTask {
                     get(ExperimentCatalogModelType.USER_CONFIGURATION_DATA, pc.getExperimentId());
             // FIXME - remove following setter lines, and use original value comes with user
configuration data model.
             userConfigDataModel.setGenerateCert(true);
-            userConfigDataModel.setUserDN("CN=swus3, O=Ultrascan Gateway, C=DE");
+//            userConfigDataModel.setUserDN("CN=swus3, O=Ultrascan Gateway, C=DE");
             if (userConfigDataModel.isGenerateCert()) {
                 clientConfig = unicoreSecurityContext.getDefaultConfiguration(false, userConfigDataModel);
             } else {

http://git-wip-us.apache.org/repos/asf/airavata/blob/5444ba3e/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/impl/task/utils/bes/DataTransferrer.java
----------------------------------------------------------------------
diff --git a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/impl/task/utils/bes/DataTransferrer.java
b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/impl/task/utils/bes/DataTransferrer.java
index 08fa551..0a3fcce 100644
--- a/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/impl/task/utils/bes/DataTransferrer.java
+++ b/modules/gfac/gfac-impl/src/main/java/org/apache/airavata/gfac/impl/task/utils/bes/DataTransferrer.java
@@ -114,6 +114,7 @@ public class DataTransferrer {
                 try {
                     String uriWithoutProtocol = uri.substring(uri.lastIndexOf("://") + 2,
uri.length());
                     FileUploader fileUploader = new FileUploader(uriWithoutProtocol, fileName,
Mode.overwrite, false);
+                    log.info("Uploading file {}", fileName);
                     fileUploader.perform(storageClient);
                 } catch (FileNotFoundException e3) {
                     throw new GFacException(
@@ -289,6 +290,7 @@ public class DataTransferrer {
 
                     FileDownloader fileDownloader = new FileDownloader(value, outputPath,
Mode.overwrite);
                     try {
+                        log.info("Downloading file {}", value);
                         fileDownloader.perform(storageClient);
                         output.setType(DataType.URI);
                         output.setValue(outputPath);


Mime
View raw message