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

[11/19] 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/e57032d2
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/e57032d2
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/e57032d2

Branch: refs/heads/branch-feature-AMBARI-21450
Commit: e57032d26633b0a451b123d3109672b638dc40a9
Parents: 61df697
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:09:54 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/e57032d2/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 fa5ed71..7567755 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
@@ -3946,7 +3946,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;