mirror of https://github.com/apache/cloudstack.git
bug 11624: command via AgentManagerImpl.sendTo() needs to be redirect to HypervisorGuru for command filtering, the filtering mechanism is required by VMware hypervisor to redirect storage/snapshot commands to SSVM
This commit is contained in:
parent
c459604fa2
commit
3aba30543c
|
|
@ -113,6 +113,7 @@ import com.cloud.host.Status.Event;
|
|||
import com.cloud.host.dao.HostDao;
|
||||
import com.cloud.host.dao.HostDetailsDao;
|
||||
import com.cloud.host.dao.HostTagsDao;
|
||||
import com.cloud.hypervisor.HypervisorGuruManager;
|
||||
import com.cloud.hypervisor.Hypervisor.HypervisorType;
|
||||
import com.cloud.hypervisor.kvm.resource.KvmDummyResourceBase;
|
||||
import com.cloud.network.IPAddressVO;
|
||||
|
|
@ -237,6 +238,10 @@ public class AgentManagerImpl implements AgentManager, HandlerFactory, Manager {
|
|||
|
||||
@Inject StorageService _storageSvr = null;
|
||||
@Inject StorageManager _storageMgr = null;
|
||||
|
||||
@Inject
|
||||
protected HypervisorGuruManager _hvGuruMgr;
|
||||
|
||||
|
||||
protected int _retry = 2;
|
||||
|
||||
|
|
@ -570,7 +575,9 @@ public class AgentManagerImpl implements AgentManager, HandlerFactory, Manager {
|
|||
}
|
||||
Answer answer = null;
|
||||
try {
|
||||
answer = easySend(host.getId(), cmd);
|
||||
|
||||
long targetHostId = _hvGuruMgr.getGuruProcessedCommandTargetHost(host.getId(), cmd);
|
||||
answer = easySend(targetHostId, cmd);
|
||||
} catch (Exception e) {
|
||||
}
|
||||
if (answer != null) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue