You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@ambari.apache.org by Attila Doroszlai <ad...@hortonworks.com> on 2017/02/01 15:11:33 UTC

Review Request 56173: AMBARI-19816. Agent heartbeat lost due to dead service check process

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

Review request for Ambari, Andrew Onischuk, Sandor Magyari, Sumit Mohanty, and Sebastian Toader.


Bugs: AMBARI-19816
    https://issues.apache.org/jira/browse/AMBARI-19816


Repository: ambari


Description
-------

Replaced `subprocess.Popen` with `shell.call`, which has optional timeout.


Diffs
-----

  ambari-agent/src/main/python/ambari_agent/HostInfo.py 3810b5240935de35bd75e89c39ac0f0efa26653f 
  ambari-agent/src/test/python/ambari_agent/TestHostInfo.py fcfbc85e19f5c9a66d1b24f3e55df5c3c98ced0b 
  ambari-agent/src/test/python/ambari_agent/TestRegistration.py f5e02889e909b438d34eb57418b9b50892ac9580 
  ambari-agent/src/test/python/unitTests.py b70d2264530a15bfa7f9d008e6152c18321fabcc 
  ambari-common/src/main/python/ambari_commons/firewall.py 6868d3feb859dabb3185dd1505711165ee2839da 
  ambari-server/src/test/python/TestAmbariServer.py 81e1a224644b039e8626f6352aecbe254a4d11aa 

Diff: https://reviews.apache.org/r/56173/diff/


Testing
-------

Manual test:
 * created cluster via blueprint
 * verified NTP service status was healthy
 * induced timeout in NTP/firewall command by adding sleep to `/sbin/service`
 * verified that agent heartbeat continued
 * verified NTP service status was unhealthy, reflected timeout in description
 * ran host checks in install wizard

Unit tests:

```
$ mvn -am -pl ambari-server,ambari-agent -Del.log=OFF -Dcheckstyle.skip -Drat.skip -DskipSurefireTests -DfailIfNoTests=false clean test
...
Total run:1182
Total errors:0
Total failures:0
OK
...
Ran 455 tests in 15.810s

OK
...
[INFO] BUILD SUCCESS
```


Thanks,

Attila Doroszlai


Re: Review Request 56173: AMBARI-19816. Agent heartbeat lost due to dead service check process

Posted by Sebastian Toader <st...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/56173/#review163815
-----------------------------------------------------------


Ship it!




Ship It!

- Sebastian Toader


On Feb. 1, 2017, 4:11 p.m., Attila Doroszlai wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/56173/
> -----------------------------------------------------------
> 
> (Updated Feb. 1, 2017, 4:11 p.m.)
> 
> 
> Review request for Ambari, Andrew Onischuk, Sandor Magyari, Sumit Mohanty, and Sebastian Toader.
> 
> 
> Bugs: AMBARI-19816
>     https://issues.apache.org/jira/browse/AMBARI-19816
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> Replaced `subprocess.Popen` with `shell.call`, which has optional timeout.
> 
> 
> Diffs
> -----
> 
>   ambari-agent/src/main/python/ambari_agent/HostInfo.py 3810b5240935de35bd75e89c39ac0f0efa26653f 
>   ambari-agent/src/test/python/ambari_agent/TestHostInfo.py fcfbc85e19f5c9a66d1b24f3e55df5c3c98ced0b 
>   ambari-agent/src/test/python/ambari_agent/TestRegistration.py f5e02889e909b438d34eb57418b9b50892ac9580 
>   ambari-agent/src/test/python/unitTests.py b70d2264530a15bfa7f9d008e6152c18321fabcc 
>   ambari-common/src/main/python/ambari_commons/firewall.py 6868d3feb859dabb3185dd1505711165ee2839da 
>   ambari-server/src/test/python/TestAmbariServer.py 81e1a224644b039e8626f6352aecbe254a4d11aa 
> 
> Diff: https://reviews.apache.org/r/56173/diff/
> 
> 
> Testing
> -------
> 
> Manual test:
>  * created cluster via blueprint
>  * verified NTP service status was healthy
>  * induced timeout in NTP/firewall command by adding sleep to `/sbin/service`
>  * verified that agent heartbeat continued
>  * verified NTP service status was unhealthy, reflected timeout in description
>  * ran host checks in install wizard
> 
> Unit tests:
> 
> ```
> $ mvn -am -pl ambari-server,ambari-agent -Del.log=OFF -Dcheckstyle.skip -Drat.skip -DskipSurefireTests -DfailIfNoTests=false clean test
> ...
> Total run:1182
> Total errors:0
> Total failures:0
> OK
> ...
> Ran 455 tests in 15.810s
> 
> OK
> ...
> [INFO] BUILD SUCCESS
> ```
> 
> 
> Thanks,
> 
> Attila Doroszlai
> 
>


Re: Review Request 56173: AMBARI-19816. Agent heartbeat lost due to dead service check process

Posted by Sandor Magyari <sm...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/56173/#review163827
-----------------------------------------------------------


Ship it!




Ship It!

- Sandor Magyari


On Feb. 1, 2017, 3:11 p.m., Attila Doroszlai wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/56173/
> -----------------------------------------------------------
> 
> (Updated Feb. 1, 2017, 3:11 p.m.)
> 
> 
> Review request for Ambari, Andrew Onischuk, Sandor Magyari, Sumit Mohanty, and Sebastian Toader.
> 
> 
> Bugs: AMBARI-19816
>     https://issues.apache.org/jira/browse/AMBARI-19816
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> Replaced `subprocess.Popen` with `shell.call`, which has optional timeout.
> 
> 
> Diffs
> -----
> 
>   ambari-agent/src/main/python/ambari_agent/HostInfo.py 3810b5240935de35bd75e89c39ac0f0efa26653f 
>   ambari-agent/src/test/python/ambari_agent/TestHostInfo.py fcfbc85e19f5c9a66d1b24f3e55df5c3c98ced0b 
>   ambari-agent/src/test/python/ambari_agent/TestRegistration.py f5e02889e909b438d34eb57418b9b50892ac9580 
>   ambari-agent/src/test/python/unitTests.py b70d2264530a15bfa7f9d008e6152c18321fabcc 
>   ambari-common/src/main/python/ambari_commons/firewall.py 6868d3feb859dabb3185dd1505711165ee2839da 
>   ambari-server/src/test/python/TestAmbariServer.py 81e1a224644b039e8626f6352aecbe254a4d11aa 
> 
> Diff: https://reviews.apache.org/r/56173/diff/
> 
> 
> Testing
> -------
> 
> Manual test:
>  * created cluster via blueprint
>  * verified NTP service status was healthy
>  * induced timeout in NTP/firewall command by adding sleep to `/sbin/service`
>  * verified that agent heartbeat continued
>  * verified NTP service status was unhealthy, reflected timeout in description
>  * ran host checks in install wizard
> 
> Unit tests:
> 
> ```
> $ mvn -am -pl ambari-server,ambari-agent -Del.log=OFF -Dcheckstyle.skip -Drat.skip -DskipSurefireTests -DfailIfNoTests=false clean test
> ...
> Total run:1182
> Total errors:0
> Total failures:0
> OK
> ...
> Ran 455 tests in 15.810s
> 
> OK
> ...
> [INFO] BUILD SUCCESS
> ```
> 
> 
> Thanks,
> 
> Attila Doroszlai
> 
>