You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by nc...@apache.org on 2017/07/24 15:27:12 UTC

[46/50] [abbrv] ambari git commit: AMBARI-21157. Logging cleanup around reading config properties file

AMBARI-21157. Logging cleanup around reading config properties file


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/495a3f46
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/495a3f46
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/495a3f46

Branch: refs/heads/branch-feature-AMBARI-12556
Commit: 495a3f467edc4e19e9da76db10a1499e514c80a5
Parents: d77bde7
Author: Sumit Mohanty <sm...@hortonworks.com>
Authored: Sat Jul 22 18:09:54 2017 -0700
Committer: Sumit Mohanty <sm...@hortonworks.com>
Committed: Sat Jul 22 18:10:42 2017 -0700

----------------------------------------------------------------------
 .../org/apache/ambari/server/configuration/Configuration.java  | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/495a3f46/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java b/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java
index 28f9d64..1b4d741 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java
@@ -4064,7 +4064,11 @@ public class Configuration {
       if (result != null) {
         password = new String(result);
       } else {
-        LOG.error("Cannot read password for alias = " + aliasStr);
+        if (CredentialProvider.isAliasString(aliasStr)) {
+          LOG.error("Cannot read password for alias = " + aliasStr);
+        } else {
+          LOG.warn("Raw password provided, not an alias. It cannot be read from credential store.");
+        }
       }
     }
     return password;