mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
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
50f9bdb2b9
commit
72db00c1c7
@ -113,6 +113,7 @@ import com.cloud.host.Status.Event;
|
|||||||
import com.cloud.host.dao.HostDao;
|
import com.cloud.host.dao.HostDao;
|
||||||
import com.cloud.host.dao.HostDetailsDao;
|
import com.cloud.host.dao.HostDetailsDao;
|
||||||
import com.cloud.host.dao.HostTagsDao;
|
import com.cloud.host.dao.HostTagsDao;
|
||||||
|
import com.cloud.hypervisor.HypervisorGuruManager;
|
||||||
import com.cloud.hypervisor.Hypervisor.HypervisorType;
|
import com.cloud.hypervisor.Hypervisor.HypervisorType;
|
||||||
import com.cloud.hypervisor.kvm.resource.KvmDummyResourceBase;
|
import com.cloud.hypervisor.kvm.resource.KvmDummyResourceBase;
|
||||||
import com.cloud.network.IPAddressVO;
|
import com.cloud.network.IPAddressVO;
|
||||||
@ -237,6 +238,10 @@ public class AgentManagerImpl implements AgentManager, HandlerFactory, Manager {
|
|||||||
|
|
||||||
@Inject StorageService _storageSvr = null;
|
@Inject StorageService _storageSvr = null;
|
||||||
@Inject StorageManager _storageMgr = null;
|
@Inject StorageManager _storageMgr = null;
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
protected HypervisorGuruManager _hvGuruMgr;
|
||||||
|
|
||||||
|
|
||||||
protected int _retry = 2;
|
protected int _retry = 2;
|
||||||
|
|
||||||
@ -572,7 +577,9 @@ public class AgentManagerImpl implements AgentManager, HandlerFactory, Manager {
|
|||||||
}
|
}
|
||||||
Answer answer = null;
|
Answer answer = null;
|
||||||
try {
|
try {
|
||||||
answer = easySend(host.getId(), cmd);
|
|
||||||
|
long targetHostId = _hvGuruMgr.getGuruProcessedCommandTargetHost(host.getId(), cmd);
|
||||||
|
answer = easySend(targetHostId, cmd);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
}
|
}
|
||||||
if (answer != null) {
|
if (answer != null) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user