Bug 879921

Summary: engine: when one of the LDAP servers are down and we are running query on users from one session and try to log in from a second we would get "user already logged in" error
Product: Red Hat Enterprise Virtualization Manager Reporter: Dafna Ron <dron>
Component: ovirt-engineAssignee: Ravi Nori <rnori>
Status: CLOSED CURRENTRELEASE QA Contact: Martin Pavlik <mpavlik>
Severity: medium Docs Contact:
Priority: medium    
Version: 3.1.0CC: dyasny, hateya, iheim, lpeer, Rhev-m-bugs, sgrinber, yeylon, ykaul, yzaslavs
Target Milestone: ---   
Target Release: 3.2.0   
Hardware: x86_64   
OS: Linux   
Whiteboard: infra
Fixed In Version: sf9 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Infra RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 917401    
Attachments:
Description Flags
logs none

Description Dafna Ron 2012-11-25 13:27:22 UTC
Created attachment 651525 [details]
logs

Description of problem:

I ran a query on users when one of the LDAp servers was down and tried logging in from a second session with internal user. 
after a few minutes when it appeared that the login page is stuck we get a CanDoAction from engine:  CanDoAction of action LoginAdminUser failed. Reasons:USER_IS_ALREADY_LOGGED_IN

once we get this error it will continue until we reload the page.

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

si24.4

How reproducible:

100%

Steps to Reproduce:
1. log in with internal user and try to query users from the domain while the first LDAP server is down
2. open a second tab and try to log in with the same internal user
3. 
  
Actual results:

the logging takes a long time until we fail on  CanDoAction of action LoginAdminUser failed. Reasons:USER_IS_ALREADY_LOGGED_IN
only after we reload the page we will manage to login with the same user on the second session

Expected results:

we should be able to log in with the same user from two different sessions. 
also, since reloading the page appeared t o have clear the CanDoAction I think we might be querying cache for that particular CanDo?

Additional info:logs

Comment 2 Ravi Nori 2013-01-21 14:19:49 UTC
link : http://gerrit.ovirt.org/#/c/11261/

change id : I80c1857ce344330bcf0588ae6c9ddc7eb5d9e4aa

Comment 5 Martin Pavlik 2013-05-17 15:44:55 UTC
LDAP down,
login in both tabs without problem/delay

2013-05-17 17:43:47,356 ERROR [org.ovirt.engine.core.bll.adbroker.LdapSearchExceptionHandler] (ajp-/127.0.0.1:8702-9) Error in communicating with LDAP server dc-02.ad2.rhev.lab.eng.brq.redhat.com:389; nested exception is javax.naming.CommunicationException: dc-02.ad2.rhev.lab.eng.brq.redhat.com:389 [Root exception is java.net.SocketTimeoutException: connect timed out]
2013-05-17 17:43:47,356 ERROR [org.ovirt.engine.core.bll.adbroker.LdapSearchExceptionHandler] (ajp-/127.0.0.1:8702-7) Error in communicating with LDAP server dc-02.ad2.rhev.lab.eng.brq.redhat.com:389; nested exception is javax.naming.CommunicationException: dc-02.ad2.rhev.lab.eng.brq.redhat.com:389 [Root exception is java.net.SocketTimeoutException: connect timed out]
2013-05-17 17:43:47,357 ERROR [org.ovirt.engine.core.bll.adbroker.DirectorySearcher] (ajp-/127.0.0.1:8702-9) Failed ldap search server LDAP://dc-02.ad2.rhev.lab.eng.brq.redhat.com:389 using user vdcadmin.LAB.ENG.BRQ.REDHAT.COM due to connection timeout. We should try the next server
2013-05-17 17:43:47,357 ERROR [org.ovirt.engine.core.bll.adbroker.DirectorySearcher] (ajp-/127.0.0.1:8702-7) Failed ldap search server LDAP://dc-02.ad2.rhev.lab.eng.brq.redhat.com:389 using user vdcadmin.LAB.ENG.BRQ.REDHAT.COM due to connection timeout. We should try the next server

Comment 6 Itamar Heim 2013-06-11 08:52:55 UTC
3.2 has been released

Comment 7 Itamar Heim 2013-06-11 08:52:56 UTC
3.2 has been released

Comment 8 Itamar Heim 2013-06-11 08:52:56 UTC
3.2 has been released

Comment 9 Itamar Heim 2013-06-11 08:56:39 UTC
3.2 has been released

Comment 10 Itamar Heim 2013-06-11 09:26:37 UTC
3.2 has been released