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

Ship it!



ambari-server/src/main/java/org/apache/ambari/server/metadata/AgentAlertDefinitions.java
<https://reviews.apache.org/r/27149/#comment99295>

    Copy/Paste



ambari-server/src/main/java/org/apache/ambari/server/state/alert/AlertDefinitionFactory.java
<https://reviews.apache.org/r/27149/#comment99296>

    getAlertDefinitions(Reader, String) is also handling closing and exceptions?



ambari-server/src/main/resources/host_scripts/alert_disk_space.py
<https://reviews.apache.org/r/27149/#comment99300>

    This looks like an interview question!  People are going to complain when 
they see an exabyte as 1000000 TB (I kid, I kid :) )


- Nate Cole


On Oct. 24, 2014, 2:10 p.m., Jonathan Hurley wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/27149/
> -----------------------------------------------------------
> 
> (Updated Oct. 24, 2014, 2:10 p.m.)
> 
> 
> Review request for Ambari, Nate Cole and Tom Beerbower.
> 
> 
> Bugs: AMBARI-7955
>     https://issues.apache.org/jira/browse/AMBARI-7955
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> Adds "host-only" alerts to the alert framework infrastructure. Alerts that 
> are only for a host are those that are run on every host in the cluster and 
> are not bound to any particular stack service. They exist "outside" of the 
> stack.
> 
> In order to accomplish this, several changes were made:
> 1) A new alerts.json was created at the root resources directory to represent 
> host-only alerts. This file is parsed separately from the stack but its 
> definitions are merged into the database in the same manner as those from the 
> stack
> 
> 2) These new alerts must be bound to the service AMBARI and component 
> AMBARI_AGENT
> 
> 3) Host alerts are usually custom scripts; a new directory was needed so that 
> resources could be copied from the Ambari Server to the Agent in the same 
> manner that the stack and custom_actions resources are copied. This is the 
> new "host_scripts" directory.
> 
> 4) RPM updates to ensure that "host_scripts" is properly packaged.
> 
> 
> Diffs
> -----
> 
>   ambari-agent/pom.xml a005783 
>   ambari-agent/src/main/python/ambari_agent/AlertSchedulerHandler.py a8de9f6 
>   ambari-agent/src/main/python/ambari_agent/Controller.py 1f9471d 
>   ambari-agent/src/main/python/ambari_agent/CustomServiceOrchestrator.py 
> 94aa87e 
>   ambari-agent/src/main/python/ambari_agent/FileCache.py 91ec76a 
>   ambari-agent/src/main/python/ambari_agent/alerts/script_alert.py a00b699 
>   ambari-agent/src/test/python/ambari_agent/TestAlerts.py ef0caae 
>   ambari-agent/src/test/python/ambari_agent/TestCustomServiceOrchestrator.py 
> 6a61c0d 
>   ambari-server/pom.xml c66358e 
>   
> ambari-server/src/main/java/org/apache/ambari/server/api/services/AmbariMetaInfo.java
>  03cf208 
>   
> ambari-server/src/main/java/org/apache/ambari/server/metadata/AgentAlertDefinitions.java
>  PRE-CREATION 
>   
> ambari-server/src/main/java/org/apache/ambari/server/state/alert/AlertDefinitionFactory.java
>  5c9bd0a 
>   ambari-server/src/main/python/ambari-server.py d066162 
>   ambari-server/src/main/python/ambari_server/resourceFilesKeeper.py 1e1bdb6 
>   ambari-server/src/main/resources/alerts.json PRE-CREATION 
>   ambari-server/src/main/resources/host_scripts/alert_disk_space.py 
> PRE-CREATION 
>   
> ambari-server/src/test/java/org/apache/ambari/server/metadata/AgentAlertDefinitionsTest.java
>  PRE-CREATION 
>   ambari-server/src/test/python/TestResourceFilesKeeper.py afa57fd 
> 
> Diff: https://reviews.apache.org/r/27149/diff/
> 
> 
> Testing
> -------
> 
> 1) Installed a developement environment on Linux
> 2) Apply my changes via a Git patch to the dev env and built RPMs from scratch
> 3) Applied RPMs to a clean VM and installed server and agent components
> 4) Verified that "host_scripts" is created with proper permissions and has 
> the right contents
> 5) Verified that the contents of "host_scripts" are updated in accoradance 
> with the hash update algorithm for stacks and custom_actions
> 6) New tests written, existing tests modified.
> 
> 
> Thanks,
> 
> Jonathan Hurley
> 
>

Reply via email to