Fix local storage pool disconnect issue (#11200)

This commit is contained in:
Harikrishna 2025-07-28 19:41:12 +05:30 committed by GitHub
parent d693736ee8
commit 9fee6dae34
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -168,7 +168,6 @@ public class StoragePoolMonitor implements Listener {
throw new ConnectionException(true, String.format("Unable to prepare OCFS2 nodes for pool %s", pool));
}
Long hostId = host.getId();
if (logger.isDebugEnabled()) {
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
for (StoragePoolHostVO poolToDisconnect: previouslyConnectedPools) {
StoragePoolVO pool = _poolDao.findById(poolToDisconnect.getPoolId());
if (!pool.isShared()) {
continue;
}
try {
_storageManager.disconnectHostFromSharedPool(host, pool);
_storagePoolHostDao.deleteStoragePoolHostDetails(host.getId(), pool.getId());