Details
-
Bug
-
Status: Resolved
-
Critical
-
Resolution: Fixed
-
2.1.2
-
None
Description
It appears that the NPE is coming from org/apache/ambari/server/state/ConfigHelper.java:691 when the config being processed is "storm-site".
if (oldConfig == null) { oldConfigProperties = null; } else { oldConfigProperties = oldConfig.getProperties(); if (oldConfigProperties != null) { properties.putAll(oldConfig.getProperties()); } ==> propertiesAttributes.putAll(oldConfig.getPropertiesAttributes()); }
When the config type is "storm-site", oldConfig.getPropertiesAttributes() returns null since the clusterconfig.config_attributes value is null.
Most other relevant records (latest version of the config type) have and empty JSON structure (not null). Except for "hbase-log4j", "hdfs-log4j", hive-exec-log4j", "hive-log4j", "mapreduce2-log4j", "pig-log4j". "yarn-log4j", "zookeeper-log4j" - which don't seem to come into play at this time.
Steps to Reproduce
(this needs confirmation)
- Deploy old version (1.6.1)
- Make Ambari Only Upgrade to 2.1.2.1
- Enable security
Solution
The fix for this is to make sure oldConfig.getPropertiesAttributes() != null before calling propertiesAttributes.putAll(oldConfig.getPropertiesAttributes()).