mirror of https://github.com/apache/cloudstack.git
bug 12404: Fix NPE when delete host
But it's not enough. This happened because delete host logic is missing for Xen. Frank would add it.
This commit is contained in:
parent
b3f861bf8f
commit
dd7ff1d8db
|
|
@ -706,6 +706,12 @@ public class ResourceManagerImpl implements ResourceManager, ResourceService, Ma
|
|||
List<StoragePoolHostVO> pools = _storagePoolHostDao.listByHostIdIncludingRemoved(hostId);
|
||||
|
||||
ResourceStateAdapter.DeleteHostAnswer answer = (ResourceStateAdapter.DeleteHostAnswer) dispatchToStateAdapters(ResourceStateAdapter.Event.DELETE_HOST, false, host, new Boolean(isForced), new Boolean(isForceDeleteStorage));
|
||||
|
||||
if (answer == null) {
|
||||
s_logger.warn("Unable to delete host: " + hostId);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (answer.getIsException()) {
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue