ranger-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From spolavar...@apache.org
Subject [2/2] ranger git commit: RANGER-1800: Usersync fails to update users and groups during incremental sync with nested groups and group first search enabled -- master
Date Tue, 26 Sep 2017 21:14:41 GMT
RANGER-1800: Usersync fails to update users and groups during incremental sync with nested
groups and group first search enabled -- master


Project: http://git-wip-us.apache.org/repos/asf/ranger/repo
Commit: http://git-wip-us.apache.org/repos/asf/ranger/commit/17deef64
Tree: http://git-wip-us.apache.org/repos/asf/ranger/tree/17deef64
Diff: http://git-wip-us.apache.org/repos/asf/ranger/diff/17deef64

Branch: refs/heads/master
Commit: 17deef643ae1985e74a18273852e205df0b051a6
Parents: d31aabe
Author: Sailaja Polavarapu <spolavarapu@hortonworks.com>
Authored: Tue Sep 26 14:11:49 2017 -0700
Committer: Sailaja Polavarapu <spolavarapu@hortonworks.com>
Committed: Tue Sep 26 14:11:49 2017 -0700

----------------------------------------------------------------------
 .../ldapusersync/process/LdapDeltaUserGroupBuilder.java       | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ranger/blob/17deef64/ugsync/src/main/java/org/apache/ranger/ldapusersync/process/LdapDeltaUserGroupBuilder.java
----------------------------------------------------------------------
diff --git a/ugsync/src/main/java/org/apache/ranger/ldapusersync/process/LdapDeltaUserGroupBuilder.java
b/ugsync/src/main/java/org/apache/ranger/ldapusersync/process/LdapDeltaUserGroupBuilder.java
index 394bde2..17682ba 100644
--- a/ugsync/src/main/java/org/apache/ranger/ldapusersync/process/LdapDeltaUserGroupBuilder.java
+++ b/ugsync/src/main/java/org/apache/ranger/ldapusersync/process/LdapDeltaUserGroupBuilder.java
@@ -349,6 +349,7 @@ public class LdapDeltaUserGroupBuilder extends AbstractUserGroupSource
{
 		    }
 			List<String> userList = new ArrayList<>(userSet);
 			String transformGroupName = groupNameTransform(groupName);
+			LOG.debug("addOrUpdateGroup(): group = " + groupName + " users = " + userList);
 			try {
 				sink.addOrUpdateGroup(transformGroupName, userList);
 			} catch (Throwable t) {
@@ -751,8 +752,10 @@ public class LdapDeltaUserGroupBuilder extends AbstractUserGroupSource
{
 		}
 
         if (groupHierarchyLevels > 0) {
+			LOG.debug("deltaSyncGroupTime = " + deltaSyncGroupTime);
             if (deltaSyncGroupTime > 0) {
-                goUpGroupHierarchyLdap(groupNameMap.keySet(), groupHierarchyLevels-1);
+				LOG.info("LdapDeltaUserGroupBuilder.getGroups(): Going through group hierarchy for nested
group evaluation for deltasync");
+				goUpGroupHierarchyLdap(groupNameMap.keySet(), groupHierarchyLevels-1);
             }
         }
 
@@ -942,7 +945,7 @@ public class LdapDeltaUserGroupBuilder extends AbstractUserGroupSource
{
                                 } else {
                                     groupUserTable.put(gName, originalUserFullName, originalUserFullName);
                                 }
-
+								groupNameMap.put(groupEntry.getNameInNamespace().toLowerCase(), gName);
 							}
 							LOG.info("No. of members in the group " + gName + " = " + userCount);
 						}


Mime
View raw message