You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ambari.apache.org by Jonathan Hurley <jh...@hortonworks.com> on 2014/05/06 18:08:18 UTC
Review Request 21116: iptables host check warning shows on centos 5.9 even
if iptables are stopped
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/21116/
-----------------------------------------------------------
Review request for Ambari, Dmytro Sen and Nate Cole.
Bugs: AMBARI-5686
https://issues.apache.org/jira/browse/AMBARI-5686
Repository: ambari
Description
-------
The iptables check in the Agent was done by spawning a new process for iptables and checking the result against a pre-determined string value. This did not work on CentOS 5.x as the string values were different and the -S option was not available. Instead, we are now using the return code from the "service" command to determine the state of iptables.
Diffs
-----
ambari-agent/src/main/python/ambari_agent/HostInfo.py 8e0cf90
ambari-agent/src/test/python/ambari_agent/TestHostInfo.py 627261d
Diff: https://reviews.apache.org/r/21116/diff/
Testing
-------
----------------------------------------------------------------------
Ran 304 tests in 3.968s
OK
[INFO]
[INFO] --- apache-rat-plugin:0.10:check (default) @ ambari-agent ---
[INFO] 51 implicit excludes (use -debug for more details).
[INFO] Exclude: src/examples/*
[INFO] Exclude: src/test/python/dummy*.txt
[INFO] Exclude: src/test/python/ambari_agent/dummy_files/*
[INFO] Exclude: src/test/python/ambari_agent/dummy*.txt
[INFO] Exclude: src/main/python/ambari_agent/imports.txt
[INFO] Exclude: src/main/puppet/modules/stdlib/**
[INFO] Exclude: **/*.erb
[INFO] Exclude: **/*.json
[INFO] 548 resources included (use -debug for more details)
[INFO] Rat check: Summary of files. Unapproved: 0 unknown: 0 generated: 0 approved: 407 licence.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 6.073s
[INFO] Finished at: Tue May 06 11:55:02 EDT 2014
[INFO] Final Memory: 7M/81M
[INFO] ------------------------------------------------------------------------
Thanks,
Jonathan Hurley
Re: Review Request 21116: iptables host check warning shows on centos 5.9
even if iptables are stopped
Posted by Nate Cole <nc...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/21116/#review42528
-----------------------------------------------------------
Ship it!
Ship It!
- Nate Cole
On May 7, 2014, 4:05 p.m., Jonathan Hurley wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/21116/
> -----------------------------------------------------------
>
> (Updated May 7, 2014, 4:05 p.m.)
>
>
> Review request for Ambari, Dmytro Sen and Nate Cole.
>
>
> Bugs: AMBARI-5686
> https://issues.apache.org/jira/browse/AMBARI-5686
>
>
> Repository: ambari
>
>
> Description
> -------
>
> The iptables check in the Agent was done by spawning a new process for iptables and checking the result against a pre-determined string value. This did not work on CentOS 5.x as the string values were different and the -S option was not available. Instead, we are now using the return code from the "service" command to determine the state of iptables.
>
>
> Diffs
> -----
>
> ambari-agent/src/main/python/ambari_agent/HostInfo.py 8e0cf90
> ambari-agent/src/test/python/ambari_agent/TestHostInfo.py 627261d
> ambari-agent/src/test/python/ambari_agent/TestRegistration.py c4e074d
>
> Diff: https://reviews.apache.org/r/21116/diff/
>
>
> Testing
> -------
>
> ----------------------------------------------------------------------
> Ran 305 tests in 5.993s
>
> OK
> [INFO]
> [INFO] --- apache-rat-plugin:0.10:check (default) @ ambari-agent ---
> [INFO] 51 implicit excludes (use -debug for more details).
> [INFO] Exclude: src/examples/*
> [INFO] Exclude: src/test/python/dummy*.txt
> [INFO] Exclude: src/test/python/ambari_agent/dummy_files/*
> [INFO] Exclude: src/test/python/ambari_agent/dummy*.txt
> [INFO] Exclude: src/main/python/ambari_agent/imports.txt
> [INFO] Exclude: src/main/puppet/modules/stdlib/**
> [INFO] Exclude: **/*.erb
> [INFO] Exclude: **/*.json
> [INFO] 550 resources included (use -debug for more details)
> Warning: org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser: Property 'http://www.oracle.com/xml/jaxp/properties/entityExpansionLimit' is not recognized.
> Warning: org.apache.xerces.parsers.SAXParser: Feature 'http://javax.xml.XMLConstants/feature/secure-processing' is not recognized.
> Warning: org.apache.xerces.parsers.SAXParser: Property 'http://www.oracle.com/xml/jaxp/properties/entityExpansionLimit' is not recognized.
> [INFO] Rat check: Summary of files. Unapproved: 0 unknown: 0 generated: 0 approved: 408 licence.
> [INFO] ------------------------------------------------------------------------
> [INFO] BUILD SUCCESS
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: 8.384s
> [INFO] Finished at: Wed May 07 15:55:39 EDT 2014
> [INFO] Final Memory: 7M/81M
> [INFO] ------------------------------------------------------------------------
>
>
> Thanks,
>
> Jonathan Hurley
>
>
Re: Review Request 21116: iptables host check warning shows on centos 5.9
even if iptables are stopped
Posted by Jonathan Hurley <jh...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/21116/
-----------------------------------------------------------
(Updated May 7, 2014, 4:05 p.m.)
Review request for Ambari, Dmytro Sen and Nate Cole.
Changes
-------
Updating Python test output.
Bugs: AMBARI-5686
https://issues.apache.org/jira/browse/AMBARI-5686
Repository: ambari
Description
-------
The iptables check in the Agent was done by spawning a new process for iptables and checking the result against a pre-determined string value. This did not work on CentOS 5.x as the string values were different and the -S option was not available. Instead, we are now using the return code from the "service" command to determine the state of iptables.
Diffs
-----
ambari-agent/src/main/python/ambari_agent/HostInfo.py 8e0cf90
ambari-agent/src/test/python/ambari_agent/TestHostInfo.py 627261d
ambari-agent/src/test/python/ambari_agent/TestRegistration.py c4e074d
Diff: https://reviews.apache.org/r/21116/diff/
Testing (updated)
-------
----------------------------------------------------------------------
Ran 305 tests in 5.993s
OK
[INFO]
[INFO] --- apache-rat-plugin:0.10:check (default) @ ambari-agent ---
[INFO] 51 implicit excludes (use -debug for more details).
[INFO] Exclude: src/examples/*
[INFO] Exclude: src/test/python/dummy*.txt
[INFO] Exclude: src/test/python/ambari_agent/dummy_files/*
[INFO] Exclude: src/test/python/ambari_agent/dummy*.txt
[INFO] Exclude: src/main/python/ambari_agent/imports.txt
[INFO] Exclude: src/main/puppet/modules/stdlib/**
[INFO] Exclude: **/*.erb
[INFO] Exclude: **/*.json
[INFO] 550 resources included (use -debug for more details)
Warning: org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser: Property 'http://www.oracle.com/xml/jaxp/properties/entityExpansionLimit' is not recognized.
Warning: org.apache.xerces.parsers.SAXParser: Feature 'http://javax.xml.XMLConstants/feature/secure-processing' is not recognized.
Warning: org.apache.xerces.parsers.SAXParser: Property 'http://www.oracle.com/xml/jaxp/properties/entityExpansionLimit' is not recognized.
[INFO] Rat check: Summary of files. Unapproved: 0 unknown: 0 generated: 0 approved: 408 licence.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 8.384s
[INFO] Finished at: Wed May 07 15:55:39 EDT 2014
[INFO] Final Memory: 7M/81M
[INFO] ------------------------------------------------------------------------
Thanks,
Jonathan Hurley
Re: Review Request 21116: iptables host check warning shows on centos 5.9
even if iptables are stopped
Posted by Jonathan Hurley <jh...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/21116/
-----------------------------------------------------------
(Updated May 7, 2014, 4:04 p.m.)
Review request for Ambari, Dmytro Sen and Nate Cole.
Changes
-------
Some linux distributions don't use the 'service iptables status" model. Updated the code to detect the linux type and choose a different command. Note that some of the commands don't report the result on the result code, so the stdout is used in these cases.
Manually tested the Python file on: CentOS5.9, CentOS6.4
Manually tested the commands on Ubuntu, SUSE Enterprise
Bugs: AMBARI-5686
https://issues.apache.org/jira/browse/AMBARI-5686
Repository: ambari
Description
-------
The iptables check in the Agent was done by spawning a new process for iptables and checking the result against a pre-determined string value. This did not work on CentOS 5.x as the string values were different and the -S option was not available. Instead, we are now using the return code from the "service" command to determine the state of iptables.
Diffs (updated)
-----
ambari-agent/src/main/python/ambari_agent/HostInfo.py 8e0cf90
ambari-agent/src/test/python/ambari_agent/TestHostInfo.py 627261d
ambari-agent/src/test/python/ambari_agent/TestRegistration.py c4e074d
Diff: https://reviews.apache.org/r/21116/diff/
Testing
-------
----------------------------------------------------------------------
Ran 304 tests in 3.968s
OK
[INFO]
[INFO] --- apache-rat-plugin:0.10:check (default) @ ambari-agent ---
[INFO] 51 implicit excludes (use -debug for more details).
[INFO] Exclude: src/examples/*
[INFO] Exclude: src/test/python/dummy*.txt
[INFO] Exclude: src/test/python/ambari_agent/dummy_files/*
[INFO] Exclude: src/test/python/ambari_agent/dummy*.txt
[INFO] Exclude: src/main/python/ambari_agent/imports.txt
[INFO] Exclude: src/main/puppet/modules/stdlib/**
[INFO] Exclude: **/*.erb
[INFO] Exclude: **/*.json
[INFO] 548 resources included (use -debug for more details)
[INFO] Rat check: Summary of files. Unapproved: 0 unknown: 0 generated: 0 approved: 407 licence.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 6.073s
[INFO] Finished at: Tue May 06 11:55:02 EDT 2014
[INFO] Final Memory: 7M/81M
[INFO] ------------------------------------------------------------------------
Thanks,
Jonathan Hurley
Re: Review Request 21116: iptables host check warning shows on centos 5.9
even if iptables are stopped
Posted by Nate Cole <nc...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/21116/#review42313
-----------------------------------------------------------
ambari-agent/src/main/python/ambari_agent/HostInfo.py
<https://reviews.apache.org/r/21116/#comment76079>
Suse doesn't like this:
suse1101:~ # service iptables status
service: no such service iptables
This command will be indeterminate on that platform.
- Nate Cole
On May 6, 2014, 12:08 p.m., Jonathan Hurley wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/21116/
> -----------------------------------------------------------
>
> (Updated May 6, 2014, 12:08 p.m.)
>
>
> Review request for Ambari, Dmytro Sen and Nate Cole.
>
>
> Bugs: AMBARI-5686
> https://issues.apache.org/jira/browse/AMBARI-5686
>
>
> Repository: ambari
>
>
> Description
> -------
>
> The iptables check in the Agent was done by spawning a new process for iptables and checking the result against a pre-determined string value. This did not work on CentOS 5.x as the string values were different and the -S option was not available. Instead, we are now using the return code from the "service" command to determine the state of iptables.
>
>
> Diffs
> -----
>
> ambari-agent/src/main/python/ambari_agent/HostInfo.py 8e0cf90
> ambari-agent/src/test/python/ambari_agent/TestHostInfo.py 627261d
>
> Diff: https://reviews.apache.org/r/21116/diff/
>
>
> Testing
> -------
>
> ----------------------------------------------------------------------
> Ran 304 tests in 3.968s
>
> OK
> [INFO]
> [INFO] --- apache-rat-plugin:0.10:check (default) @ ambari-agent ---
> [INFO] 51 implicit excludes (use -debug for more details).
> [INFO] Exclude: src/examples/*
> [INFO] Exclude: src/test/python/dummy*.txt
> [INFO] Exclude: src/test/python/ambari_agent/dummy_files/*
> [INFO] Exclude: src/test/python/ambari_agent/dummy*.txt
> [INFO] Exclude: src/main/python/ambari_agent/imports.txt
> [INFO] Exclude: src/main/puppet/modules/stdlib/**
> [INFO] Exclude: **/*.erb
> [INFO] Exclude: **/*.json
> [INFO] 548 resources included (use -debug for more details)
> [INFO] Rat check: Summary of files. Unapproved: 0 unknown: 0 generated: 0 approved: 407 licence.
> [INFO] ------------------------------------------------------------------------
> [INFO] BUILD SUCCESS
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: 6.073s
> [INFO] Finished at: Tue May 06 11:55:02 EDT 2014
> [INFO] Final Memory: 7M/81M
> [INFO] ------------------------------------------------------------------------
>
>
> Thanks,
>
> Jonathan Hurley
>
>