Bug 1676443

Summary: add more informative error when session limit exceeded for the user
Product: [oVirt] ovirt-engine Reporter: Lucie Leistnerova <lleistne>
Component: RestAPIAssignee: Dana <delfassy>
Status: CLOSED CURRENTRELEASE QA Contact: Michael Burman <mburman>
Severity: low Docs Contact:
Priority: unspecified    
Version: 4.3.0CC: bugs, mburman, mperina, rnori
Target Milestone: ovirt-4.3.2Flags: aoconnor: ovirt-4.3+
lleistne: testing_ack+
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: ovirt-engine-4.3.2 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-03-19 10:05:20 UTC 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:

Description Lucie Leistnerova 2019-02-12 10:06:53 UTC
Description of problem:
When engine is set to limit user sessions, API returns only 'Unauthorized' when the limit has exceeded. Admin portal shows more informative error.

Version-Release number of selected component (if applicable):
ovirt-engine-restapi-4.3.0.4-0.1.el7.noarch

How reproducible: always


Steps to Reproduce:
1. set session limit in /etc/ovirt-engine/engine.conf.d/99-max-user-sessions.conf
ENGINE_MAX_USER_SESSIONS=2
2. restart engine
3. call api 3x
curl -k -v -u admin@internal:passwd -H "Prefer: persistent-auth" https://engine/ovirt-engine/api

Actual results: the last call returns
<html><head><title>Error</title></head><body>Unauthorized</body></html>


Expected results: 
<html><head><title>Error</title></head><body>Unable to login user admin@internal because the maximum number of allowed sessions 2 is exceeded </body></html>

Comment 1 Michael Burman 2019-03-07 07:47:00 UTC
Verified on - rhvm-4.3.2-0.1.el7.noarch

Comment 2 Sandro Bonazzola 2019-03-19 10:05:20 UTC
This bugzilla is included in oVirt 4.3.2 release, published on March 19th 2019.

Since the problem described in this bug report should be
resolved in oVirt 4.3.2 release, it has been closed with a resolution of CURRENT RELEASE.

If the solution does not work for you, please open a new bug report.