Bug 1386183

Summary: [AAA-JDBC] EJBTransactionRolledbackException when deleting user
Product: [oVirt] ovirt-engine-extension-aaa-jdbc Reporter: Gonza <grafuls>
Component: ExtensionAssignee: Martin Perina <mperina>
Status: CLOSED WORKSFORME QA Contact: Ondra Machacek <omachace>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 1.1.0CC: bugs, grafuls
Target Milestone: ---Flags: grafuls: needinfo-
rule-engine: planning_ack?
rule-engine: devel_ack?
rule-engine: testing_ack?
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-10-24 11:30:05 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:
Attachments:
Description Flags
relevant log none

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.