You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by ma...@apache.org on 2017/09/26 19:09:51 UTC

[22/40] airavata git commit: AIRAVATA-2500 SSHAccountManager bug fixes

AIRAVATA-2500 SSHAccountManager bug fixes


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

Branch: refs/heads/develop
Commit: 31f3906b6123bb1ce57cd9030f05f15d343cd9f9
Parents: 3184c23
Author: Marcus Christie <ma...@apache.org>
Authored: Thu Sep 7 13:11:03 2017 -0400
Committer: Marcus Christie <ma...@apache.org>
Committed: Tue Sep 19 15:08:05 2017 -0400

----------------------------------------------------------------------
 .../apache/airavata/accountprovisioning/SSHAccountManager.java | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/31f3906b/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/SSHAccountManager.java
----------------------------------------------------------------------
diff --git a/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/SSHAccountManager.java b/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/SSHAccountManager.java
index 8493dc1..70c144c 100644
--- a/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/SSHAccountManager.java
+++ b/modules/compute-account-provisioning/src/main/java/org/apache/airavata/accountprovisioning/SSHAccountManager.java
@@ -165,7 +165,7 @@ public class SSHAccountManager {
                         PasswordCredential password = credentialStoreServiceClient.getPasswordCredential(configEntry.getValue(), gatewayId);
                         resolvedConfig.put(configEntry.getKey(), password.getPassword());
                     } catch (TException e) {
-                        throw new RuntimeException("Failed to get password needed to configure " + provisionerName);
+                        throw new RuntimeException("Failed to get password needed to configure " + provisionerName, e);
                     }
                 } else {
                     resolvedConfig.put(configEntry.getKey(), configEntry.getValue());
@@ -182,6 +182,8 @@ public class SSHAccountManager {
     }
 
     private static Map<ConfigParam, String> convertConfigParams(String provisionerName, Map<String, String> thriftConfigParams) {
+        // TODO: also check that all required parameters are present?
+        // TODO: also, this doesn't handle optional entries which should be skipped if missing from thriftConfigParams
         List<ConfigParam> configParams = SSHAccountProvisionerFactory.getSSHAccountProvisionerConfigParams(provisionerName);
         Map<String, ConfigParam> configParamMap = configParams.stream().collect(Collectors.toMap(ConfigParam::getName, Function.identity()));
 
@@ -204,7 +206,7 @@ public class SSHAccountManager {
         try {
             String credServerHost = ServerSettings.getCredentialStoreServerHost();
             int credServerPort = Integer.valueOf(ServerSettings.getCredentialStoreServerPort());
-            return CredentialStoreClientFactory.createAiravataCSClient(null, 0);
+            return CredentialStoreClientFactory.createAiravataCSClient(credServerHost, credServerPort);
         } catch (CredentialStoreException | ApplicationSettingsException e) {
             throw new RuntimeException("Failed to create credential store service client", e);
         }