[
https://issues.apache.org/jira/browse/AMBARI-26516?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17965495#comment-17965495
]
Vijayakumar Govindasamy commented on AMBARI-26516:
--------------------------------------------------
[~arshad.mohammad] Thank you very much!
> 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: 3.0.0, 2.7.5
> Environment: All Enviroments
> Reporter: Vijayakumar Govindasamy
> Assignee: Vijayakumar Govindasamy
> Priority: Major
> Fix For: 3.1.0
>
> Original Estimate: 12h
> Time Spent: 20m
> Remaining Estimate: 11h 40m
>
> {*}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]