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

Ship it!


Ship It!

- Dmytro Sen


On Дек. 5, 2015, 1:01 д.п., Aravindan Vijayan wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/41006/
> -----------------------------------------------------------
> 
> (Updated Дек. 5, 2015, 1:01 д.п.)
> 
> 
> Review request for Ambari, Dmytro Sen, Sumit Mohanty, and Sid Wagle.
> 
> 
> Bugs: AMBARI-14226
>     https://issues.apache.org/jira/browse/AMBARI-14226
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> PROBLEM
> 
> AMS service check throws the following error and exits when AMS has just 
> started up and HBase is not in proper state.
> 
> Traceback (most recent call last):
> File 
> "/var/lib/ambari-agent/cache/common-services/AMBARI_METRICS/0.1.0/package/scripts/service_check.py",
>  line 165, in <module>
> AMSServiceCheck().execute()
> File 
> "/usr/lib/python2.6/site-packages/resource_management/libraries/script/script.py",
>  line 217, in execute
> method(env)
> File "/usr/lib/python2.6/site-packages/ambari_commons/os_family_impl.py", 
> line 89, in thunk
> return fn(*args, **kwargs)
> File 
> "/var/lib/ambari-agent/cache/common-services/AMBARI_METRICS/0.1.0/package/scripts/service_check.py",
>  line 95, in service_check
> response = conn.getresponse()
> File "/usr/lib64/python2.7/httplib.py", line 1045, in getresponse
> response.begin()
> File "/usr/lib64/python2.7/httplib.py", line 409, in begin
> version, status, reason = self._read_status()
> File "/usr/lib64/python2.7/httplib.py", line 373, in _read_status
> raise BadStatusLine(line)
> httplib.BadStatusLine: ''
> 
> BUG
> In service_check.py, we make a call to conn.getresponse() after the "catch" 
> block, thereby making the assumption that the response is always OK at this 
> step. But there are are rare cases when conn.request() can be OK and 
> conn.getresponse() gives out BadStatusException (subclass of HttpException).
> 
> FIX
> Moving conn.getresponse() to a place before the exception catch block.
> 
> 
> Diffs
> -----
> 
>   
> ambari-server/src/main/resources/common-services/AMBARI_METRICS/0.1.0/package/scripts/service_check.py
>  d2c0cbb 
> 
> Diff: https://reviews.apache.org/r/41006/diff/
> 
> 
> Testing
> -------
> 
> Manual Testing done. 
> 
> Python unit tests pass (3 failures are unrelated).
> 
> 
> Thanks,
> 
> Aravindan Vijayan
> 
>

Reply via email to