You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@ambari.apache.org by Alejandro Fernandez <af...@hortonworks.com> on 2017/03/24 19:27:44 UTC

Review Request 57918: Ambari Agent Alert to detect when "hdp-select versions" reports an error

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

Review request for Ambari, Jonathan Hurley, Nate Cole, Sumit Mohanty, and Sid Wagle.


Bugs: AMBARI-20565
    https://issues.apache.org/jira/browse/AMBARI-20565


Repository: ambari


Description
-------

Ambari Agent Alert to detect when "hdp-select versions" reports an error.
If /usr/hdp (or the stack root) contains an erroneous directory, then hdp-select versions will fail.
If a host does not have HDP (or another stack), then it should be OK.


Diffs
-----

  ambari-common/src/main/python/resource_management/libraries/functions/stack_select.py 20b4cbd 
  ambari-server/src/main/java/org/apache/ambari/server/checks/AtlasPresenceCheck.java 8556436 
  ambari-server/src/main/resources/alerts.json 2559b3a 
  ambari-server/src/main/resources/host_scripts/alert_version_select.py PRE-CREATION 
  ambari-server/src/test/java/org/apache/ambari/server/metadata/AgentAlertDefinitionsTest.java cbc5e69 


Diff: https://reviews.apache.org/r/57918/diff/1/


Testing
-------

mvn clean test
Verified on live cluster


Thanks,

Alejandro Fernandez


Re: Review Request 57918: Ambari Agent Alert to detect when "hdp-select versions" reports an error

Posted by Jonathan Hurley <jh...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/57918/#review170050
-----------------------------------------------------------


Fix it, then Ship it!





ambari-server/src/main/resources/alerts.json
Lines 184 (patched)
<https://reviews.apache.org/r/57918/#comment242811>

    Call me crazy - did't I see this file in another review? Anywho - can we make this name consistent with the other alert for agents?



ambari-server/src/main/resources/host_scripts/alert_version_select.py
Lines 93 (patched)
<https://reviews.apache.org/r/57918/#comment242810>

    Alerts are bound to hosts anyway - not really necessary to put the host_name in the message. Ommitting it would be fine and would reduce the logic by a few lines ...


- Jonathan Hurley


On March 24, 2017, 3:27 p.m., Alejandro Fernandez wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/57918/
> -----------------------------------------------------------
> 
> (Updated March 24, 2017, 3:27 p.m.)
> 
> 
> Review request for Ambari, Jonathan Hurley, Nate Cole, Sumit Mohanty, and Sid Wagle.
> 
> 
> Bugs: AMBARI-20565
>     https://issues.apache.org/jira/browse/AMBARI-20565
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> Ambari Agent Alert to detect when "hdp-select versions" reports an error.
> If /usr/hdp (or the stack root) contains an erroneous directory, then hdp-select versions will fail.
> If a host does not have HDP (or another stack), then it should be OK.
> 
> 
> Diffs
> -----
> 
>   ambari-common/src/main/python/resource_management/libraries/functions/stack_select.py 20b4cbd 
>   ambari-server/src/main/java/org/apache/ambari/server/checks/AtlasPresenceCheck.java 8556436 
>   ambari-server/src/main/resources/alerts.json 2559b3a 
>   ambari-server/src/main/resources/host_scripts/alert_version_select.py PRE-CREATION 
>   ambari-server/src/test/java/org/apache/ambari/server/metadata/AgentAlertDefinitionsTest.java cbc5e69 
> 
> 
> Diff: https://reviews.apache.org/r/57918/diff/1/
> 
> 
> Testing
> -------
> 
> mvn clean test
> Verified on live cluster
> 
> 
> Thanks,
> 
> Alejandro Fernandez
> 
>


Re: Review Request 57918: Ambari Agent Alert to detect when "hdp-select versions" reports an error

Posted by Sid Wagle <sw...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/57918/#review170049
-----------------------------------------------------------


Fix it, then Ship it!





ambari-server/src/main/resources/host_scripts/alert_version_select.py
Lines 24 (patched)
<https://reviews.apache.org/r/57918/#comment242807>

    might consider suing simplejson the more performant one.



ambari-server/src/main/resources/host_scripts/alert_version_select.py
Lines 80 (patched)
<https://reviews.apache.org/r/57918/#comment242809>

    Proceed without stack-selector?


