mirror of
https://github.com/apache/cloudstack.git
synced 2025-11-03 04:12:31 +01:00
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.
This commit is contained in:
parent
ecc2e2f39d
commit
ccf5d75cfb
@ -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();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user