ambari-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nate Cole" <nc...@hortonworks.com>
Subject Re: Review Request 28394: Current Alerts Should Be Cleaned Up With Ambari Cluster/Service/Component/Host Changes
Date Tue, 25 Nov 2014 21:55:30 GMT

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/28394/#review63054
-----------------------------------------------------------

Ship it!


Ship It!

- Nate Cole


On Nov. 25, 2014, 12:33 a.m., Jonathan Hurley wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/28394/
> -----------------------------------------------------------
> 
> (Updated Nov. 25, 2014, 12:33 a.m.)
> 
> 
> Review request for Ambari, Nate Cole and Tom Beerbower.
> 
> 
> Bugs: AMBARI-8430
>     https://issues.apache.org/jira/browse/AMBARI-8430
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> When an active alert definition is disabled, instances of that alert definition should
not show up when query the cluster/service/host for alerts. 
> 
> STR:
> 1) Cause an alert to trigger (shut something down)
> 2) Disable the alert definition for that alert
> 3) CRITICAL alert stays in the list of current cluster alerts
> 
> Expected: The API should prevent disabled alerts from being returned.
> 
> Beyond this, the API should also clean up current alerts that are no longer valid. This
includes:
> 1) Alerts that are for hosts which no longer exist
> 2) Alerts that are for a component that is no longer installed on a host
> 3) Alerts for services that are no longer part of the cluster (including the default
group for that service)
> 
> Alerts that are being received should also be verified for validity so that an invalid
alert that was cached by the agent doesn't re-appear.
> 
> 
> Diffs
> -----
> 
>   ambari-agent/src/main/python/ambari_agent/Heartbeat.py a6ecee1 
>   ambari-agent/src/main/python/ambari_agent/HostInfo_linux.py d172443 
>   ambari-agent/src/main/python/ambari_agent/HostInfo_win.py 6ac987f 
>   ambari-agent/src/main/python/ambari_agent/alerts/collector.py ffb0179 
>   ambari-agent/src/test/python/ambari_agent/TestAlerts.py d3e4583 
>   ambari-agent/src/test/python/ambari_agent/TestHeartbeat.py bdc6c6b 
>   ambari-agent/src/test/python/ambari_agent/TestHostInfo.py afacf38 
>   ambari-server/src/main/java/org/apache/ambari/server/agent/HeartBeatHandler.java 844b8cb

>   ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AlertDefinitionResourceProvider.java
ffffb60 
>   ambari-server/src/main/java/org/apache/ambari/server/events/AlertDefinitionDisabledEvent.java
PRE-CREATION 
>   ambari-server/src/main/java/org/apache/ambari/server/events/AlertHashInvalidationEvent.java
PRE-CREATION 
>   ambari-server/src/main/java/org/apache/ambari/server/events/AmbariEvent.java 5f2517e

>   ambari-server/src/main/java/org/apache/ambari/server/events/HostEvent.java PRE-CREATION

>   ambari-server/src/main/java/org/apache/ambari/server/events/HostRemovedEvent.java PRE-CREATION

>   ambari-server/src/main/java/org/apache/ambari/server/events/ServiceComponentInstalledEvent.java
PRE-CREATION 
>   ambari-server/src/main/java/org/apache/ambari/server/events/ServiceComponentUninstalledEvent.java
PRE-CREATION 
>   ambari-server/src/main/java/org/apache/ambari/server/events/ServiceRemovedEvent.java
PRE-CREATION 
>   ambari-server/src/main/java/org/apache/ambari/server/events/listeners/AlertAggregateListener.java
5e9dea2 
>   ambari-server/src/main/java/org/apache/ambari/server/events/listeners/AlertLifecycleListener.java
22932ee 
>   ambari-server/src/main/java/org/apache/ambari/server/events/listeners/AlertMaintenanceModeListener.java
af008be 
>   ambari-server/src/main/java/org/apache/ambari/server/events/listeners/AlertReceivedListener.java
494ab78 
>   ambari-server/src/main/java/org/apache/ambari/server/events/listeners/AlertServiceStateListener.java
9a1a68b 
>   ambari-server/src/main/java/org/apache/ambari/server/events/listeners/AlertStateChangedListener.java
6924fc0 
>   ambari-server/src/main/java/org/apache/ambari/server/events/listeners/alerts/AlertAggregateListener.java
PRE-CREATION 
>   ambari-server/src/main/java/org/apache/ambari/server/events/listeners/alerts/AlertDefinitionDisabledListener.java
PRE-CREATION 
>   ambari-server/src/main/java/org/apache/ambari/server/events/listeners/alerts/AlertHashInvalidationListener.java
PRE-CREATION 
>   ambari-server/src/main/java/org/apache/ambari/server/events/listeners/alerts/AlertHostListener.java
PRE-CREATION 
>   ambari-server/src/main/java/org/apache/ambari/server/events/listeners/alerts/AlertLifecycleListener.java
PRE-CREATION 
>   ambari-server/src/main/java/org/apache/ambari/server/events/listeners/alerts/AlertMaintenanceModeListener.java
PRE-CREATION 
>   ambari-server/src/main/java/org/apache/ambari/server/events/listeners/alerts/AlertReceivedListener.java
PRE-CREATION 
>   ambari-server/src/main/java/org/apache/ambari/server/events/listeners/alerts/AlertServiceComponentHostListener.java
PRE-CREATION 
>   ambari-server/src/main/java/org/apache/ambari/server/events/listeners/alerts/AlertServiceStateListener.java
PRE-CREATION 
>   ambari-server/src/main/java/org/apache/ambari/server/events/listeners/alerts/AlertStateChangedListener.java
PRE-CREATION 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/dao/AlertsDAO.java 8a8dfe6

>   ambari-server/src/main/java/org/apache/ambari/server/orm/entities/AlertCurrentEntity.java
8ca297b 
>   ambari-server/src/main/java/org/apache/ambari/server/state/Alert.java 3675f87 
>   ambari-server/src/main/java/org/apache/ambari/server/state/ServiceImpl.java 7fa5afe

>   ambari-server/src/main/java/org/apache/ambari/server/state/alert/AlertDefinitionHash.java
da3a572 
>   ambari-server/src/main/java/org/apache/ambari/server/state/cluster/ClustersImpl.java
9cdb498 
>   ambari-server/src/main/java/org/apache/ambari/server/state/svccomphost/ServiceComponentHostImpl.java
a3fec84 
>   ambari-server/src/test/java/org/apache/ambari/server/events/EventsTest.java f681481

>   ambari-server/src/test/java/org/apache/ambari/server/events/MockEventListener.java
bf0d535 
>   ambari-server/src/test/java/org/apache/ambari/server/orm/dao/AlertsDAOTest.java a42dbe7

>   ambari-server/src/test/java/org/apache/ambari/server/state/alerts/AlertDefinitionHashTest.java
9ab1214 
>   ambari-server/src/test/java/org/apache/ambari/server/state/alerts/AlertEventPublisherTest.java
d78e38f 
>   ambari-server/src/test/java/org/apache/ambari/server/state/alerts/AlertReceivedListenerTest.java
PRE-CREATION 
>   ambari-server/src/test/java/org/apache/ambari/server/state/alerts/AlertStateChangedEventTest.java
ad31fff 
>   ambari-server/src/test/java/org/apache/ambari/server/state/cluster/AlertDataManagerTest.java
9ab18a0 
> 
> Diff: https://reviews.apache.org/r/28394/diff/
> 
> 
> Testing
> -------
> 
> New tests added for events and receivers. Manually verified that the alert behavior is
correct in the following cases:
> 
> 1) Disabling alerts remove existing alerts for that definition.
> 2) Removing a host removes all alerts for that host
> 3) Removing a service removes all alerts for the service and the default group.
> 
> 
> Thanks,
> 
> Jonathan Hurley
> 
>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message