Vijayakumar Govindasamy created AMBARI-26516:
------------------------------------------------
Summary: Ambari Agent hung when ambari server sends agent restart
action
Key: AMBARI-26516
URL: https://issues.apache.org/jira/browse/AMBARI-26516
Project: Ambari
Issue Type: Bug
Components: ambari-agent
Affects Versions: 2.7.5, 3.0.0
Environment: All Enviroments
Reporter: Vijayakumar Govindasamy
{*}Problem{*}:
When ambari agent is not reporting to server for a period of time and tries to
resume the reporting, Ambari Server requests agent auto restart action. Due to
a bug in the code, Agent auto restart fails and hungs in the same state.
{*}Problematic code{*}:
Utils.py
{code:java}
def restartAgent(stop_event, graceful_stop_timeout=30):
ExitHelper().exitcode = AGENT_AUTO_RESTART_EXIT_CODE
stop_event.set()
t = threading.Timer( graceful_stop_timeout, ExitHelper().exit,
[AGENT_AUTO_RESTART_EXIT_CODE])
t.start() {code}
*Fix:*
{code:java}
def restartAgent(stop_event, graceful_stop_timeout=30):
exit_helper = ExitHelper()
exit_helper.exitcode = AGENT_AUTO_RESTART_EXIT_CODE
stop_event.set()
t = threading.Timer( graceful_stop_timeout, exit_helper.exit)
t.start() {code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]