[ 
https://issues.apache.org/jira/browse/AMBARI-26516?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17965212#comment-17965212
 ] 

Vijayakumar Govindasamy commented on AMBARI-26516:
--------------------------------------------------

I am happy to provide a patch. Please assign the ticket to me

> 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
>            Priority: Major
>   Original Estimate: 12h
>  Remaining Estimate: 12h
>
> {*}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-unsubscr...@ambari.apache.org
For additional commands, e-mail: issues-h...@ambari.apache.org

Reply via email to