You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ambari.apache.org by "Vijayakumar Govindasamy (Jira)" <ji...@apache.org> on 2025/06/12 05:14:00 UTC
[jira] [Created] (AMBARI-26516) Ambari Agent hung when ambari server sends agent restart action
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: issues-unsubscribe@ambari.apache.org
For additional commands, e-mail: issues-help@ambari.apache.org