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 2015/02/27 03:34:13 UTC

Review Request 31524: Alert Notifications Are Not Received Without Restarting Ambari Server

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

Review request for Ambari, Nate Cole and Tom Beerbower.


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


Repository: ambari


Description
-------

There seems to be an issue with EclipseLink and nested entities where the relationships are not refreshed from the database correctly. This causes a problem sending out alert notices for alert groups because the target lookup doesn't return the correct entities.

Restarting Ambari Server fixes the issue.


Diffs
-----

  ambari-project/pom.xml 92e3b5c 
  ambari-server/src/main/java/org/apache/ambari/server/orm/dao/AlertDefinitionDAO.java 2daf804 
  ambari-server/src/main/java/org/apache/ambari/server/orm/entities/AlertNoticeEntity.java d0d4c9a 
  ambari-server/src/main/java/org/apache/ambari/server/orm/entities/AlertTargetEntity.java e1248db 
  ambari-server/src/test/java/org/apache/ambari/server/orm/dao/AlertDefinitionDAOTest.java a1cd063 
  ambari-server/src/test/java/org/apache/ambari/server/orm/dao/AlertDispatchDAOTest.java 44c40f2 
  ambari-server/src/test/java/org/apache/ambari/server/orm/dao/AlertsDAOTest.java fb3303c 

Diff: https://reviews.apache.org/r/31524/diff/


Testing
-------

Clean install of a 3-node cluster; verified that history and notices come back correctly. Added and removed alert targets with associated notices and verified the dispatcher picked up the targets correctly.

mvn clean test


Thanks,

Jonathan Hurley


Re: Review Request 31524: Alert Notifications Are Not Received Without Restarting Ambari Server

Posted by Jonathan Hurley <jh...@hortonworks.com>.

> On Feb. 27, 2015, 8:31 a.m., Nate Cole wrote:
> > Can we now get rid of (as part of EclipseLink) these:
> > 
> >     // !!! https://bugs.eclipse.org/bugs/show_bug.cgi?id=398067
> >     // ensure that an associated entity with a JOIN is not stale; this causes
> >     // the associated StageEntity to be stale
> >     typedQuery.setHint(QueryHints.REFRESH, HintValues.TRUE);

I removed them from alerts, but the nested entities were still stale sometimes and as a result, I was getting duplicate events fired over and over sinced alerts thought the state kept changing. This close to release, I say leave them in and let's fire a Jira to follow up in 2.1.


- Jonathan


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


On Feb. 26, 2015, 10:12 p.m., Jonathan Hurley wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/31524/
> -----------------------------------------------------------
> 
> (Updated Feb. 26, 2015, 10:12 p.m.)
> 
> 
> Review request for Ambari, Nate Cole and Tom Beerbower.
> 
> 
> Bugs: AMBARI-9823
>     https://issues.apache.org/jira/browse/AMBARI-9823
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> There seems to be an issue with EclipseLink and nested entities where the relationships are not refreshed from the database correctly. This causes a problem sending out alert notices for alert groups because the target lookup doesn't return the correct entities.
> 
> Restarting Ambari Server fixes the issue.
> 
> 
> Diffs
> -----
> 
>   ambari-project/pom.xml 92e3b5c 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/dao/AlertDefinitionDAO.java 2daf804 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/entities/AlertNoticeEntity.java d0d4c9a 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/entities/AlertTargetEntity.java e1248db 
>   ambari-server/src/test/java/org/apache/ambari/server/orm/dao/AlertDefinitionDAOTest.java a1cd063 
>   ambari-server/src/test/java/org/apache/ambari/server/orm/dao/AlertDispatchDAOTest.java 44c40f2 
>   ambari-server/src/test/java/org/apache/ambari/server/orm/dao/AlertsDAOTest.java fb3303c 
> 
> Diff: https://reviews.apache.org/r/31524/diff/
> 
> 
> Testing
> -------
> 
> Clean install of a 3-node cluster; verified that history and notices come back correctly. Added and removed alert targets with associated notices and verified the dispatcher picked up the targets correctly.
> 
> mvn clean test
> 
> [INFO] ------------------------------------------------------------------------
> [INFO] BUILD SUCCESS
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: 14:53 min
> [INFO] Finished at: 2015-02-26T21:47:26-05:00
> [INFO] Final Memory: 34M/378M
> [INFO] ------------------------------------------------------------------------
> 
> 
> Thanks,
> 
> Jonathan Hurley
> 
>


Re: Review Request 31524: Alert Notifications Are Not Received Without Restarting Ambari Server

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


