----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/38301/ -----------------------------------------------------------
Review request for Ambari and Dmitro Lisnichenko. Bugs: AMBARI-13075 https://issues.apache.org/jira/browse/AMBARI-13075 Repository: ambari Description ------- This was reported by a customer. Customer accidentally added a config of type `hivesite` to a config group. **Call** curl 'http://ambhost:8080/api/v1/clusters/TSGHDP/config_groups/3' -X PUT -H "X-Requested-By: ambari" --user admin:admin --data '[{"ConfigGroup":{"id":3,"cluster_name":"HDP","group_name":"Hive_custom_group","tag":"HIVE","description":"","hosts":[{"host_name":"abc.local"}],"service_config_version_note":"hive custom group tx timeout property change","desired_configs":[{"type":"hivesite","tag":"newversionforjdbcurl","properties":{"hive.txn.timeout":"310","javax.jdo.option.ConnectionURL":"jdbc:mysql://abc.local/hive2?createDatabaseIfNotExist=true"}}]}}]' --compressed This resulted in ambari-server failing to process agent heartbeat and throwing NPE. 13 Aug 2015 10:36:28,961 WARN [ambari-hearbeat-monitor] HeartbeatMonitor:129 - Exception received java.lang.NullPointerException at org.apache.ambari.server.state.host.HostImpl.getDesiredHostConfigs(HostImpl.java:1349) at org.apache.ambari.server.state.ConfigHelper.getEffectiveDesiredTags(ConfigHelper.java:109) at org.apache.ambari.server.agent.HeartbeatMonitor.createStatusCommand(HeartbeatMonitor.java:253) at org.apache.ambari.server.agent.HeartbeatMonitor.generateStatusCommands(HeartbeatMonitor.java:218) at org.apache.ambari.server.agent.HeartbeatMonitor.doWork(HeartbeatMonitor.java:190) at org.apache.ambari.server.agent.HeartbeatMonitor.run(HeartbeatMonitor.java:121) at java.lang.Thread.run(Thread.java:745) Diffs ----- ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ConfigGroupResourceProvider.java 30bcc86 ambari-server/src/main/java/org/apache/ambari/server/state/Cluster.java 916bc49 ambari-server/src/main/java/org/apache/ambari/server/state/cluster/ClusterImpl.java 4fe24e9 ambari-server/src/main/java/org/apache/ambari/server/state/host/HostImpl.java e20cd25 ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ConfigGroupResourceProviderTest.java 753daec Diff: https://reviews.apache.org/r/38301/diff/ Testing ------- mvn clean test Thanks, Andrew Onischuk