cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject [3/3] git commit: updated refs/heads/master to 1a47437
Date Wed, 23 Sep 2015 05:52:33 GMT
Merge pull request #863 from borisroman/CLOUDSTACK-8883

[4.6][BLOCKER]CLOUDSTACK-8883: Resolved connect/reconnect issue.Hi!

@wilderrodrigues by implementing Callable you switched a couple of methods and fields. I switched
them some more!

The reason why the Agent wouldn't reconnect was due to two facts.

Problem 1: Selector was blocking.
In the while loop at [1]; was blocking when the connection was lost. This
means at [2] _isStartup = false; was never excecuted. Therefore at [3] the call to isStartup()
always returned true resulting in an infinite loop.

Resolution 1: Move the call to cleanUp() [4] before checking if isStartup() has turned to
false. cleanUp() will close() the _selector resulting in _isStartup to be set to false.

Problem 2: Setting _isStartup & _isRunning to true when init() throwed an unchecked exception
The exception was nicely caught, but only logged. No action was taken! Resulting in _isStartup
& _isRunning being set to true. Resulting in the fact the Agent thought it was connected
successfully, though it wasn't.

Resolution 2: Adding return to the catch statement [5]. This way _isStartup & _isRunning
aren't set to true.

Steps to test:
1. Deploy ACS.
2. Try all combinations of stopping/starting managment server/agent.


* pr/863:
  Added return statement to stop start() if there has been an ConnectException.
  Call cleanUp() before looping isStartup().

Signed-off-by: Rajani Karuturi <>


Branch: refs/heads/master
Commit: 1a474374b9c936ed40a1d83ce8b75ea189f23399
Parents: 86325cb b34f86c
Author: Rajani Karuturi <>
Authored: Wed Sep 23 11:21:39 2015 +0530
Committer: Rajani Karuturi <>
Committed: Wed Sep 23 11:21:41 2015 +0530

 agent/src/com/cloud/agent/                       | 8 +++++---
 utils/src/main/java/com/cloud/utils/nio/ | 1 +
 2 files changed, 6 insertions(+), 3 deletions(-)

View raw message