You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ambari.apache.org by "Doroszlai, Attila (JIRA)" <ji...@apache.org> on 2017/11/08 22:16:01 UTC

[jira] [Resolved] (AMBARI-22322) Problems with alert definitions' support for multiple services

     [ https://issues.apache.org/jira/browse/AMBARI-22322?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Doroszlai, Attila resolved AMBARI-22322.
----------------------------------------
    Resolution: Won't Do

> Problems with alert definitions' support for multiple services
> --------------------------------------------------------------
>
>                 Key: AMBARI-22322
>                 URL: https://issues.apache.org/jira/browse/AMBARI-22322
>             Project: Ambari
>          Issue Type: Bug
>          Components: ambari-server
>    Affects Versions: 3.0.0
>            Reporter: Doroszlai, Attila
>            Assignee: Doroszlai, Attila
>            Priority: Critical
>             Fix For: 3.0.0
>
>         Attachments: AMBARI-22322.patch
>
>
> When creating a service the following error is encountered due to service name vs. service type mismatch:
> {noformat}
> ERROR [pool-3-thread-1] AlertServiceStateListener:170 - Unable to populate alert definitions from the database during installation of ZK1
> org.apache.ambari.server.AmbariException: Unable to create a default alert group for unknown service ZOOKEEPER in cluster TEST
> 	at org.apache.ambari.server.orm.dao.AlertDispatchDAO.createDefaultGroup(AlertDispatchDAO.java:464)
> 	at org.apache.ambari.server.orm.AmbariJpaLocalTxnInterceptor.invoke(AmbariJpaLocalTxnInterceptor.java:118)
> 	at org.apache.ambari.server.orm.dao.AlertDefinitionDAO.create(AlertDefinitionDAO.java:345)
> 	at org.apache.ambari.server.orm.AmbariJpaLocalTxnInterceptor.invoke(AmbariJpaLocalTxnInterceptor.java:128)
> 	at org.apache.ambari.server.events.listeners.alerts.AlertServiceStateListener.onAmbariEvent(AlertServiceStateListener.java:164)
> {noformat}
> When adding the second service for the same service type, definitions are again attempted to be created, resulting in unique constraint violation:
> {noformat}
> ...
> 	at org.apache.ambari.server.orm.dao.AlertDefinitionDAO.create(AlertDefinitionDAO.java:337)
> 	at org.apache.ambari.server.orm.AmbariJpaLocalTxnInterceptor.invoke(AmbariJpaLocalTxnInterceptor.java:128)
> 	at org.apache.ambari.server.events.listeners.alerts.AlertServiceStateListener.onAmbariEvent(AlertServiceStateListener.java:164)
> ...
> Caused by: org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique constraint "uni_alert_def_name"
> {noformat}
> Upon service removal, alert definitions are not deleted, because lookup is by service name, not service type.  Definitions should be retained as long as there are any services of the given type.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)