Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.

Bug 453174

Summary: Foreign Key Constraint Needed for users and group_users Tables
Product: [Retired] JBoss Customer Support Portal Reporter: John Sanda <jsanda>
Component: Web-GeneralAssignee: Nathan Lugert <nlugert>
Status: CLOSED WONTFIX QA Contact: David Spalding <dspaldin>
Severity: low Docs Contact:
Priority: low    
Version: 1.3.9CC: nlugert, nraghava
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-01-05 18:34:28 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description John Sanda 2008-06-27 17:42:07 UTC
Description of problem:
The userid column in the group_users table is/should be a FK to the users table.
There is no FK key constraint however. This can lead to data anomalies in which
we have a userid in group_users and no corresponding user in the users table. We
already have this situation in QA (cspserver1.db.dev.redhat.com), and it has
resulted in NPEs in GateKeeper code. The following query will return the bad data:

select G.userid 
from group_users G
where G.userid not in (
    select U.userid
    from users U
) 


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


How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:

Comment 1 John Sanda 2008-06-27 17:43:49 UTC
Here is the GateKeeper exception I found in the logs on cspserver2:

2008-06-27 10:22:58,402 ERROR [STDERR] java.lang.NullPointerException
2008-06-27 10:22:58,402 ERROR [STDERR]  at
com.jboss.gatekeeper.workflow.action.batch.ActiveEntitlementRuleAction.processActiveUserEntitlementsUpdate(ActiveEntitlementRuleAction.java:57)
2008-06-27 10:22:58,402 ERROR [STDERR]  at
com.jboss.gatekeeper.workflow.action.batch.ActiveEntitlementRuleAction.process(ActiveEntitlementRuleAction.java:43)
2008-06-27 10:22:58,402 ERROR [STDERR]  at
com.jboss.gatekeeper.workflow.action.batch.BaseProcessAction.execute(BaseProcessAction.java:34)


Comment 2 David Spalding 2011-01-05 18:34:28 UTC
Superceded by Avalon. This component is no longer valid.