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


Ship it!




Ship It!

- Sandor Magyari


On Feb. 7, 2017, 2:57 p.m., Attila Doroszlai wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/56390/
> -----------------------------------------------------------
> 
> (Updated Feb. 7, 2017, 2:57 p.m.)
> 
> 
> Review request for Ambari, Sandor Magyari, Sumit Mohanty, and Sebastian 
> Toader.
> 
> 
> Bugs: AMBARI-19895
>     https://issues.apache.org/jira/browse/AMBARI-19895
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> 1. `stdout` can be `None` if firewall status in `run_command()` check fails 
> with `Exception` (which it catches).  `check_result()` on CentOS7 assumes 
> `stdout` is a string.  This results in error that causes `ambari-server 
> setup` to fail with error:
> 
> ```
> ERROR: Unexpected AttributeError: 'NoneType' object has no attribute 'split'
> ```
> 
> 2. `Logger.logger` is not initialized in `serverSetup.py`, so 
> `Logger.logger.isEnabledFor()` from `shell.call` fails.  This results in 
> warning message:
> 
> ```
> WARNING: Unable to check firewall status: 'NoneType' object has no attribute 
> 'isEnabledFor'
> ```
> 
> 
> Diffs
> -----
> 
>   ambari-common/src/main/python/ambari_commons/firewall.py 
> 43983ca64651e44092ae257c224a576cfe5de051 
>   ambari-common/src/main/python/resource_management/core/logger.py 
> b86eff8d5ec58157a7834ccc6fb6d154b04ccb95 
>   ambari-common/src/main/python/resource_management/core/shell.py 
> f8f056a7b3f572e84700f9b1f2749099d144a4b0 
> 
> Diff: https://reviews.apache.org/r/56390/diff/
> 
> 
> Testing
> -------
> 
> Tested manually on CentOS7 with both active and inactive `firewalld`.
> 
> ```
> $ systemctl start firewalld
> $ ambari-server setup
> ...
> Checking firewall status...
> WARNING: iptables is running. Confirm the necessary Ambari ports are 
> accessible. Refer to the Ambari documentation for more details on ports.
> OK to continue [y/n] (y)? n
> ...
> 
> $ systemctl stop firewalld
> $ ambari-server setup
> ...
> Checking firewall status...
> Checking JDK...
> ...
> Ambari Server 'setup' completed successfully.
> ```
> 
> Unit tests:
> 
> ```
> $ mvn -am -pl ambari-server,ambari-agent -Drat.skip -Dcheckstyle.skip 
> -DskipSurefireTests -DfailIfNoTests=false clean test
> ...
> Total run:1182
> Total errors:0
> Total failures:0
> OK
> ...
> Ran 455 tests in 24.288s
> 
> OK
> ...
> [INFO] Ambari Server ..................................... SUCCESS [1:26.424s]
> [INFO] Ambari Agent ...................................... SUCCESS [34.094s]
> ```
> 
> 
> Thanks,
> 
> Attila Doroszlai
> 
>

Reply via email to