mirror of https://github.com/apache/cloudstack.git
bug CS-16373: Send Maintenance command to KVM hosts during cluster unmanage
status CS-16373: resolved fixed reviewed-by: Abhi
This commit is contained in:
parent
4aaafd1992
commit
cb5386391c
|
|
@ -86,6 +86,8 @@ import com.cloud.utils.component.Manager;
|
|||
import com.cloud.utils.db.DB;
|
||||
import com.cloud.utils.db.Transaction;
|
||||
import com.cloud.utils.exception.CloudRuntimeException;
|
||||
import com.cloud.agent.api.MaintainCommand;
|
||||
import com.cloud.agent.api.MaintainAnswer;
|
||||
|
||||
@Local({ ResourceManager.class, ResourceService.class })
|
||||
public class ResourceManagerImpl implements ResourceManager, ResourceService, Manager {
|
||||
|
|
@ -782,6 +784,9 @@ public class ResourceManagerImpl implements ResourceManager, ResourceService, Ma
|
|||
|
||||
for( HostVO host : hosts ) {
|
||||
if ( host.getStatus().equals(Status.Up )) {
|
||||
if (host.getHypervisorType() == HypervisorType.KVM) {
|
||||
MaintainAnswer answer = (MaintainAnswer) _agentMgr.easySend(host.getId(), new MaintainCommand());
|
||||
}
|
||||
_agentMgr.disconnect(host.getId());
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue