> On June 13, 2016, 1:53 p.m., Andrew Onischuk wrote:
> > Ship It!
> 
> Masahiro Tanaka wrote:
>     Thank you!
> 
> Masahiro Tanaka wrote:
>     Could you commit it?
> 
> Andrew Onischuk wrote:
>     Done. Please close the reviewboard now.

reverted the patch, apache jira


- Andrew


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


On June 7, 2016, 11:11 a.m., Masahiro Tanaka wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/48309/
> -----------------------------------------------------------
> 
> (Updated June 7, 2016, 11:11 a.m.)
> 
> 
> Review request for Ambari, Andrew Onischuk, Dmytro Sen, Florian Barca, and 
> Yusaku Sako.
> 
> 
> Bugs: AMBARI-17047
>     https://issues.apache.org/jira/browse/AMBARI-17047
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> In firewall.py, `systemctl is-active iptables || systemctl is-active 
> firewalld` is passed to `run_in_shell` function, which splits cmd string by 
> using `shlex.split`.
> 
> run_in_shell function finally calls `subprocess.Popen` with `shell=True`, so 
> the cmd string is evaluated like `Popen(['/bin/sh', '-c', 'systemctl', 
> 'is-active', 'iptables', '||', 'systemctl', 'is-active', 'firewalld'])`. This 
> doesn't returns values as expected, because after args[1] (in this case, 
> after the first `is-active`) are evaluated as sh arguements.
> 
> `systemctl is-active` can take multiple arugments, so we can use it.
> 
> 
> Diffs
> -----
> 
>   ambari-common/src/main/python/ambari_commons/firewall.py 72e6d26 
> 
> Diff: https://reviews.apache.org/r/48309/diff/
> 
> 
> Testing
> -------
> 
> mvn clean test & manual test
> 
> 
> Thanks,
> 
> Masahiro Tanaka
> 
>

Reply via email to