- Sid Wagle


On March 24, 2017, 7:27 p.m., Alejandro Fernandez wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/57918/
> -----------------------------------------------------------
> 
> (Updated March 24, 2017, 7:27 p.m.)
> 
> 
> Review request for Ambari, Jonathan Hurley, Nate Cole, Sumit Mohanty, and Sid Wagle.
> 
> 
> Bugs: AMBARI-20565
>     https://issues.apache.org/jira/browse/AMBARI-20565
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> Ambari Agent Alert to detect when "hdp-select versions" reports an error.
> If /usr/hdp (or the stack root) contains an erroneous directory, then hdp-select versions will fail.
> If a host does not have HDP (or another stack), then it should be OK.
> 
> 
> Diffs
> -----
> 
>   ambari-common/src/main/python/resource_management/libraries/functions/stack_select.py 20b4cbd 
>   ambari-server/src/main/java/org/apache/ambari/server/checks/AtlasPresenceCheck.java 8556436 
>   ambari-server/src/main/resources/alerts.json 2559b3a 
>   ambari-server/src/main/resources/host_scripts/alert_version_select.py PRE-CREATION 
>   ambari-server/src/test/java/org/apache/ambari/server/metadata/AgentAlertDefinitionsTest.java cbc5e69 
> 
> 
> Diff: https://reviews.apache.org/r/57918/diff/1/
> 
> 
> Testing
> -------
> 
> mvn clean test
> Verified on live cluster
> 
> 
> Thanks,
> 
> Alejandro Fernandez
> 
>


Re: Review Request 57918: Ambari Agent Alert to detect when "hdp-select versions" reports an error

Posted by Alejandro Fernandez <af...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/57918/#review170054
-----------------------------------------------------------




ambari-server/src/main/resources/host_scripts/alert_version_select.py
Lines 24 (patched)
<https://reviews.apache.org/r/57918/#comment242817>

    json is fine for this purpose since the alert runs every 5 mins and takes only a couple of milliseconds to run



ambari-server/src/main/resources/host_scripts/alert_version_select.py
Lines 80 (patched)
<https://reviews.apache.org/r/57918/#comment242818>

    Yes, not all stacks may have a stack selector defined.



ambari-server/src/main/resources/host_scripts/alert_version_select.py
Lines 93 (patched)
<https://reviews.apache.org/r/57918/#comment242819>

    Sure, will remove.


- Alejandro Fernandez


On March 24, 2017, 8:32 p.m., Alejandro Fernandez wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/57918/
> -----------------------------------------------------------
> 
> (Updated March 24, 2017, 8:32 p.m.)
> 
> 
> Review request for Ambari, Jonathan Hurley, Nate Cole, Sumit Mohanty, and Sid Wagle.
> 
> 
> Bugs: AMBARI-20565
>     https://issues.apache.org/jira/browse/AMBARI-20565
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> Ambari Agent Alert to detect when "hdp-select versions" reports an error.
> If /usr/hdp (or the stack root) contains an erroneous directory, then hdp-select versions will fail.
> If a host does not have HDP (or another stack), then it should be OK.
> 
> 
> Diffs
> -----
> 
>   ambari-common/src/main/python/resource_management/libraries/functions/stack_select.py 20b4cbd 
>   ambari-server/src/main/java/org/apache/ambari/server/checks/AtlasPresenceCheck.java 8556436 
>   ambari-server/src/main/resources/alerts.json 2559b3a 
>   ambari-server/src/main/resources/host_scripts/alert_version_select.py PRE-CREATION 
>   ambari-server/src/test/java/org/apache/ambari/server/api/services/AmbariMetaInfoTest.java f1af66f 
>   ambari-server/src/test/java/org/apache/ambari/server/metadata/AgentAlertDefinitionsTest.java cbc5e69 
> 
> 
> Diff: https://reviews.apache.org/r/57918/diff/2/
> 
> 
> Testing
> -------
> 
> mvn clean test
> Verified on live cluster
> 
> 
> Thanks,
> 
> Alejandro Fernandez
> 
>


Re: Review Request 57918: Ambari Agent Alert to detect when "hdp-select versions" reports an error

