-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/36771/
-----------------------------------------------------------
Review request for Ambari, Andrew Onischuk and Sumit Mohanty.
Bugs: AMBARI-12522
https://issues.apache.org/jira/browse/AMBARI-12522
Repository: ambari
Description
-------
Patch tries to load and register traceback handler if it is available, and
skips if not. Also it fixes binding signal handlers twice during agent start.
To install faulthandler under Centos 6 (faulthandler is not included to default
distribution of Python 2.x), we have to perform:
yum install python-devel gcc -y
# install setup tools
curl https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py | python -
# install pip
curl https://raw.github.com/pypa/pip/master/contrib/get-pip.py | python -
easy_install faulthandler
If faulthandler module is available, agent posts Registered faulthandler to
agent out file.
After that, we start agent and can dump tracebacks for all running threads like
that:
# kill -USR1 `cat /var/run/ambari-agent/ambari-agent.pid`
# cat /var/log/ambari-agent/ambari-agent.out
Diffs
-----
ambari-agent/src/main/python/ambari_agent/HeartbeatHandlers.py f9d0e14
ambari-agent/src/main/python/ambari_agent/main.py 0971cbb
ambari-agent/src/test/python/ambari_agent/TestMain.py 6218b59
Diff: https://reviews.apache.org/r/36771/diff/
Testing
-------
test_invalid (TestFileSystem.TestFileSystem) ... ok
----------------------------------------------------------------------
Ran 410 tests in 6.028s
OK
Process finished with exit code 0
Thanks,
Dmitro Lisnichenko