mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
Fix local storage pool disconnect issue (#11200)
This commit is contained in:
parent
d693736ee8
commit
9fee6dae34
@ -168,7 +168,6 @@ public class StoragePoolMonitor implements Listener {
|
|||||||
throw new ConnectionException(true, String.format("Unable to prepare OCFS2 nodes for pool %s", pool));
|
throw new ConnectionException(true, String.format("Unable to prepare OCFS2 nodes for pool %s", pool));
|
||||||
}
|
}
|
||||||
|
|
||||||
Long hostId = host.getId();
|
|
||||||
if (logger.isDebugEnabled()) {
|
if (logger.isDebugEnabled()) {
|
||||||
logger.debug("Host {} connected, connecting host to shared pool {} and sending storage pool information ...", host, pool);
|
logger.debug("Host {} connected, connecting host to shared pool {} and sending storage pool information ...", host, pool);
|
||||||
}
|
}
|
||||||
@ -185,6 +184,9 @@ public class StoragePoolMonitor implements Listener {
|
|||||||
// Disconnect any pools which are not expected to be connected
|
// Disconnect any pools which are not expected to be connected
|
||||||
for (StoragePoolHostVO poolToDisconnect: previouslyConnectedPools) {
|
for (StoragePoolHostVO poolToDisconnect: previouslyConnectedPools) {
|
||||||
StoragePoolVO pool = _poolDao.findById(poolToDisconnect.getPoolId());
|
StoragePoolVO pool = _poolDao.findById(poolToDisconnect.getPoolId());
|
||||||
|
if (!pool.isShared()) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
try {
|
try {
|
||||||
_storageManager.disconnectHostFromSharedPool(host, pool);
|
_storageManager.disconnectHostFromSharedPool(host, pool);
|
||||||
_storagePoolHostDao.deleteStoragePoolHostDetails(host.getId(), pool.getId());
|
_storagePoolHostDao.deleteStoragePoolHostDetails(host.getId(), pool.getId());
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user