cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From edi...@apache.org
Subject git commit: updated refs/heads/4.2-forward to 6b4aed2
Date Wed, 28 Aug 2013 01:08:49 GMT
Updated Branches:
  refs/heads/4.2-forward 4c6ec5f3c -> 6b4aed2ac


CLOUDSTACK-3535: fix regression introduced in 5d9fa5d42e13a8c8ee10df14c466f66de678e954


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/6b4aed2a
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/6b4aed2a
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/6b4aed2a

Branch: refs/heads/4.2-forward
Commit: 6b4aed2acacb1663cfd3955cc64bc84adef402bc
Parents: 4c6ec5f
Author: Edison Su <sudison@gmail.com>
Authored: Tue Aug 27 18:08:06 2013 -0700
Committer: Edison Su <sudison@gmail.com>
Committed: Tue Aug 27 18:08:33 2013 -0700

----------------------------------------------------------------------
 .../cloudstack/storage/volume/VolumeServiceImpl.java  |  1 +
 .../kvm/src/com/cloud/ha/KVMInvestigator.java         | 14 +++++++++-----
 .../src/com/cloud/vm/VirtualMachineManagerImpl.java   |  8 ++++++--
 3 files changed, 16 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6b4aed2a/engine/storage/volume/src/org/apache/cloudstack/storage/volume/VolumeServiceImpl.java
----------------------------------------------------------------------
diff --git a/engine/storage/volume/src/org/apache/cloudstack/storage/volume/VolumeServiceImpl.java
b/engine/storage/volume/src/org/apache/cloudstack/storage/volume/VolumeServiceImpl.java
index faa8151..8a97c1e 100644
--- a/engine/storage/volume/src/org/apache/cloudstack/storage/volume/VolumeServiceImpl.java
+++ b/engine/storage/volume/src/org/apache/cloudstack/storage/volume/VolumeServiceImpl.java
@@ -522,6 +522,7 @@ public class VolumeServiceImpl implements VolumeService {
         if (result.isSuccess()) {
             vo.processEvent(Event.OperationSuccessed, result.getAnswer());
         } else {
+
             vo.processEvent(Event.OperationFailed);
             volResult.setResult(result.getResult());
         }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6b4aed2a/plugins/hypervisors/kvm/src/com/cloud/ha/KVMInvestigator.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/kvm/src/com/cloud/ha/KVMInvestigator.java b/plugins/hypervisors/kvm/src/com/cloud/ha/KVMInvestigator.java
index 1ec48e6..4d8322d 100644
--- a/plugins/hypervisors/kvm/src/com/cloud/ha/KVMInvestigator.java
+++ b/plugins/hypervisors/kvm/src/com/cloud/ha/KVMInvestigator.java
@@ -59,15 +59,19 @@ public class KVMInvestigator extends AdapterBase implements Investigator
{
             return null;
         }
         CheckOnHostCommand cmd = new CheckOnHostCommand(agent);
-        List<HostVO> neighbors = _resourceMgr.listAllHostsInCluster(agent.getClusterId());
+        List<HostVO> neighbors = _resourceMgr.listHostsInClusterByStatus(agent.getClusterId(),
Status.Up);
         for (HostVO neighbor : neighbors) {
             if (neighbor.getId() == agent.getId() || neighbor.getHypervisorType() != Hypervisor.HypervisorType.KVM)
{
                 continue;
             }
-            Answer answer = _agentMgr.easySend(neighbor.getId(), cmd);
-
-            return answer.getResult() ? Status.Down : Status.Up;
-
+            try {
+                Answer answer = _agentMgr.easySend(neighbor.getId(), cmd);
+                if (answer != null) {
+                    return answer.getResult() ? Status.Down : Status.Up;
+                }
+            } catch (Exception e) {
+                s_logger.debug("Failed to send command to host: " + neighbor.getId());
+            }
         }
 
         return null;

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6b4aed2a/server/src/com/cloud/vm/VirtualMachineManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/vm/VirtualMachineManagerImpl.java b/server/src/com/cloud/vm/VirtualMachineManagerImpl.java
index 2f5d51b..11904b9 100755
--- a/server/src/com/cloud/vm/VirtualMachineManagerImpl.java
+++ b/server/src/com/cloud/vm/VirtualMachineManagerImpl.java
@@ -1254,10 +1254,14 @@ public class VirtualMachineManagerImpl extends ManagerBase implements
VirtualMac
 
         } catch (AgentUnavailableException e) {
             s_logger.warn("Unable to stop vm, agent unavailable: " + e.toString());
-            throw e;
+            if (!forced) {
+                throw e;
+            }
         } catch (OperationTimedoutException e) {
             s_logger.warn("Unable to stop vm, operation timed out: " + e.toString());
-            throw e;
+            if (!forced) {
+                throw e;
+            }
         } finally {
             if (!stopped) {
                 if (!forced) {


Mime
View raw message