Details
-
Improvement
-
Resolution: Fixed
-
Minor
-
1.6.1
-
None
-
None
Description
The grouper_members table is used for foreign keys, so an assumption we have made while developing Grouper is the rows in grouper_members are never deleted unless there is a member_change_subject operation. So, I think the solution is that the unresolvable subject deletion utility (and subsequently grouper report) should look for subjects used in memberships, not subjects in grouper_members. I think that would solve your problem and might be an easy solution. There are a bunch of other solutions to this, we should discuss at some point for some release after 1.6.0...
Thanks,
Chris
----Original Message----
From: Colin Hudler
Sent: Thursday, June 10, 2010 11:04 AM
To: grouper-users@internet2.edu
Subject: [grouper-users] Fails to deleting group from grouper_members when the group is deleted
Greetings,
The grouper report emails are very helpful, thanks for that. I noticed
that our unresolvable g:gsa subjects keeps increasing, so I
investigated. In our environment, it seems that grouper does not delete
groups from grouper_members table even though the group has been deleted
from grouper_groups. See below for the steps I used to reproduce:
1) Starting with a (nearly) minimal registry:
mysql> select id,name from grouper_groups;
-------------------------------------------------+
id | name |
-------------------------------------------------+
28f66ed34b03407b9525d8b23ce6603a | etc:wheel |
7621b985460f4fbcb9521e49203b261d | etc:provisioner |
-------------------------------------------------+
mysql> select subject_id,subject_type from grouper_members;
----------------------------------------------+
subject_id | subject_type |
----------------------------------------------+
GrouperSystem | application |
28f66ed34b03407b9525d8b23ce6603a | group |
GrouperAll | application |
7621b985460f4fbcb9521e49203b261d | group |
----------------------------------------------+
2) Add a group using GSH, then check these two tables again:
gsh 0% addGroup("etc", "test", "test")
group: name='etc:test' displayName='etc:test'
uuid='b7e6c819cc8a4bca84b99a92df097325'
mysql> select id,name from grouper_groups;
-------------------------------------------------+
id | name |
-------------------------------------------------+
28f66ed34b03407b9525d8b23ce6603a | etc:wheel |
7621b985460f4fbcb9521e49203b261d | etc:provisioner |
b7e6c819cc8a4bca84b99a92df097325 | etc:test |
-------------------------------------------------+
mysql> select subject_id,subject_type from grouper_members;
----------------------------------------------+
subject_id | subject_type |
----------------------------------------------+
GrouperSystem | application |
28f66ed34b03407b9525d8b23ce6603a | group |
GrouperAll | application |
7621b985460f4fbcb9521e49203b261d | group |
b7e6c819cc8a4bca84b99a92df097325 | group |
----------------------------------------------+
3) delete the group using GSH, then check the two tables again:
gsh 1% delGroup("etc:test")
true
mysql> select id,name from grouper_groups;
-------------------------------------------------+
id | name |
-------------------------------------------------+
28f66ed34b03407b9525d8b23ce6603a | etc:wheel |
7621b985460f4fbcb9521e49203b261d | etc:provisioner |
-------------------------------------------------+
mysql> select subject_id,subject_type from grouper_members;
----------------------------------------------+
subject_id | subject_type |
----------------------------------------------+
GrouperSystem | application | |
28f66ed34b03407b9525d8b23ce6603a | group | |
GrouperAll | application | |
7621b985460f4fbcb9521e49203b261d | group | |
b7e6c819cc8a4bca84b99a92df097325 | group | <--- It is still there? --------------------------------- |
Do I need to make an additional command to grouper?
As an aside, USDU seems unable to delete these, even with the -delete
option.