----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/28480/ -----------------------------------------------------------
Review request for Ambari, Nate Cole and Tom Beerbower. Bugs: AMBARI-8460 https://issues.apache.org/jira/browse/AMBARI-8460 Repository: ambari Description ------- When upgrading to a version of Ambari that supports the new alert framework, the AlertDefinition and AlertGroup tables must be populated with the definitions and default groups for services that are already installed in the cluster. Most of this is actually taken care of automatically. When Ambari 2.0.0 starts up, it will read all of the services for each cluster and then it will determine if any of the stack alert definitions for that service exist or are new. They will all be new, causing them to be created. However, the alert groups will not be created automatically for the services. When adding alert definitions, we must ensure that a default group is already created. Diffs ----- ambari-server/src/main/java/org/apache/ambari/server/events/listeners/alerts/AlertServiceStateListener.java b56f23d ambari-server/src/main/java/org/apache/ambari/server/orm/dao/AlertDefinitionDAO.java 8e8c808 ambari-server/src/main/java/org/apache/ambari/server/orm/dao/AlertDispatchDAO.java b6c1e90 ambari-server/src/main/java/org/apache/ambari/server/orm/dao/AlertsDAO.java 1127dd1 ambari-server/src/main/java/org/apache/ambari/server/orm/entities/AlertGroupEntity.java ac3586d ambari-server/src/test/java/org/apache/ambari/server/orm/OrmTestHelper.java dc71862 ambari-server/src/test/java/org/apache/ambari/server/orm/dao/AlertDispatchDAOTest.java 0d2d305 ambari-server/src/test/java/org/apache/ambari/server/orm/dao/AlertsDAOTest.java 6467b31 ambari-server/src/test/java/org/apache/ambari/server/state/alerts/AlertReceivedListenerTest.java 8a162fd ambari-server/src/test/java/org/apache/ambari/server/state/cluster/AlertDataManagerTest.java 2be5b47 Diff: https://reviews.apache.org/r/28480/diff/ Testing ------- New tests added for verifying default alert group creation. Existing tests changed to have valid services in the AlertDefinitions. Performed a cluster installation, then wiped the database tables for all alerts to simulate a 2.0.0 startup for the first time. Thanks, Jonathan Hurley