Skip to content

Commit 26dcad9

Browse files
Fix local storage pool disconnect issue
1 parent 6059724 commit 26dcad9

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

server/src/main/java/com/cloud/storage/listener/StoragePoolMonitor.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,6 @@ public void processConnect(Host host, StartupCommand cmd, boolean forRebalance)
168168
throw new ConnectionException(true, String.format("Unable to prepare OCFS2 nodes for pool %s", pool));
169169
}
170170

171-
Long hostId = host.getId();
172171
if (logger.isDebugEnabled()) {
173172
logger.debug("Host {} connected, connecting host to shared pool {} and sending storage pool information ...", host, pool);
174173
}
@@ -185,6 +184,9 @@ public void processConnect(Host host, StartupCommand cmd, boolean forRebalance)
185184
// Disconnect any pools which are not expected to be connected
186185
for (StoragePoolHostVO poolToDisconnect: previouslyConnectedPools) {
187186
StoragePoolVO pool = _poolDao.findById(poolToDisconnect.getPoolId());
187+
if (!pool.isShared()) {
188+
continue;
189+
}
188190
try {
189191
_storageManager.disconnectHostFromSharedPool(host, pool);
190192
_storagePoolHostDao.deleteStoragePoolHostDetails(host.getId(), pool.getId());

0 commit comments

Comments
 (0)