cancel
Showing results for 
Search instead for 
Did you mean: 

Sync deletes existing users

jriker1
Champ in-the-making
Champ in-the-making
What do I need to do since moving to 3.3g from 3.2 to get sync to stop deleting and recreating the accounts the first time it runs?  I have to keep restoring my DB each test I do as it deletes everyone and adds them again.  Below is an example:


13:35:00,154 User:System INFO  [security.sync.ChainingUserRegistrySynchronizer] Synchronizing users and groups with user registry 'ldap1'
13:35:00,163 User:System WARN  [security.sync.ChainingUserRegistrySynchronizer] Full synchronization with user registry 'ldap1'; some users and groups previously created by synchronization with this user registry may be removed.
13:35:00,240 User:System INFO  [security.sync.ChainingUserRegistrySynchronizer] Retrieving all groups from user registry 'ldap1'
13:35:00,260 User:System INFO  [security.sync.ChainingUserRegistrySynchronizer] ldap1 Group Analysis: Commencing batch of 0 entries
13:35:00,261 User:System INFO  [security.sync.ChainingUserRegistrySynchronizer] ldap1 Group Analysis: Completed batch of 0 entries
13:35:00,343 User:System INFO  [security.sync.ChainingUserRegistrySynchronizer] Retrieving users changed since May 15, 2010 12:23:31 AM from user registry 'ldap1'
13:35:00,358 User:System INFO  [security.sync.ChainingUserRegistrySynchronizer] ldap1 User Creation and Association: Commencing batch of 0 entries
13:35:00,366 User:System INFO  [security.sync.ChainingUserRegistrySynchronizer] ldap1 User Creation and Association: Completed batch of 0 entries
13:35:00,438 User:System INFO  [security.sync.ChainingUserRegistrySynchronizer] ldap1 Authority Deletion: Commencing batch of 18 entries
13:35:05,684 User:System INFO  [security.sync.ChainingUserRegistrySynchronizer] ldap1 Authority Deletion: Processed 18 entries out of 18. 100% complete. Rate: 3 per second. 0 failures detected.
13:35:05,684 User:System INFO  [security.sync.ChainingUserRegistrySynchronizer] ldap1 Authority Deletion: Completed batch of 18 entries
13:35:05,684 User:System INFO  [security.sync.ChainingUserRegistrySynchronizer] Finished synchronizing users and groups with user registry 'ldap1'
13:35:05,684 User:System INFO  [security.sync.ChainingUserRegistrySynchronizer] 18 user(s) and 0 group(s) processed
13:35:27,793 User:System INFO  [security.sync.ChainingUserRegistrySynchronizer] Synchronizing users and groups with user registry 'ldap1'
13:35:27,796 User:System INFO  [security.sync.ChainingUserRegistrySynchronizer] Retrieving all groups from user registry 'ldap1'
13:35:27,929 User:System INFO  [security.sync.ChainingUserRegistrySynchronizer] ldap1 Group Analysis: Commencing batch of 0 entries
13:35:27,929 User:System INFO  [security.sync.ChainingUserRegistrySynchronizer] ldap1 Group Analysis: Completed batch of 0 entries
13:35:27,933 User:System INFO  [security.sync.ChainingUserRegistrySynchronizer] Retrieving users changed since May 15, 2010 12:23:31 AM from user registry 'ldap1'
13:35:27,941 User:System INFO  [security.sync.ChainingUserRegistrySynchronizer] ldap1 User Creation and Association: Commencing batch of 0 entries
13:35:27,944 User:System INFO  [security.sync.ChainingUserRegistrySynchronizer] ldap1 User Creation and Association: Completed batch of 0 entries
13:35:27,946 User:System INFO  [security.sync.ChainingUserRegistrySynchronizer] Finished synchronizing users and groups with user registry 'ldap1'
13:35:27,946 User:System INFO  [security.sync.ChainingUserRegistrySynchronizer] 0 user(s) and 0 group(s) processed
6 REPLIES 6

mikeh
Star Contributor
Star Contributor

jriker1
Champ in-the-making
Champ in-the-making
Please see http://forums.alfresco.com/en/viewtopic.php?f=9&t=20864&p=68422#p68422

Thanks,
Mike

Thanks Mike.  So what am I missing?  Looks like this was just "fixed" in a prior build.  All my users are wiped and their associations to rooms gone.  That talked about rezoning people that already existed so would tell me that they would not physically be deleted.

Thanks.

JR

mikeh
Star Contributor
Star Contributor
I think the fix would have only made it to 3.2r so that might be your issue here.

Thanks,
Mike

jriker1
Champ in-the-making
Champ in-the-making
I think the fix would have only made it to 3.2r so that might be your issue here.

Thanks,
Mike

Soooo.  You are saying that fixes implemented into the system would be somehow abandoned or branched from earlier builds to create 3.3 and the fix wasn't brought over?  Thought the fix was specifically for 3.2 people trying to go to 3.3.  Not sure about g but still.  If that's the odd case, anyway to identify what was done to fix this previously?

Or perhaps find out what rev in SVN Alfresco 3.2 build 79 is where it was originally implemented and try and find what it did different.

Or get David Ward into this who seemed to code that fix in the first place. Smiley Happy

Note that if this fix ever did work, the sync code is heavily changed since the jira reference says and the user zoning info still seems to be in there. 

Is there perhaps something I can define in the database directly to make the system accept the existing users and not delete them?

Also looks like most of the custom code installed to fix the problem before does exist in the current build with some changes to support groups where the original fix looked to only maintain old users.  So issue still outstanding I guess.

JR

jriker1
Champ in-the-making
Champ in-the-making
So any ideas what's actually going on here or what needs to be done?  Sounds like for now 3.3 and 3.3g were meant for fresh installs only currently as no one is going to tollerate having bunches of users deleted and readded.

Thanks.

JR

dward
Champ on-the-rise
Champ on-the-rise
We meet again jriker!

I'm afraid what we are seeing is due to the knock on effect of the fix to https://issues.alfresco.com/jira/browse/ETHREEOH-4008, where Alfresco started correctly honouring the case of UIDs returned by the LDAP server instead of lower casing them, and a new regression concerning user name case sensitivity. Despite LDAP sync trying to update the UIDs to match the case they occur in the LDAP server, this is blocked by the PersonService and what actually happens is that it ends up deleting all the original users!

See bug https://issues.alfresco.com/jira/browse/ALF-3604

We hope we now have a full understanding of the issue and have created new unit tests to ensure this will not be a problem in the future. I have attached a source patch for HEAD revision 20754 to the issue and will promptly merge it in to HEAD and the next Enterprise service pack.