From 0c5100defb5b12378016289dd27fbdc27edcc93d Mon Sep 17 00:00:00 2001 From: Harikrishna Patnala Date: Tue, 15 Jul 2025 14:18:24 +0530 Subject: [PATCH] Fix local storage pool disconnect issue --- .../java/com/cloud/storage/listener/StoragePoolMonitor.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/server/src/main/java/com/cloud/storage/listener/StoragePoolMonitor.java b/server/src/main/java/com/cloud/storage/listener/StoragePoolMonitor.java index 01fcb43c4c4b..b432858f2e06 100644 --- a/server/src/main/java/com/cloud/storage/listener/StoragePoolMonitor.java +++ b/server/src/main/java/com/cloud/storage/listener/StoragePoolMonitor.java @@ -168,7 +168,6 @@ public void processConnect(Host host, StartupCommand cmd, boolean forRebalance) 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 void processConnect(Host host, StartupCommand cmd, boolean forRebalance) // 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());