Bug 882682

Summary: engine-notifierd service active & rhevm-manage-domains add/delete cause DB connection limit exceed
Product: Red Hat Enterprise Virtualization Manager Reporter: Ilanit Stein <istein>
Component: ovirt-engine-notification-serviceAssignee: Yair Zaslavsky <yzaslavs>
Status: CLOSED DUPLICATE QA Contact: Ilanit Stein <istein>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 3.1.0CC: bazulay, dyasny, iheim, oourfali, Rhev-m-bugs, ykaul
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: infra
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-12-09 06:36:56 EST Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Infra RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Description Flags
notifier log
engine.log none

Description Ilanit Stein 2012-12-02 11:26:07 EST
Description of problem:

Activating event notifification, along with trying to add/delete domain
by rhevm-manage-domains cause DB related commands to fail on database access.

Version-Release number of selected component (if applicable):

How reproducible:
always (tried on 2 clean install setups)

Steps to Reproduce:
1. Define the /etc/ovirt-engine/notifier/notifier.conf for sending notifications
(My conf attached as example)
2. Activate engine-notifierd service. 
(/etc/rc.d/init.d/engine-notifierd start)
3. Attach event notification to a user 
(I added a user from AD, attached to it event notification for ovirt-engine stop)
4. rhevm-manage-domains delete or add domain fail to access DB.
(I run: 
rhevm-manage-domains  -action=delete -addPermissions -domain=qa.lab.tlv.redhat.com -user=dafna  -interactive -provider=activeDirectory
Failure while connecting to database. Details: FATAL: connection limit exceeded for non-superusers)
Actual results:
Commands related to database DB connection fail on limit exceeded error:
rhevm-manage-domains  -action=delete -addPermissions -domain=qa.lab.tlv.redhat.com -user=dafna  -interactive -provider=activeDirectory

Failure while connecting to database. Details: FATAL: connection limit exceeded for non-superusers

rhevm-config -l
Connection to the Database failed. Please check that the hostname and port number are correct and that the Database service is up and running.

Expected results:
Event notification should not interfere DB access.

Additional info:
Stop engine-notifierd release the DB.
Comment 1 Ilanit Stein 2012-12-02 11:30:14 EST
Created attachment 656124 [details]
Comment 2 Ilanit Stein 2012-12-02 11:32:18 EST
Created attachment 656125 [details]
notifier log
Comment 3 Ilanit Stein 2012-12-02 11:34:15 EST
Created attachment 656126 [details]
Comment 4 Yair Zaslavsky 2012-12-09 06:36:56 EST
Duplicate of https://bugzilla.redhat.com/show_bug.cgi?id=882847
Connection handling at notifier was vastly improved at this bug.
Since notifierd does not work connection pool, each time a connection is obtained in its code a new connection is opened towards the DB, and the DB has a limit of open connections.
The above bug fix reduced the time the connection is begin opened.

*** This bug has been marked as a duplicate of bug 882847 ***