cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r...@apache.org
Subject [1/2] git commit: updated refs/heads/master to f241455
Date Mon, 26 Oct 2015 05:32:02 GMT
Repository: cloudstack
Updated Branches:
  refs/heads/master 0fd3919e8 -> f241455a6


CLOUDSTACK-8964: Can't create template or volume from snapshot

This issue happens on KVM.
Normally the SSVM will process the CopyCommand from snapshot to template.
However, Ovm3HypervisorGuru chooses a KVM hypervisor to process the CopyCommand.
This is obviously wrong.


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

Branch: refs/heads/master
Commit: ccf5d75cfbe769b34c021ab3653ed318cae25933
Parents: ecc2e2f
Author: Wei Zhou <w.zhou@tech.leaseweb.com>
Authored: Mon Oct 19 20:49:02 2015 +0200
Committer: Wei Zhou <w.zhou@tech.leaseweb.com>
Committed: Fri Oct 23 22:02:24 2015 +0200

----------------------------------------------------------------------
 server/src/com/cloud/hypervisor/HypervisorGuruManagerImpl.java | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ccf5d75c/server/src/com/cloud/hypervisor/HypervisorGuruManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/hypervisor/HypervisorGuruManagerImpl.java b/server/src/com/cloud/hypervisor/HypervisorGuruManagerImpl.java
index ade1b96..4dcd703 100644
--- a/server/src/com/cloud/hypervisor/HypervisorGuruManagerImpl.java
+++ b/server/src/com/cloud/hypervisor/HypervisorGuruManagerImpl.java
@@ -28,6 +28,7 @@ import org.apache.log4j.Logger;
 import org.springframework.stereotype.Component;
 
 import com.cloud.agent.api.Command;
+import com.cloud.host.HostVO;
 import com.cloud.host.dao.HostDao;
 import com.cloud.hypervisor.Hypervisor.HypervisorType;
 import com.cloud.utils.Pair;
@@ -74,7 +75,9 @@ public class HypervisorGuruManagerImpl extends ManagerBase implements Hypervisor
 
     @Override
     public long getGuruProcessedCommandTargetHost(long hostId, Command cmd) {
-        for (HypervisorGuru guru : _hvGuruList) {
+        HostVO host = _hostDao.findById(hostId);
+        HypervisorGuru guru = getGuru(host.getHypervisorType());
+        if (guru != null) {
             Pair<Boolean, Long> result = guru.getCommandHostDelegation(hostId, cmd);
             if (result.first()) {
                 return result.second();


Mime
View raw message