Bug 1346932

Summary: My Groups option in the Add Permission to User dialog throws NPE (Query 'GetDirectoryGroupsForUserQuery' failed: null)
Product: [oVirt] ovirt-engine Reporter: Pavel Novotny <pnovotny>
Component: AAAAssignee: Ravi Nori <rnori>
Status: CLOSED CURRENTRELEASE QA Contact: Pavel Novotny <pnovotny>
Severity: high Docs Contact:
Priority: high    
Version: 4.0.0CC: bugs, mperina
Target Milestone: ovirt-4.0.1Flags: rule-engine: ovirt-4.0.z+
pnovotny: testing_plan_complete-
rule-engine: planning_ack+
mperina: devel_ack+
pnovotny: testing_ack+
Target Release: 4.0.1.1   
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-07-19 06:25:24 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:
Bug Depends On:    
Bug Blocks: 1273041    
Attachments:
Description Flags
engine.log none

Description Pavel Novotny 2016-06-15 16:39:44 UTC
Created attachment 1168456 [details]
engine.log

Description of problem:
If a user from a group selects "My Groups" option in a "Add Permission to User" dialog, the progress bar will run indefinitely, because there is a NPE error in engine.log.

Version-Release number of selected component (if applicable):
rhevm-4.0.0.4-0.1.el7ev.noarch (build 4.0.0-14)
ovirt-engine-4.0.0.4-0.1.el7ev.noarch
ovirt-engine-extension-aaa-jdbc-1.1.0-1.el7ev.noarch

How reproducible:
100%

Steps to Reproduce:
1. Have a user "user1", who is member of group "group1".
2. As user1, log into Webadmin, go to Data Centers tab (for example) -> select any DC ->
   -> Permissions -> Add 
3. In the permissions dialog, select "My Groups" radio button.

Actual results:
Progress bar still runs, no groups are shown, NPE in engine.log.

Expected results:
"group1" is shown, can be selected and a permission can be assigned to it.

Additional info:
I used 'internal' domain for this reproducer.

Traceback excerpt (see the full attached):
-~-
2016-06-15 16:15:01,536 ERROR [org.ovirt.engine.core.bll.aaa.GetDirectoryGroupsForUserQuery] (default task-25) [] Query 'GetDirectoryGroupsForUserQuery' failed: null
2016-06-15 16:15:01,536 ERROR [org.ovirt.engine.core.bll.aaa.GetDirectoryGroupsForUserQuery] (default task-25) [] Exception: java.lang.NullPointerException
	at org.ovirt.engine.core.bll.aaa.GetDirectoryGroupsForUserQuery.getDirectoryUser(GetDirectoryGroupsForUserQuery.java:34) [bll.jar:]
-~-

Comment 1 Pavel Novotny 2016-07-11 14:22:19 UTC
Verified in
rhevm-4.0.2-0.2.rc1.el7ev.noarch
ovirt-engine-extension-aaa-jdbc-1.1.0-1.el7ev.noarch
ovirt-engine-webadmin-portal-4.0.2-0.2.rc1.el7ev.noarch

Verified according to reproducer in cooment 0.
Selecting the 'My Groups' radio button now returns the groups the user is member of.

Comment 2 Sandro Bonazzola 2016-07-19 06:25:24 UTC
Since the problem described in this bug report should be
resolved in oVirt 4.0.1 released on July 19th 2016, it has been closed with a
resolution of CURRENT RELEASE.

For information on the release, and how to update to this release, follow the link below.

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

http://www.ovirt.org/release/4.0.1/