----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/50140/#review142932 -----------------------------------------------------------
ambari-server/src/main/java/org/apache/ambari/server/serveraction/upgrades/RangerWebAlertConfigAction.java (line 72) <https://reviews.apache.org/r/50140/#comment208602> Change this a bit to be clearer in the logs: "Updating the alert definition for ranger_admin_process" ambari-server/src/main/java/org/apache/ambari/server/serveraction/upgrades/RangerWebAlertConfigAction.java (line 93) <https://reviews.apache.org/r/50140/#comment208603> I don't think this log statement adds much value. ambari-server/src/main/java/org/apache/ambari/server/serveraction/upgrades/RangerWebAlertConfigAction.java (line 94) <https://reviews.apache.org/r/50140/#comment208605> I don't think this is going to actually broadcast the AlertInvalidationEvent. You might need to it manually like this: https://github.com/apache/ambari/blob/trunk/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AlertDefinitionResourceProvider.java#L322-L326 ``` // invalidate and publish the definition hash Set<String> invalidatedHosts = alertDefinitionHash.invalidateHosts(entity); AlertHashInvalidationEvent event = new AlertHashInvalidationEvent( entity.getClusterId(), invalidatedHosts); eventPublisher.publish(event); ``` I can't remember why it wasn't a part of `merge()` ... seems like it should be, but I don't think it's very safe to add it there at this late stage. ambari-server/src/main/java/org/apache/ambari/server/serveraction/upgrades/RangerWebAlertConfigAction.java (lines 100 - 102) <https://reviews.apache.org/r/50140/#comment208604> Probably not needed either; there are a log of installs which don't use Ranger. - Jonathan Hurley On July 19, 2016, 11:26 a.m., Gautam Borad wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/50140/ > ----------------------------------------------------------- > > (Updated July 19, 2016, 11:26 a.m.) > > > Review request for Ambari, Alejandro Fernandez, Jonathan Hurley, Mahadev > Konar, Sumit Mohanty, Selvamohan Neethiraj, Srimanth Gunturi, and Velmurugan > Periasamy. > > > Bugs: AMBARI-17771 > https://issues.apache.org/jira/browse/AMBARI-17771 > > > Repository: ambari > > > Description > ------- > > Update alert definition URI after stack is updated. > > > Diffs > ----- > > > ambari-server/src/main/java/org/apache/ambari/server/serveraction/upgrades/RangerWebAlertConfigAction.java > PRE-CREATION > > ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/nonrolling-upgrade-2.5.xml > 7d9615568fb3ef02ded4816c02959c882ce43f50 > ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/upgrade-2.5.xml > 964ec3f649cec538af7865aacf51f5c0e18230a4 > > ambari-server/src/main/resources/stacks/HDP/2.4/upgrades/nonrolling-upgrade-2.5.xml > c82e938b7f285107980bdda4efac095e267d3530 > ambari-server/src/main/resources/stacks/HDP/2.4/upgrades/upgrade-2.5.xml > 49ff6da745821e6314dc62ef0bcee78f328460a0 > > ambari-server/src/test/java/org/apache/ambari/server/serveraction/upgrades/RangerWebAlertConfigActionTest.java > PRE-CREATION > > ambari-server/src/test/resources/stacks/HDP/2.5.0/services/RANGER/alerts.json > PRE-CREATION > > Diff: https://reviews.apache.org/r/50140/diff/ > > > Testing > ------- > > Tested on a centos 6 cluster after upgrade and checked that the alert works > fine for Ranger Admin. > > > Thanks, > > Gautam Borad > >