Can we now get rid of (as part of EclipseLink) these:

    // !!! https://bugs.eclipse.org/bugs/show_bug.cgi?id=398067
    // ensure that an associated entity with a JOIN is not stale; this causes
    // the associated StageEntity to be stale
    typedQuery.setHint(QueryHints.REFRESH, HintValues.TRUE);

- Nate Cole


On Feb. 26, 2015, 10:12 p.m., Jonathan Hurley wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/31524/
> -----------------------------------------------------------
> 
> (Updated Feb. 26, 2015, 10:12 p.m.)
> 
> 
> Review request for Ambari, Nate Cole and Tom Beerbower.
> 
> 
> Bugs: AMBARI-9823
>     https://issues.apache.org/jira/browse/AMBARI-9823
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> There seems to be an issue with EclipseLink and nested entities where the relationships are not refreshed from the database correctly. This causes a problem sending out alert notices for alert groups because the target lookup doesn't return the correct entities.
> 
> Restarting Ambari Server fixes the issue.
> 
> 
> Diffs
> -----
> 
>   ambari-project/pom.xml 92e3b5c 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/dao/AlertDefinitionDAO.java 2daf804 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/entities/AlertNoticeEntity.java d0d4c9a 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/entities/AlertTargetEntity.java e1248db 
>   ambari-server/src/test/java/org/apache/ambari/server/orm/dao/AlertDefinitionDAOTest.java a1cd063 
>   ambari-server/src/test/java/org/apache/ambari/server/orm/dao/AlertDispatchDAOTest.java 44c40f2 
>   ambari-server/src/test/java/org/apache/ambari/server/orm/dao/AlertsDAOTest.java fb3303c 
> 
> Diff: https://reviews.apache.org/r/31524/diff/
> 
> 
> Testing
> -------
> 
> Clean install of a 3-node cluster; verified that history and notices come back correctly. Added and removed alert targets with associated notices and verified the dispatcher picked up the targets correctly.
> 
> mvn clean test
> 
> [INFO] ------------------------------------------------------------------------
> [INFO] BUILD SUCCESS
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: 14:53 min
> [INFO] Finished at: 2015-02-26T21:47:26-05:00
> [INFO] Final Memory: 34M/378M
> [INFO] ------------------------------------------------------------------------
> 
> 
> Thanks,
> 
> Jonathan Hurley
> 
>


Re: Review Request 31524: Alert Notifications Are Not Received Without Restarting Ambari Server

Posted by Jonathan Hurley <jh...@hortonworks.com>.

> On Feb. 27, 2015, 6:38 a.m., Tom Beerbower wrote:
> > ambari-server/src/main/java/org/apache/ambari/server/orm/dao/AlertDefinitionDAO.java, line 324
> > <https://reviews.apache.org/r/31524/diff/1/?file=879460#file879460line324>
> >
> >     Was this required in addition to upgrading eclipselink to 2.5.2?

Thanks for the review!

Yes, it was. It's because Alert Definitions are based on ID and not cluster name. As a result, the embedded ClusterEntity is not properly refreshed. This was actually the cause of the issue that I thought was the same one you were looking at; it's not.

The upgrade to Eclipse 2.5.2 was actually required for the alert notification issue that this bug fixes. The @CollectionTable annotation doesn't correctly propagate the foreign key deletion on Postgres in the version that we were using. Upgrading to this version fixed that issue.


- Jonathan


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


On Feb. 26, 2015, 10:12 p.m., Jonathan Hurley wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/31524/
> -----------------------------------------------------------
> 
> (Updated Feb. 26, 2015, 10:12 p.m.)
> 
> 
> Review request for Ambari, Nate Cole and Tom Beerbower.
> 
> 
> Bugs: AMBARI-9823
>     https://issues.apache.org/jira/browse/AMBARI-9823
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> There seems to be an issue with EclipseLink and nested entities where the relationships are not refreshed from the database correctly. This causes a problem sending out alert notices for alert groups because the target lookup doesn't return the correct entities.
> 
> Restarting Ambari Server fixes the issue.
> 
> 
> Diffs
> -----
> 
>   ambari-project/pom.xml 92e3b5c 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/dao/AlertDefinitionDAO.java 2daf804 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/entities/AlertNoticeEntity.java d0d4c9a 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/entities/AlertTargetEntity.java e1248db 
>   ambari-server/src/test/java/org/apache/ambari/server/orm/dao/AlertDefinitionDAOTest.java a1cd063 
>   ambari-server/src/test/java/org/apache/ambari/server/orm/dao/AlertDispatchDAOTest.java 44c40f2 
>   ambari-server/src/test/java/org/apache/ambari/server/orm/dao/AlertsDAOTest.java fb3303c 
> 
> Diff: https://reviews.apache.org/r/31524/diff/
> 
> 
> Testing
> -------
> 
> Clean install of a 3-node cluster; verified that history and notices come back correctly. Added and removed alert targets with associated notices and verified the dispatcher picked up the targets correctly.
> 
> mvn clean test
> 
> [INFO] ------------------------------------------------------------------------
> [INFO] BUILD SUCCESS
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: 14:53 min
> [INFO] Finished at: 2015-02-26T21:47:26-05:00
> [INFO] Final Memory: 34M/378M
> [INFO] ------------------------------------------------------------------------
> 
> 
> Thanks,
> 
> Jonathan Hurley
> 
>


