From b050120303ae1c776e768d88a414ed670fc70ead Mon Sep 17 00:00:00 2001 From: Abhinandan Prateek Date: Wed, 12 Oct 2011 12:34:54 +0530 Subject: [PATCH] bug 10588: clearing map so that the vm sync can resume on next connect, in case of failure --- server/src/com/cloud/vm/VirtualMachineManagerImpl.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/server/src/com/cloud/vm/VirtualMachineManagerImpl.java b/server/src/com/cloud/vm/VirtualMachineManagerImpl.java index 87944f14db6..803c13f4155 100755 --- a/server/src/com/cloud/vm/VirtualMachineManagerImpl.java +++ b/server/src/com/cloud/vm/VirtualMachineManagerImpl.java @@ -1947,8 +1947,10 @@ public class VirtualMachineManagerImpl implements VirtualMachineManager, Listene try { long seq_no=_agentMgr.send(agentId, syncCmd, this); _syncCommandMap.put(clusterId +"", syncCmd); - } catch (AgentUnavailableException e1) { - e1.printStackTrace(); + s_logger.debug("Cluster VM sync started with jobid " + seq_no); + } catch (AgentUnavailableException e) { + s_logger.fatal("The Cluster VM sync process failed with ", e); + _syncCommandMap.remove(clusterId); // remove so that connecting next host can start the sync } } }