Posted by Jonathan Hurley <jh...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/57918/#review170104
-----------------------------------------------------------


Ship it!




Ship It!

- Jonathan Hurley


On March 24, 2017, 4:48 p.m., Alejandro Fernandez wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/57918/
> -----------------------------------------------------------
> 
> (Updated March 24, 2017, 4:48 p.m.)
> 
> 
> Review request for Ambari, Jonathan Hurley, Nate Cole, Sumit Mohanty, and Sid Wagle.
> 
> 
> Bugs: AMBARI-20565
>     https://issues.apache.org/jira/browse/AMBARI-20565
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> Ambari Agent Alert to detect when "hdp-select versions" reports an error.
> If /usr/hdp (or the stack root) contains an erroneous directory, then hdp-select versions will fail.
> If a host does not have HDP (or another stack), then it should be OK.
> 
> 
> Diffs
> -----
> 
>   ambari-common/src/main/python/resource_management/libraries/functions/stack_select.py 20b4cbd 
>   ambari-server/src/main/java/org/apache/ambari/server/checks/AtlasPresenceCheck.java 8556436 
>   ambari-server/src/main/resources/alerts.json 2559b3a 
>   ambari-server/src/main/resources/host_scripts/alert_version_select.py PRE-CREATION 
>   ambari-server/src/test/java/org/apache/ambari/server/api/services/AmbariMetaInfoTest.java f1af66f 
>   ambari-server/src/test/java/org/apache/ambari/server/metadata/AgentAlertDefinitionsTest.java cbc5e69 
> 
> 
> Diff: https://reviews.apache.org/r/57918/diff/4/
> 
> 
> Testing
> -------
> 
> mvn clean test
> Verified on live cluster
> 
> 
> Thanks,
> 
> Alejandro Fernandez
> 
>


Re: Review Request 57918: Ambari Agent Alert to detect when "hdp-select versions" reports an error

Posted by Nate Cole <nc...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/57918/#review170116
-----------------------------------------------------------


Ship it!




Ship It!

- Nate Cole


On March 24, 2017, 4:48 p.m., Alejandro Fernandez wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/57918/
> -----------------------------------------------------------
> 
> (Updated March 24, 2017, 4:48 p.m.)
> 
> 
> Review request for Ambari, Jonathan Hurley, Nate Cole, Sumit Mohanty, and Sid Wagle.
> 
> 
> Bugs: AMBARI-20565
>     https://issues.apache.org/jira/browse/AMBARI-20565
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> Ambari Agent Alert to detect when "hdp-select versions" reports an error.
> If /usr/hdp (or the stack root) contains an erroneous directory, then hdp-select versions will fail.
> If a host does not have HDP (or another stack), then it should be OK.
> 
> 
> Diffs
> -----
> 
>   ambari-common/src/main/python/resource_management/libraries/functions/stack_select.py 20b4cbd 
>   ambari-server/src/main/java/org/apache/ambari/server/checks/AtlasPresenceCheck.java 8556436 
>   ambari-server/src/main/resources/alerts.json 2559b3a 
>   ambari-server/src/main/resources/host_scripts/alert_version_select.py PRE-CREATION 
>   ambari-server/src/test/java/org/apache/ambari/server/api/services/AmbariMetaInfoTest.java f1af66f 
>   ambari-server/src/test/java/org/apache/ambari/server/metadata/AgentAlertDefinitionsTest.java cbc5e69 
> 
> 
> Diff: https://reviews.apache.org/r/57918/diff/4/
> 
> 
> Testing
> -------
> 
> mvn clean test
> Verified on live cluster
> 
> 
> Thanks,
> 
> Alejandro Fernandez
> 
>


Re: Review Request 57918: Ambari Agent Alert to detect when "hdp-select versions" reports an error

Posted by Alejandro Fernandez <af...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/57918/
-----------------------------------------------------------

(Updated March 24, 2017, 8:48 p.m.)


Review request for Ambari, Jonathan Hurley, Nate Cole, Sumit Mohanty, and Sid Wagle.


Bugs: AMBARI-20565
    https://issues.apache.org/jira/browse/AMBARI-20565


Repository: ambari


Description
-------

Ambari Agent Alert to detect when "hdp-select versions" reports an error.
If /usr/hdp (or the stack root) contains an erroneous directory, then hdp-select versions will fail.
If a host does not have HDP (or another stack), then it should be OK.