Re: Review Request 31524: Alert Notifications Are Not Received Without Restarting Ambari Server

Posted by Tom Beerbower <tb...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/31524/#review74471
-----------------------------------------------------------



ambari-server/src/main/java/org/apache/ambari/server/orm/dao/AlertDefinitionDAO.java
<https://reviews.apache.org/r/31524/#comment121054>

    Was this required in addition to upgrading eclipselink to 2.5.2?


- Tom Beerbower


On Feb. 27, 2015, 3:12 a.m., Jonathan Hurley wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/31524/
> -----------------------------------------------------------
> 
> (Updated Feb. 27, 2015, 3:12 a.m.)
> 
> 
> Review request for Ambari, Nate Cole and Tom Beerbower.
> 
> 
> Bugs: AMBARI-9823
>     https://issues.apache.org/jira/browse/AMBARI-9823
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> There seems to be an issue with EclipseLink and nested entities where the relationships are not refreshed from the database correctly. This causes a problem sending out alert notices for alert groups because the target lookup doesn't return the correct entities.
> 
> Restarting Ambari Server fixes the issue.
> 
> 
> Diffs
> -----
> 
>   ambari-project/pom.xml 92e3b5c 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/dao/AlertDefinitionDAO.java 2daf804 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/entities/AlertNoticeEntity.java d0d4c9a 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/entities/AlertTargetEntity.java e1248db 
>   ambari-server/src/test/java/org/apache/ambari/server/orm/dao/AlertDefinitionDAOTest.java a1cd063 
>   ambari-server/src/test/java/org/apache/ambari/server/orm/dao/AlertDispatchDAOTest.java 44c40f2 
>   ambari-server/src/test/java/org/apache/ambari/server/orm/dao/AlertsDAOTest.java fb3303c 
> 
> Diff: https://reviews.apache.org/r/31524/diff/
> 
> 
> Testing
> -------
> 
> Clean install of a 3-node cluster; verified that history and notices come back correctly. Added and removed alert targets with associated notices and verified the dispatcher picked up the targets correctly.
> 
> mvn clean test
> 
> [INFO] ------------------------------------------------------------------------
> [INFO] BUILD SUCCESS
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: 14:53 min
> [INFO] Finished at: 2015-02-26T21:47:26-05:00
> [INFO] Final Memory: 34M/378M
> [INFO] ------------------------------------------------------------------------
> 
> 
> Thanks,
> 
> Jonathan Hurley
> 
>


Re: Review Request 31524: Alert Notifications Are Not Received Without Restarting Ambari Server

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

Ship it!


Ship It!

- Nate Cole


On Feb. 26, 2015, 10:12 p.m., Jonathan Hurley wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/31524/
> -----------------------------------------------------------
> 
> (Updated Feb. 26, 2015, 10:12 p.m.)
> 
> 
> Review request for Ambari, Nate Cole and Tom Beerbower.
> 
> 
> Bugs: AMBARI-9823
>     https://issues.apache.org/jira/browse/AMBARI-9823
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> There seems to be an issue with EclipseLink and nested entities where the relationships are not refreshed from the database correctly. This causes a problem sending out alert notices for alert groups because the target lookup doesn't return the correct entities.
> 
> Restarting Ambari Server fixes the issue.
> 
> 
> Diffs
> -----
> 
>   ambari-project/pom.xml 92e3b5c 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/dao/AlertDefinitionDAO.java 2daf804 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/entities/AlertNoticeEntity.java d0d4c9a 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/entities/AlertTargetEntity.java e1248db 
>   ambari-server/src/test/java/org/apache/ambari/server/orm/dao/AlertDefinitionDAOTest.java a1cd063 
>   ambari-server/src/test/java/org/apache/ambari/server/orm/dao/AlertDispatchDAOTest.java 44c40f2 
>   ambari-server/src/test/java/org/apache/ambari/server/orm/dao/AlertsDAOTest.java fb3303c 
> 
> Diff: https://reviews.apache.org/r/31524/diff/
> 
> 
> Testing
> -------
> 
> Clean install of a 3-node cluster; verified that history and notices come back correctly. Added and removed alert targets with associated notices and verified the dispatcher picked up the targets correctly.
> 
> mvn clean test
> 
> [INFO] ------------------------------------------------------------------------
> [INFO] BUILD SUCCESS
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: 14:53 min
> [INFO] Finished at: 2015-02-26T21:47:26-05:00
> [INFO] Final Memory: 34M/378M
> [INFO] ------------------------------------------------------------------------
> 
> 
> Thanks,
> 
> Jonathan Hurley
> 
>


