Bug 1386183 - [AAA-JDBC] EJBTransactionRolledbackException when deleting user
Summary: [AAA-JDBC] EJBTransactionRolledbackException when deleting user
Keywords:
Status: CLOSED WORKSFORME
Alias: None
Product: ovirt-engine-extension-aaa-jdbc
Classification: oVirt
Component: Extension
Version: 1.1.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified vote
Target Milestone: ---
: ---
Assignee: Martin Perina
QA Contact: Ondra Machacek
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-10-18 11:18 UTC by Gonza
Modified: 2016-10-27 13:06 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-10-24 11:30:05 UTC
oVirt Team: Infra
grafuls: needinfo-
rule-engine: planning_ack?
rule-engine: devel_ack?
rule-engine: testing_ack?


Attachments (Terms of Use)
relevant log (62.67 KB, text/plain)
2016-10-18 11:18 UTC, Gonza
no flags Details

Description Gonza 2016-10-18 11:18:41 UTC
Created attachment 1211665 [details]
relevant log

Description of problem:
Not able to remove user via rest API v4.

Version-Release number of selected component (if applicable):
rhevm-4.0.5.1-0.1.el7ev.noarch
ovirt-engine-extension-aaa-jdbc-1.1.1-1.el7ev.noarch
python-ovirt-engine-sdk4-4.0.2-1.el7ev.x86_64

How reproducible:
100%

Steps to Reproduce:
1. Add user via jdbc-tool
2. Remove user via rest API

Actual results:
EJBTransactionRolledbackException on RemoveUserCommand

Expected results:
User is removed and no exception is raised


Additional info:
relevant log attached

Comment 1 Martin Perina 2016-10-18 12:23:29 UTC
Only users which have directly assigned at least 1 permissions are stored inside engine. And only those users can be removed by API call. If you create a user using ovirt-aaa-jdbc-tool and don't assign him any permission, this user is not present in /ovirt-engine/api/users and that's why it cannot be removed by API call.

So have you assigned any permission to the user created by aaa-jdbc tool?

  - If so, which permission and for which object? Have you used ID to remove this user?

  - If not, what ID/username have you used for API remove call?

Comment 2 Martin Perina 2016-10-18 12:35:54 UTC
Btw I've just verified that removing users existing in engine (visible under /ovirt-engine/api/users) with permisions or without any permissions works fine by calling directly RESTAPI.

Comment 3 Martin Perina 2016-10-24 11:30:05 UTC
Closing as WOKRSFORME, because we were not able to reproduce the issue. If you are still able to reproduce it, please provide us exact reproducing steps.


Note You need to log in before you can comment on or make changes to this bug.