-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/48944/
-----------------------------------------------------------

Review request for ranger, Ankita Sinha, Don Bosco Durai, Gautam Borad, Abhay 
Kulkarni, Madhan Neethiraj, Mehul Parikh, Ramesh Mani, Selvamohan Neethiraj, 
and Velmurugan Periasamy.


Bugs: RANGER-1041
    https://issues.apache.org/jira/browse/RANGER-1041


Repository: ranger


Description
-------

**Problem Statement:** Failure to add/update one user causes failure in syncing 
rest of the users.
Currently from UserSync module REST API call is made to sync users to Ranger 
Admin. Since User syncing happens sequentially using for loop; failure of any 
request may stop syncing of rest of the users.

**Proposed Solution:** 
Code block which is responsible for syncing of users to Ranger admin should be 
surrounded within try/catch block.


Diffs
-----

  security-admin/src/main/java/org/apache/ranger/biz/SessionMgr.java 6fcf754 
  security-admin/src/main/java/org/apache/ranger/biz/XUserMgr.java ca27580 
  
security-admin/src/main/java/org/apache/ranger/solr/SolrAccessAuditsService.java
 0d6eefa 
  
ugsync/src/main/java/org/apache/ranger/unixusersync/process/FileSourceUserGroupBuilder.java
 54e47f6 
  
ugsync/src/main/java/org/apache/ranger/unixusersync/process/PolicyMgrUserGroupBuilder.java
 df029c2 
  
ugsync/src/main/java/org/apache/ranger/unixusersync/process/UnixUserGroupBuilder.java
 12e6a93 
  ugsync/src/main/java/org/apache/ranger/usergroupsync/UserGroupSync.java 
9d20aaa 

Diff: https://reviews.apache.org/r/48944/diff/


Testing
-------

**Steps performed(without patch to reproduce the case) :**
1. Installed and started Ranger admin and Ranger user sync.
2. After Ranger user sync finished user syncing; picked an existing user 'hive' 
and manually executed insert statement to create duplicate entry of the user in 
x_user table.
3. Restarted user sync and created OS user 'ranger1' and 'ranger2' to sync them 
in Ranger admin.
4. Syncing of users 'ranger1' and 'ranger2' did not happened as syncing process 
stop when it started processing user 'hive'.

**Steps performed(with patch) :**
1. Provided without patch configuration of Ranger admin and Ranger usersync in 
install.properties file.
2. Installed and started Ranger admin and Ranger user sync. 
3. Opened Ranger usersync log in terminal to track the failure message(if any).
4. Logged into Ranger Admin UI and visited User/groups page.

**Expected Behavior :** User 'ranger1' and 'ranger2' should get synced in 
Ranger admin and appear in UI. There should not be any usersync failure log in 
Ranger usersync log file(usersync.log)

**Actual Behavior :** User 'ranger1' and 'ranger2' were synced in Ranger admin 
and was appearing at Ranger users page. Failure log messages related to syncing 
of users were not coming in usersync.log file.


Thanks,

Pradeep Agrawal

Reply via email to