grouper-dev - [grouper-dev] RE: Bad Membership Finder Utility .... Was: ( [grouper-users] Composite group problems)
Subject: Grouper Developers Forum
List archive
[grouper-dev] RE: Bad Membership Finder Utility .... Was: ( [grouper-users] Composite group problems)
Chronological Thread
- From: "Black, Carey M." <>
- To: "" <>
- Subject: [grouper-dev] RE: Bad Membership Finder Utility .... Was: ( [grouper-users] Composite group problems)
- Date: Mon, 23 Oct 2017 13:12:29 +0000
- Accept-language: en-US
- Authentication-results: spf=pass (sender IP is 128.146.163.17) smtp.mailfrom=osu.edu; internet2.edu; dkim=none (message not signed) header.d=none;internet2.edu; dmarc=pass action=none header.from=osu.edu;
- Ironport-phdr: 9a23:D4yu1B3qsblua73usmDT+DRfVm0co7zxezQtwd8ZseMQL/ad9pjvdHbS+e9qxAeQG96Ku7Qc06L/iOPJYSQ4+5GPsXQPItRndiQuroEopTEmG9OPEkbhLfTnPGQQFcVGU0J5rTngaRAGUMnxaEfPrXKs8DUcBgvwNRZvJuTyB4Xek9m72/q89pDXYAhEniaxba9vJxiqsAvdsdUbj5F/Iagr0BvJpXVIe+VSxWx2IF+Yggjx6MSt8pN96ipco/0u+dJOXqX8ZKQ4UKdXDC86PGAv5c3krgfMQA2S7XYBSGoWkx5IAw/Y7BHmW5r6ryX3uvZh1CScIMb7S60/Vza/4KdxUBLmiDkJOSMl8G/ZicJwgqBUoBO9qBNw2IPbep2ZOf5kc6/BYd8WW2xMVdtRWSxbBYO8apMCA+QcMOZctYbyu1gOoQOjDgSyHuzv0CFHh3/r1qM9yegtHxzN0Qs7ENIKqnvbsNb1OL0PXeyrwqTF1jLDb+hL2Tvn9ofHbw0hrOiKULltf8TRzkwvGBnEjlWWsYHlPjWV1vgTvGiB6epvS/6vh3A9pw5vvzev28EhgZTKiIIN0l3I6z92zJooKdC9VUJ3fMOoHZ5etyyVK4d6XsYvQ292tys1zrALvJu2cSoXxJg53xLTdv2KfoeS7h7+SOqcIy10iGxqdb+9nRq+70etx+nkWsm6zllHrTZJn9zJu30NyxPc9saHR/5j8kqu2DuAygXe5+5ELE02m6fWLoIuzaUrmZUJt0nIAzX4l1/sjKCMc0Up4uio5PrjYrXhvpKSL5N5hAbiPqkgg8CxD+M2PwYXU2ic4uuzyqfv/UrkQLVWlfI2lbTZsJbHKsgBvq65GQhV0po95BmjEzem0dMYnX8dIFJCZRKHk4zpO1bJIPD7F/uwn1OskDJzy/DHOL3uHInNI2DdnLj7Ybpx9ktRxBcuwdxC4p9UBL4MLO7vVkL0utzXEBA0PgixzuviCthxy50SVXqKAqCDMaPStVGI5vgoI+mJfIIaozL9JOI56P7tl3M1hEERcKey0JsQc3C4A+5qLFuEbnrxmtsBC3sFvhIiTOz2j12PSTFTZ2y1X6Ih/jE0FpimAZ7eSY+znryMxyO7HpxNZmBaEVCAD23kd4SCW/cQdi2SOMlhnSIYVbS/UYMuywyhtBKpg4Zge6Db4CoFrZ/5kdR4+cXSkw0/7zp5E57b3m2QBSkgkXkPWic7xuVzrFJVy1Gf3LJ+juACU9Ff+qUafB09MMuW5ehzANO2EinIZNqYAHPgCJ3yCzU4RdF3moVVS0FmBpOvgg2VjHniOKMci7HeXM98yanbxXWkf8s=
- Spamdiagnosticmetadata: NSPM
- Spamdiagnosticoutput: 1:99
Fair enough. I opened an improvement request to try to keep track of the ideas: https://bugs.internet2.edu/jira/browse/GRP-1620 --
Carey Matthew From: Hyzer, Chris [mailto:]
The problem is the queries to find bad memberships can be very costly and disruptive. My DBAs have yelled at me about it. Maybe a targeted change log consumer
to check only affected groups could be a good idea. We can think about it after 2.4 is released… Otherwise getting to 2.3 and letting the daemon run nightly should be sufficient as a stopgap… Thanks Chris From:
[]
On Behalf Of Black, Carey M. Shilen ( et. al.) , I suspect that this condition is barely understood about the inner workings of the system by most deployers and/or users. Giving the AM ( Access Management ) team control over the promptness of the “fully effective By” window would be a very powerful tool/control that Grouper could
assert. ( Or at least knowledge of when the changes are fully verified/effective in Grouper.) I remember reading about the Bad Membership Finder Utility and thinking:
“What??!?!? Why?? Can that not be done on any membership change? So that the “invalid state” for the composites is avoided all together?” Then I wandered off to other things, and have only bumped into the though a few times sense. (and every time decided “I don’t have time to think about it right
now.” And wandered off again.) Well here are some more thoughts on the implementation details: I think I see some of the complexities here, but I doubt that I see all of them. The graph of dependencies for all of the composite groups seems knowable. (Possibly changing as a result of the change too. ) When any one of those dependencies are changed (for a given subject/group) it seems possible to walk/correct the affected parts of the graphs.
( in line, or at least triggering an event to config/fix as needed.) And since circular membership loops are possible it gets a bit more well…. Interesting…. to know where to start and stop some of these things
too. :^/ Which is why the process is run repeatedly till it does not make changes. (Inferring that the dependency graph may not be used to optimize the path of changes, or the solution may not be done in a way that “pushes multiple peer changes” in a “top
down” kind of flow.) You alluded to a possible race condition in the system too. ( in the thread below. )
So apparently the backend does not do “locking” in a way to deal with overlapping dependency tree changes in a full ACID compliance
way. ( no doubt complicated by the “circular membership loops” ) Likely trying to avoid DB thread deadlocks… ok… but…. Maybe, in some cases, that blocking would actually be desired by the users/system? So, in this non-blocking model, with an attempt to not “thrash the system” and make every save take minutes, I could see the idea of stacking
up a queue (change log consumer?) to process these checks/corrections in a timely ( a few minutes, < 2 ? , < 5 ? ) manor. But maybe that “acceptable delay” should be a property of the composite and/or the groups that are involved? I could imagine some cases were you always want: ) change in “this special group” to be 100% completed “NOW”. ( Global Exclude groups, or just “important” Exclude
groups, etc… And maybe even in some “include groups” too.) ) While other groups may be ok to be “loosely consistent”. ( “Provision that group in the next hour and no harm
done. “ ) Especially when in the context of Access Control Policies and/or Provisioning/DE provisioning. So maybe membership changes also
needs to force (queue/call) Prov/DeProv processes too? I doubt all of that would be easy to do. ( In fact, I think most of it would be fairly hard to implement without potentially causing other issues.) But does the core idea of making this “loosely consistent model tunable by the users” make sense to anyone else? --
Carey Matthew
From:
[]
On Behalf Of Shilen Patel That could have happened if you have composites that are factors of other composites. There may be other reasons too though. FWIW, the daemon in 2.3 is designed to take that into account and runs multiple times until
all the issues are corrected. - Shilen Sent from my Verizon, Samsung Galaxy smartphone -------- Original message -------- From: Dave Churchley <>
Date: 10/20/17 10:12 AM (GMT-05:00) To: Shilen Patel <>
Cc: Subject: RE: [grouper-users] Composite group problems
Yes, that makes sense. I’ve now scheduled the Bad Membership Finder Utility to run each morning, just after the Grouper loader groups are populated. One more question, if you don’t mind, do you know why it took four goes to fix all the bad memberships this morning? Each time I ran it, it fixed
the majority that it had found, but not all of them. Thanks From:
[]
On Behalf Of Shilen Patel OK cool. The scenario you described is a similar situation where you probably have two threads running at the same time that deleted and added the user from/to the groups under Group B. The thread that deleted the user
from the group under B would have thought the user wasn't an effective member of B anymore and would have deleted the user from A. Meanwhile the thread that added the user to the group under B would have seen that the user is already in A (since the other
transaction may not have committed yet) and therefore wouldn't have done anything else. Does that at least explain the issue? We created the bad membership daemon in 2.3 because of this issue but we may need to handle it better. Thanks! - Shilen Sent from my Verizon, Samsung Galaxy smartphone -------- Original message -------- From: Dave Churchley <>
Date: 10/20/17 1:28 AM (GMT-08:00) To: Shilen Patel <>
Cc: Subject: RE: [grouper-users] Composite group problems
Thanks again Shilen The Bad Membership Finder Utility cleaned up 118 bad memberships this morning. (I had to run it four times though until it found no membership errors.)
I’m sure this utility will be useful to us! I don’t know if you’re able to explain why the composite group memberships go wrong as in the example below? Thanks From:
[]
On Behalf Of Dave Churchley Thanks Shilen, I'll take a look at that in the morning.
For at least one of the problem groups, however, this is definitely not the issue. Group A is made up of Group B complement Group C. Person X was in B and not C and so he rightly appeared in A. Two days ago he dropped
out of A but he remained in B and not in C. Those groups' memberships hadn't changed. We did notice that Group B was built from several Grouper loader groups and Person X had moved from one of them into another, but this meant that he was still a member of
B. I hope I've managed to explain that! Thanks Dave From: Shilen Patel <> If both factors in the composite are being updated at about the same time for the same subject, then a membership may be missed. For example, if Group A is an intersection
of Group B and Group C and you add the same person to B and C at almost the same time, then due to the way the database transactions work, the composite membership may not be added to Group A. Does that seem like the problem you’re having? |
- [grouper-dev] Bad Membership Finder Utility .... Was: ( [grouper-users] Composite group problems), Black, Carey M., 10/20/2017
- Re: [grouper-dev] Bad Membership Finder Utility .... Was: ( [grouper-users] Composite group problems), Shilen Patel, 10/20/2017
- [grouper-dev] RE: Bad Membership Finder Utility .... Was: ( [grouper-users] Composite group problems), Hyzer, Chris, 10/23/2017
- [grouper-dev] RE: Bad Membership Finder Utility .... Was: ( [grouper-users] Composite group problems), Black, Carey M., 10/23/2017
Archive powered by MHonArc 2.6.19.