Re: [DISCUSS][ASK] Should agent wait for pending tasks on (mgmt server) disconnection?

2018-05-16 Thread Marc-Aurèle Brothier
Hi Suresh, As long as the TCP link isn't closed, you can have network hiccups without any issue. If the link is close, the event is propagated on the management server and on the agent side and there's isn't much that can be done to address this easily with the current code base. Marc-Aurèle On

Re: [DISCUSS][ASK] Should agent wait for pending tasks on (mgmt server) disconnection?

2018-05-16 Thread Rohit Yadav
Hi Suresh, As explained earlier and advised to look at code on the PR, perhaps you did not get time so have a look here: https://github.com/apache/cloudstack/blob/4.11/agent/src/com/cloud/agent/Agent.java#L488 The reconnect() historically sets the link to null. Therefore, any answer from

Re: [DISCUSS][ASK] Should agent wait for pending tasks on (mgmt server) disconnection?

2018-05-16 Thread Suresh Kumar Anaparti
Hi Rohit, When Management Server and Agent are up and running and there is a network failure, I think it is better to wait for some time for the pending tasks to complete, instead of failing them and try reconnecting. If network delay is minimal, there can be a valid thread/context in the

Re: [DISCUSS][ASK] Should agent wait for pending tasks on (mgmt server) disconnection?

2018-05-16 Thread Rohit Yadav
All, Based on testing against KVM, XenServer and VMware and this discussion, I'll merged the PR based on code reviews and tests. I investigated both code-wise and against live environment for possible side-effects of letting agent connect without being blocked on pending tasks and I found no