Diffs (updated)
-----

  ambari-common/src/main/python/resource_management/libraries/functions/stack_select.py 20b4cbd 
  ambari-server/src/main/java/org/apache/ambari/server/checks/AtlasPresenceCheck.java 8556436 
  ambari-server/src/main/resources/alerts.json 2559b3a 
  ambari-server/src/main/resources/host_scripts/alert_version_select.py PRE-CREATION 
  ambari-server/src/test/java/org/apache/ambari/server/api/services/AmbariMetaInfoTest.java f1af66f 
  ambari-server/src/test/java/org/apache/ambari/server/metadata/AgentAlertDefinitionsTest.java cbc5e69 


Diff: https://reviews.apache.org/r/57918/diff/4/

Changes: https://reviews.apache.org/r/57918/diff/3-4/


Testing
-------

mvn clean test
Verified on live cluster


Thanks,

Alejandro Fernandez


Re: Review Request 57918: Ambari Agent Alert to detect when "hdp-select versions" reports an error

Posted by Alejandro Fernandez <af...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/57918/
-----------------------------------------------------------

(Updated March 24, 2017, 8:44 p.m.)


Review request for Ambari, Jonathan Hurley, Nate Cole, Sumit Mohanty, and Sid Wagle.


Bugs: AMBARI-20565
    https://issues.apache.org/jira/browse/AMBARI-20565


Repository: ambari


Description
-------

Ambari Agent Alert to detect when "hdp-select versions" reports an error.
If /usr/hdp (or the stack root) contains an erroneous directory, then hdp-select versions will fail.
If a host does not have HDP (or another stack), then it should be OK.


Diffs (updated)
-----

  ambari-common/src/main/python/resource_management/libraries/functions/stack_select.py 20b4cbd 
  ambari-server/src/main/java/org/apache/ambari/server/checks/AtlasPresenceCheck.java 8556436 
  ambari-server/src/main/resources/alerts.json 2559b3a 
  ambari-server/src/main/resources/host_scripts/alert_version_select.py PRE-CREATION 
  ambari-server/src/test/java/org/apache/ambari/server/api/services/AmbariMetaInfoTest.java f1af66f 
  ambari-server/src/test/java/org/apache/ambari/server/metadata/AgentAlertDefinitionsTest.java cbc5e69 


Diff: https://reviews.apache.org/r/57918/diff/3/

Changes: https://reviews.apache.org/r/57918/diff/2-3/


Testing
-------

mvn clean test
Verified on live cluster


Thanks,

Alejandro Fernandez


Re: Review Request 57918: Ambari Agent Alert to detect when "hdp-select versions" reports an error

Posted by Alejandro Fernandez <af...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/57918/
-----------------------------------------------------------

(Updated March 24, 2017, 8:32 p.m.)


Review request for Ambari, Jonathan Hurley, Nate Cole, Sumit Mohanty, and Sid Wagle.


Bugs: AMBARI-20565
    https://issues.apache.org/jira/browse/AMBARI-20565


Repository: ambari


Description
-------

Ambari Agent Alert to detect when "hdp-select versions" reports an error.
If /usr/hdp (or the stack root) contains an erroneous directory, then hdp-select versions will fail.
If a host does not have HDP (or another stack), then it should be OK.


Diffs (updated)
-----

  ambari-common/src/main/python/resource_management/libraries/functions/stack_select.py 20b4cbd 
  ambari-server/src/main/java/org/apache/ambari/server/checks/AtlasPresenceCheck.java 8556436 
  ambari-server/src/main/resources/alerts.json 2559b3a 
  ambari-server/src/main/resources/host_scripts/alert_version_select.py PRE-CREATION 
  ambari-server/src/test/java/org/apache/ambari/server/api/services/AmbariMetaInfoTest.java f1af66f 
  ambari-server/src/test/java/org/apache/ambari/server/metadata/AgentAlertDefinitionsTest.java cbc5e69 


Diff: https://reviews.apache.org/r/57918/diff/2/

Changes: https://reviews.apache.org/r/57918/diff/1-2/


Testing
-------

mvn clean test
Verified on live cluster


Thanks,

Alejandro Fernandez