AMBARI-19175. DB configs consistency check failed after disable kerberos or 
Ambari upgrade (dlysnichenko)


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

Branch: refs/heads/branch-2.5
Commit: 9ab01cbd3b3a06732db49606bcaba52328a121a0
Parents: 6a9fd0b
Author: Lisnichenko Dmitro <[email protected]>
Authored: Tue Dec 13 13:02:41 2016 +0200
Committer: Lisnichenko Dmitro <[email protected]>
Committed: Tue Dec 13 13:03:30 2016 +0200

----------------------------------------------------------------------
 .../ambari/server/checks/DatabaseConsistencyCheckHelper.java | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/9ab01cbd/ambari-server/src/main/java/org/apache/ambari/server/checks/DatabaseConsistencyCheckHelper.java
----------------------------------------------------------------------
diff --git 
a/ambari-server/src/main/java/org/apache/ambari/server/checks/DatabaseConsistencyCheckHelper.java
 
b/ambari-server/src/main/java/org/apache/ambari/server/checks/DatabaseConsistencyCheckHelper.java
index d40dfd2..f424c3e 100644
--- 
a/ambari-server/src/main/java/org/apache/ambari/server/checks/DatabaseConsistencyCheckHelper.java
+++ 
b/ambari-server/src/main/java/org/apache/ambari/server/checks/DatabaseConsistencyCheckHelper.java
@@ -460,9 +460,13 @@ public class DatabaseConsistencyCheckHelper {
     LOG.info("Checking for configs that are not mapped to any service");
     List<ClusterConfigEntity> notMappedClasterConfigs = 
getNotMappedClusterConfigsToService();
 
+    Set<String> nonMappedConfigs = new HashSet<>();
+    for (ClusterConfigEntity clusterConfigEntity : notMappedClasterConfigs) {
+      nonMappedConfigs.add(clusterConfigEntity.getType() + '-' + 
clusterConfigEntity.getTag());
+    }
     if (!notMappedClasterConfigs.isEmpty()){
-      LOG.error("Found configs that are not mapped to any service!");
-      errorsFound = true;
+      LOG.warn("You have config(s): {} that is(are) not mapped (in 
serviceconfigmapping table) to any service!", 
StringUtils.join(nonMappedConfigs, ","));
+      warningsFound = true;
     }
   }
 

Reply via email to