Re: Review Request 31524: Alert Notifications Are Not Received Without Restarting Ambari Server

Posted by Tom Beerbower <tb...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/31524/#review74488
-----------------------------------------------------------

Ship it!


Ship It!

- Tom Beerbower


On Feb. 27, 2015, 3:12 a.m., Jonathan Hurley wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/31524/
> -----------------------------------------------------------
> 
> (Updated Feb. 27, 2015, 3:12 a.m.)
> 
> 
> Review request for Ambari, Nate Cole and Tom Beerbower.
> 
> 
> Bugs: AMBARI-9823
>     https://issues.apache.org/jira/browse/AMBARI-9823
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> There seems to be an issue with EclipseLink and nested entities where the relationships are not refreshed from the database correctly. This causes a problem sending out alert notices for alert groups because the target lookup doesn't return the correct entities.
> 
> Restarting Ambari Server fixes the issue.
> 
> 
> Diffs
> -----
> 
>   ambari-project/pom.xml 92e3b5c 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/dao/AlertDefinitionDAO.java 2daf804 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/entities/AlertNoticeEntity.java d0d4c9a 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/entities/AlertTargetEntity.java e1248db 
>   ambari-server/src/test/java/org/apache/ambari/server/orm/dao/AlertDefinitionDAOTest.java a1cd063 
>   ambari-server/src/test/java/org/apache/ambari/server/orm/dao/AlertDispatchDAOTest.java 44c40f2 
>   ambari-server/src/test/java/org/apache/ambari/server/orm/dao/AlertsDAOTest.java fb3303c 
> 
> Diff: https://reviews.apache.org/r/31524/diff/
> 
> 
> Testing
> -------
> 
> Clean install of a 3-node cluster; verified that history and notices come back correctly. Added and removed alert targets with associated notices and verified the dispatcher picked up the targets correctly.
> 
> mvn clean test
> 
> [INFO] ------------------------------------------------------------------------
> [INFO] BUILD SUCCESS
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: 14:53 min
> [INFO] Finished at: 2015-02-26T21:47:26-05:00
> [INFO] Final Memory: 34M/378M
> [INFO] ------------------------------------------------------------------------
> 
> 
> Thanks,
> 
> Jonathan Hurley
> 
>


Re: Review Request 31524: Alert Notifications Are Not Received Without Restarting Ambari Server

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

(Updated Feb. 26, 2015, 10:12 p.m.)


Review request for Ambari, Nate Cole and Tom Beerbower.


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


Repository: ambari


Description
-------

There seems to be an issue with EclipseLink and nested entities where the relationships are not refreshed from the database correctly. This causes a problem sending out alert notices for alert groups because the target lookup doesn't return the correct entities.

Restarting Ambari Server fixes the issue.


Diffs
-----

  ambari-project/pom.xml 92e3b5c 
  ambari-server/src/main/java/org/apache/ambari/server/orm/dao/AlertDefinitionDAO.java 2daf804 
  ambari-server/src/main/java/org/apache/ambari/server/orm/entities/AlertNoticeEntity.java d0d4c9a 
  ambari-server/src/main/java/org/apache/ambari/server/orm/entities/AlertTargetEntity.java e1248db 
  ambari-server/src/test/java/org/apache/ambari/server/orm/dao/AlertDefinitionDAOTest.java a1cd063 
  ambari-server/src/test/java/org/apache/ambari/server/orm/dao/AlertDispatchDAOTest.java 44c40f2 
  ambari-server/src/test/java/org/apache/ambari/server/orm/dao/AlertsDAOTest.java fb3303c 

Diff: https://reviews.apache.org/r/31524/diff/


Testing (updated)
-------

Clean install of a 3-node cluster; verified that history and notices come back correctly. Added and removed alert targets with associated notices and verified the dispatcher picked up the targets correctly.

mvn clean test

[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 14:53 min
[INFO] Finished at: 2015-02-26T21:47:26-05:00
[INFO] Final Memory: 34M/378M
[INFO] ------------------------------------------------------------------------


Thanks,

Jonathan Hurley