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/10/27 08:57:00 UTC

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

Doroszlai, Attila created AMBARI-22322:
------------------------------------------

             Summary: 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


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)