Dmitry Lysnichenko created AMBARI-4323:
------------------------------------------

             Summary: Add ability to an agent to clear the ActionQueue
                 Key: AMBARI-4323
                 URL: https://issues.apache.org/jira/browse/AMBARI-4323
             Project: Ambari
          Issue Type: Improvement
          Components: agent, controller
    Affects Versions: 1.5.0
            Reporter: Dmitry Lysnichenko
            Assignee: Dmitry Lysnichenko
             Fix For: 1.5.0


- add new command type CLEAR_QUEUE both on agent and server 
- server sends this command:
1)  when some command times out
2)  after agent registration (to cancel any commands from the previous session)
- add new possible command report state ABORTED to the server
- when agent receives CLEAR_QUEUE command, it immediately removes all scheduled 
commands from the queue and for every command in the queue send the command 
report with ABORTED state.

Some notes on implementation:
Cancelling commands that are not executed yet requires relatively small effort.

Cancelling command in progress is possible (we may invoke kill-on-timeout 
callback method manually or via event, effectively killing all subprocesses), 
but may occasionally leave system configuration in a broken state.  

Or,  instead of clear Queue, we should probably send KILL TASK or something to 
kill specific tasks or remove them in the queue. If we choose to do so, we may 
also manage task timeouts only at the server.



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Reply via email to