[ 
https://issues.apache.org/jira/browse/AMBARI-17047?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15364479#comment-15364479
 ] 

Hudson commented on AMBARI-17047:
---------------------------------

FAILURE: Integrated in Ambari-trunk-Commit #5237 (See 
[https://builds.apache.org/job/Ambari-trunk-Commit/5237/])
AMBARI-17047. AMBARI-17047: Firewall check returns WARNING even if (aonishuk: 
[http://git-wip-us.apache.org/repos/asf?p=ambari.git&a=commit&h=c65e53e1c503ca9e4e465d4529f6aabdab296f1c])
* ambari-common/src/main/python/ambari_commons/firewall.py


> Firewall check returns WARNING even if iptables and firewalld are stopped on 
> CentOS7
> ------------------------------------------------------------------------------------
>
>                 Key: AMBARI-17047
>                 URL: https://issues.apache.org/jira/browse/AMBARI-17047
>             Project: Ambari
>          Issue Type: Bug
>          Components: ambari-agent, ambari-server
>    Affects Versions: trunk
>         Environment: CentOS7.2
>            Reporter: Masahiro Tanaka
>            Assignee: Masahiro Tanaka
>              Labels: patch
>         Attachments: AMBARI-17047.patch
>
>
> 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.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to