abhiishek26 opened a new pull request, #1367:
URL: https://github.com/apache/ranger/pull/1367

   
   ## What changes were proposed in this pull request?
   
   The above patch is fix for the jira 
   https://issues.apache.org/jira/browse/RANGER-5873
   Issue it is addressing :-
   In recent the default authentication in apache ranger has been changed from 
Unix auth to PAM auth , due to which the test suites 
functional-tests/servicerest and functional-tests/tagrest which were creating 
the test users through api calls were experiencing heavy latency  . 
   Reason ;
   The users were not present as os users due to which the PAM authentication 
was failing and imposing a time penalty of 2.4 to 3 seconds per call  before 
defaulting to ranger db for authentication , making the overall test suit 
taking several minutes to execute . 
   
   Solution :-
   In this patch the conftest of  functional-tests/servicerest and 
functional-tests/tagrest has been modified to 
   
   step 1> It is checked if ranger machine user is present as secondary user  
in shadow group in ranger container , if not it is added in the shadow group of 
the ranger container and the container is restarted . If the ranger user is 
present in the shadow group of the ranger container then this step will be 
skipped . 
   
   step 2 > All the users which we are going to create for our testing purpose 
will be added  as os users in the ranger container before creating them in the 
ranger db by api calls . 
   
   step 3> Cleanup :- once all the tests are completed all the users added as  
os users will be removed form ranger container for sanity purpose **But**  
ranger  machine user is not removed form the shadow group so that we do not 
have to wait for  additional 10 to 15 seconds restarting the container when the 
test suite is run for the second time 
   
   Impact :- 
   The above change is reduing latency from 300 seconds to 
   1> 11 seconds per test suite if  ranger machine user is not present in 
shadow groups in ranger container 
   else
   2>3-4 seconds if ranger machine user is present in shadow groups from 
previous test suite  executions  .  
   
   
   ## How was this patch tested?
   This patch has been tested locally  . 
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to