You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ambari.apache.org by Dmytro Grinenko <ha...@gmail.com> on 2015/12/08 13:01:00 UTC

Re: Review Request 39684: AMBARI-13578 : Set 20 seconds timeout for Ranger REST API calls


> On Nov. 3, 2015, 4:29 a.m., Sid Wagle wrote:
> > If call 1 timesout does it make sense to still proceed vs early failure ?
> 
> Gautam Borad wrote:
>     Sid, it makes sense to proceed, since these are the functions that are called from the component. If we break here the component start itself will fail ( which we dont want ).

it will break, socket.timeout exception is not covered at all!


- Dmytro


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


On Oct. 29, 2015, 1:44 p.m., Gautam Borad wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/39684/
> -----------------------------------------------------------
> 
> (Updated Oct. 29, 2015, 1:44 p.m.)
> 
> 
> Review request for Ambari, Alejandro Fernandez, Jaimin Jetly, Mahadev Konar, Sumit Mohanty, Selvamohan Neethiraj, Srimanth Gunturi, Sid Wagle, Velmurugan Periasamy, and Yusaku Sako.
> 
> 
> Bugs: AMBARI-13578
>     https://issues.apache.org/jira/browse/AMBARI-13578
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> Added timeout of 20 seconds for each urllib2 calls for Service Management via Ambari for Ranger.
> 
> 
> Diffs
> -----
> 
>   ambari-common/src/main/python/resource_management/libraries/functions/ranger_functions.py de58976 
>   ambari-common/src/main/python/resource_management/libraries/functions/ranger_functions_v2.py 81658bf 
>   ambari-server/src/main/resources/common-services/RANGER_KMS/0.5.0.2.3/package/scripts/kms.py 69946f7 
> 
> Diff: https://reviews.apache.org/r/39684/diff/
> 
> 
> Testing
> -------
> 
> Checked for timeout of urllib2 calls for Service and User creation for Ranger via Ambari (as part of Enable Plugin)
> 
> ----------------------------------------------------------------------
> Ran 267 tests in 8.404s
> 
> OK
> ----------------------------------------------------------------------
> Total run:861
> Total errors:0
> Total failures:0
> OK
> 
> 
> Thanks,
> 
> Gautam Borad
> 
>


Re: Review Request 39684: AMBARI-13578 : Set 20 seconds timeout for Ranger REST API calls

Posted by Gautam Borad <gb...@gmail.com>.
The code is under a try block and the exception is handled on line #176

 except urllib2.URLError, e:


Thanks.

On Tue, Dec 8, 2015 at 5:31 PM, Dmytro Grinenko <ha...@gmail.com>
wrote:

> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/39684/
>
> On November 3rd, 2015, 4:29 a.m. UTC, *Sid Wagle* wrote:
>
> If call 1 timesout does it make sense to still proceed vs early failure ?
>
> On November 3rd, 2015, 4:49 a.m. UTC, *Gautam Borad* wrote:
>
> Sid, it makes sense to proceed, since these are the functions that are called from the component. If we break here the component start itself will fail ( which we dont want ).
>
> it will break, socket.timeout exception is not covered at all!
>
>
> - Dmytro
>
> On October 29th, 2015, 1:44 p.m. UTC, Gautam Borad wrote:
> Review request for Ambari, Alejandro Fernandez, Jaimin Jetly, Mahadev
> Konar, Sumit Mohanty, Selvamohan Neethiraj, Srimanth Gunturi, Sid Wagle,
> Velmurugan Periasamy, and Yusaku Sako.
> By Gautam Borad.
>
> *Updated Oct. 29, 2015, 1:44 p.m.*
> *Bugs: * AMBARI-13578 <https://issues.apache.org/jira/browse/AMBARI-13578>
> *Repository: * ambari
> Description
>
> Added timeout of 20 seconds for each urllib2 calls for Service Management via Ambari for Ranger.
>
> Testing
>
> Checked for timeout of urllib2 calls for Service and User creation for Ranger via Ambari (as part of Enable Plugin)
> ------------------------------
>
> Ran 267 tests in 8.404s
> OK
>
> Total run:861
> Total errors:0
> Total failures:0
> OK
>
> Diffs
>
>    - ambari-common/src/main/python/resource_management/libraries/functions/ranger_functions.py
>    (de58976)
>    - ambari-common/src/main/python/resource_management/libraries/functions/ranger_functions_v2.py
>    (81658bf)
>    - ambari-server/src/main/resources/common-services/RANGER_KMS/0.5.0.2.3/package/scripts/kms.py
>    (69946f7)
>
> View Diff <https://reviews.apache.org/r/39684/diff/>
>



-- 
Regards,
Gautam.