Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
2.2.1
-
None
Description
Provision a cluster with blueprint and enable kerberos with it. config_recommendation_strategy is ONLY_STACK_DEFAULTS_APPLY. The cluster installation will fail.
java.lang.NullPointerException
at org.apache.ambari.server.topology.ClusterConfigurationRequest.configureKerberos(ClusterConfigurationRequest.java:151)
at org.apache.ambari.server.topology.ClusterConfigurationRequest.process(ClusterConfigurationRequest.java:103)
at org.apache.ambari.server.topology.TopologyManager$ConfigureClusterTask.call(TopologyManager.java:764)
at org.apache.ambari.server.topology.TopologyManager$ConfigureClusterTask.call(TopologyManager.java:738)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
Suspicious code snippet:
Map<String, String> propertyMap = updatedConfigs.get(configType); Map<String, String> clusterConfigProperties = existingConfigurations.get(configType); Map<String, String> stackDefaultConfigProperties = stackDefaultProps.get(configType); for (String property : propertyMap.keySet()) { if (clusterConfigProperties == null || !clusterConfigProperties.containsKey(property) || (clusterConfigProperties.get(property) == null && stackDefaultConfigProperties.get(property) == null) || (clusterConfigProperties.get(property) != null && clusterConfigProperties.get(property).equals(stackDefaultConfigProperties.get(property))))