You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ambari.apache.org by Jonathan Hurley <jh...@hortonworks.com> on 2014/12/24 20:20:52 UTC
Review Request 29404: Alert Summary Counts Should Honor Maintenance
States
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/29404/
-----------------------------------------------------------
Review request for Ambari, Nate Cole and Sid Wagle.
Bugs: AMBARI-8909
https://issues.apache.org/jira/browse/AMBARI-8909
Repository: ambari
Description
-------
When an alert is put into maintenance mode, the backend will continue to represent with its actual state (OK, WARN, CRIT, etc) but will also indicate it is in maintenance mode so that clients can decide how to handle this scenario.
However, this presents a problem when returning summary count information. If there are 10 alerts and 2 are CRITICAL, but 1 of them is in maintenance mode, the count information should represent 8 OK, 1 CRITICAL, 1 MAINTENANCE.
Along those same lines, if a host has an alert in CRITICAL but that alert is in maintenance mode, then the host should not be reported as having a CRITICAL alert in the host count information.
The summary structures should take into account maintenance mode markers so that web client badges don't show red when there are maintenance mode alerts that have been triggered.
{code}
{
"href" : "http://localhost:8080/api/v1/clusters/c1?fields=alerts_summary",
"Clusters" : {
"cluster_name" : "c1",
"version" : "HDP-2.2"
},
"alerts_summary" : {
"CRITICAL" : 0,
"MAINTENANCE" : 0,
"OK" : 48,
"UNKNOWN" : 0,
"WARNING" : 0
}
{code}
Diffs
-----
ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AlertSummaryPropertyProvider.java d0cbf79
ambari-server/src/main/java/org/apache/ambari/server/events/listeners/alerts/AlertAggregateListener.java 47fc4e3
ambari-server/src/main/java/org/apache/ambari/server/events/listeners/alerts/AlertMaintenanceModeListener.java cbd99a5
ambari-server/src/main/java/org/apache/ambari/server/orm/dao/AlertHostSummaryDTO.java 94a8267
ambari-server/src/main/java/org/apache/ambari/server/orm/dao/AlertSummaryDTO.java 80fa4e8
ambari-server/src/main/java/org/apache/ambari/server/orm/dao/AlertsDAO.java 016dfe5
ambari-server/src/main/java/org/apache/ambari/server/orm/entities/AlertCurrentEntity.java 08c7fb3
ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog200.java d59d8a1
ambari-server/src/main/resources/Ambari-DDL-MySQL-CREATE.sql d6229b3
ambari-server/src/main/resources/Ambari-DDL-Oracle-CREATE.sql cb8f776
ambari-server/src/main/resources/Ambari-DDL-Postgres-CREATE.sql 4599390
ambari-server/src/main/resources/Ambari-DDL-Postgres-EMBEDDED-CREATE.sql 1e6631e
ambari-server/src/main/resources/Ambari-DDL-SQLServer-CREATE.sql 8836f04
ambari-server/src/test/java/org/apache/ambari/server/orm/dao/AlertsDAOTest.java f831d14
Diff: https://reviews.apache.org/r/29404/diff/
Testing
-------
New tests written; manual testing of service & host maintenance mode states along with count verification.
Unit tests pending...
Thanks,
Jonathan Hurley
Re: Review Request 29404: Alert Summary Counts Should Honor
Maintenance States
Posted by Nate Cole <nc...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/29404/#review66261
-----------------------------------------------------------
Ship it!
Ship It!
- Nate Cole
On Dec. 24, 2014, 3:49 p.m., Jonathan Hurley wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/29404/
> -----------------------------------------------------------
>
> (Updated Dec. 24, 2014, 3:49 p.m.)
>
>
> Review request for Ambari, Nate Cole and Sid Wagle.
>
>
> Bugs: AMBARI-8909
> https://issues.apache.org/jira/browse/AMBARI-8909
>
>
> Repository: ambari
>
>
> Description
> -------
>
> When an alert is put into maintenance mode, the backend will continue to represent with its actual state (OK, WARN, CRIT, etc) but will also indicate it is in maintenance mode so that clients can decide how to handle this scenario.
>
> However, this presents a problem when returning summary count information. If there are 10 alerts and 2 are CRITICAL, but 1 of them is in maintenance mode, the count information should represent 8 OK, 1 CRITICAL, 1 MAINTENANCE.
>
> Along those same lines, if a host has an alert in CRITICAL but that alert is in maintenance mode, then the host should not be reported as having a CRITICAL alert in the host count information.
>
> The summary structures should take into account maintenance mode markers so that web client badges don't show red when there are maintenance mode alerts that have been triggered.
>
> {code}
> {
> "href" : "http://localhost:8080/api/v1/clusters/c1?fields=alerts_summary",
> "Clusters" : {
> "cluster_name" : "c1",
> "version" : "HDP-2.2"
> },
> "alerts_summary" : {
> "CRITICAL" : 0,
> "MAINTENANCE" : 0,
> "OK" : 48,
> "UNKNOWN" : 0,
> "WARNING" : 0
> }
> {code}
>
>
> Diffs
> -----
>
> ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AlertSummaryPropertyProvider.java d0cbf79
> ambari-server/src/main/java/org/apache/ambari/server/events/listeners/alerts/AlertAggregateListener.java 47fc4e3
> ambari-server/src/main/java/org/apache/ambari/server/events/listeners/alerts/AlertMaintenanceModeListener.java cbd99a5
> ambari-server/src/main/java/org/apache/ambari/server/orm/dao/AlertHostSummaryDTO.java 94a8267
> ambari-server/src/main/java/org/apache/ambari/server/orm/dao/AlertSummaryDTO.java 80fa4e8
> ambari-server/src/main/java/org/apache/ambari/server/orm/dao/AlertsDAO.java 016dfe5
> ambari-server/src/main/java/org/apache/ambari/server/orm/entities/AlertCurrentEntity.java 08c7fb3
> ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog200.java d59d8a1
> ambari-server/src/main/resources/Ambari-DDL-MySQL-CREATE.sql d6229b3
> ambari-server/src/main/resources/Ambari-DDL-Oracle-CREATE.sql cb8f776
> ambari-server/src/main/resources/Ambari-DDL-Postgres-CREATE.sql 4599390
> ambari-server/src/main/resources/Ambari-DDL-Postgres-EMBEDDED-CREATE.sql 1e6631e
> ambari-server/src/main/resources/Ambari-DDL-SQLServer-CREATE.sql 8836f04
> ambari-server/src/test/java/org/apache/ambari/server/orm/dao/AlertsDAOTest.java f831d14
>
> Diff: https://reviews.apache.org/r/29404/diff/
>
>
> Testing
> -------
>
> New tests written; manual testing of service & host maintenance mode states along with count verification.
>
> Tests run: 2466, Failures: 0, Errors: 0, Skipped: 13
>
>
> Thanks,
>
> Jonathan Hurley
>
>
Re: Review Request 29404: Alert Summary Counts Should Honor
Maintenance States
Posted by Jonathan Hurley <jh...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/29404/
-----------------------------------------------------------
(Updated Dec. 24, 2014, 3:49 p.m.)
Review request for Ambari, Nate Cole and Sid Wagle.
Changes
-------
Unit tests completed; python tests have problems on my OSX instance, but they are unrelated to this change.
Bugs: AMBARI-8909
https://issues.apache.org/jira/browse/AMBARI-8909
Repository: ambari
Description
-------
When an alert is put into maintenance mode, the backend will continue to represent with its actual state (OK, WARN, CRIT, etc) but will also indicate it is in maintenance mode so that clients can decide how to handle this scenario.
However, this presents a problem when returning summary count information. If there are 10 alerts and 2 are CRITICAL, but 1 of them is in maintenance mode, the count information should represent 8 OK, 1 CRITICAL, 1 MAINTENANCE.
Along those same lines, if a host has an alert in CRITICAL but that alert is in maintenance mode, then the host should not be reported as having a CRITICAL alert in the host count information.
The summary structures should take into account maintenance mode markers so that web client badges don't show red when there are maintenance mode alerts that have been triggered.
{code}
{
"href" : "http://localhost:8080/api/v1/clusters/c1?fields=alerts_summary",
"Clusters" : {
"cluster_name" : "c1",
"version" : "HDP-2.2"
},
"alerts_summary" : {
"CRITICAL" : 0,
"MAINTENANCE" : 0,
"OK" : 48,
"UNKNOWN" : 0,
"WARNING" : 0
}
{code}
Diffs
-----
ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AlertSummaryPropertyProvider.java d0cbf79
ambari-server/src/main/java/org/apache/ambari/server/events/listeners/alerts/AlertAggregateListener.java 47fc4e3
ambari-server/src/main/java/org/apache/ambari/server/events/listeners/alerts/AlertMaintenanceModeListener.java cbd99a5
ambari-server/src/main/java/org/apache/ambari/server/orm/dao/AlertHostSummaryDTO.java 94a8267
ambari-server/src/main/java/org/apache/ambari/server/orm/dao/AlertSummaryDTO.java 80fa4e8
ambari-server/src/main/java/org/apache/ambari/server/orm/dao/AlertsDAO.java 016dfe5
ambari-server/src/main/java/org/apache/ambari/server/orm/entities/AlertCurrentEntity.java 08c7fb3
ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog200.java d59d8a1
ambari-server/src/main/resources/Ambari-DDL-MySQL-CREATE.sql d6229b3
ambari-server/src/main/resources/Ambari-DDL-Oracle-CREATE.sql cb8f776
ambari-server/src/main/resources/Ambari-DDL-Postgres-CREATE.sql 4599390
ambari-server/src/main/resources/Ambari-DDL-Postgres-EMBEDDED-CREATE.sql 1e6631e
ambari-server/src/main/resources/Ambari-DDL-SQLServer-CREATE.sql 8836f04
ambari-server/src/test/java/org/apache/ambari/server/orm/dao/AlertsDAOTest.java f831d14
Diff: https://reviews.apache.org/r/29404/diff/
Testing (updated)
-------
New tests written; manual testing of service & host maintenance mode states along with count verification.
Tests run: 2466, Failures: 0, Errors: 0, Skipped: 13
Thanks,
Jonathan Hurley