ambari-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew Onischuk" <aonis...@hortonworks.com>
Subject Re: Review Request 42452: AMBARI-14710 : Add retry logic for REST calls between Ambari and Ranger
Date Thu, 21 Jan 2016 12:23:21 GMT

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



ambari-common/src/main/python/resource_management/libraries/functions/ranger_functions.py
(line 210)
<https://reviews.apache.org/r/42452/#comment176598>

    This will make ranger start more much longer, can we leave the sleep_time as is, but increase
times count.


- Andrew Onischuk


On Jan. 21, 2016, 12:15 p.m., Gautam Borad wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/42452/
> -----------------------------------------------------------
> 
> (Updated Jan. 21, 2016, 12:15 p.m.)
> 
> 
> Review request for Ambari, Alejandro Fernandez, Andrew Onischuk, Jaimin Jetly, Mahadev
Konar, Sumit Mohanty, Selvamohan Neethiraj, Sebastian Toader, and Velmurugan Periasamy.
> 
> 
> Bugs: AMBARI-14710
>     https://issues.apache.org/jira/browse/AMBARI-14710
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> Current implementation of check_ranger_login_urllib2 in ranger_functions.py and ranger_functions_v2.py
triggers the retry logic under the safe_retry decorator only for the Timeout error.
> 
> This logic should be triggered for the exceptions also, to ensure that Ranger Admin is
given enough time to start up before giving up.
> 
> 
> Diffs
> -----
> 
>   ambari-common/src/main/python/resource_management/libraries/functions/ranger_functions.py
c59dc8d 
>   ambari-common/src/main/python/resource_management/libraries/functions/ranger_functions_v2.py
a72be33 
> 
> Diff: https://reviews.apache.org/r/42452/diff/
> 
> 
> Testing
> -------
> 
> * Provision a 3 node cluster with HDFS, Hive, Ranger.
> * Add Ranger after initial cluster bringup
> * Shut down Ranger Admin
> * Enable Ranger for HDFS
> * Start Ranger Admin simultaneously with Namenode Restart
> 
> Observations :
> 
> * The retry logic is triggered
> * Since Ranger is simultaneously coming up in another thread, we hit both the exceptions
as shown in the log below.
> * The component start is not blocked even if Ranger is not up
> 
> ```
> 2016-01-18 07:18:40,583 - Rangeradmin: Skip ranger admin if it's down !
> 2016-01-18 07:18:40,587 - Will retry 4 time(s), caught exception: Connection to Ranger
Admin failed. Reason - [Errno 111] Connection refused.. Sleeping for 8 sec(s)
> 2016-01-18 07:19:08,597 - Will retry 3 time(s), caught exception: Connection to Ranger
Admin failed. Reason - timeout. Sleeping for 8 sec(s)
> 2016-01-18 07:19:18,219 - amb_ranger_admin user is not present, creating user using given
configurations
> 2016-01-18 07:19:18,621 - Ambari admin user creation successful.
> 2016-01-18 07:19:19,514 - Repository created Successfully
> 2016-01-18 07:19:20,194 - Policy updated Successfully
> 2016-01-18 07:19:20,195 - Ranger Repository created successfully and policies updated
successfully providing ambari-qa user all permissions
> ```
> 
> 
> Thanks,
> 
> Gautam Borad
> 
>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message