From 6727e48b7e29e87b6623facb8f94ee7954bb7def Mon Sep 17 00:00:00 2001 From: Rene Peinthor Date: Fri, 16 May 2025 09:02:01 +0200 Subject: [PATCH] linstor: fix host connect recursion regression PR #9873 changed the default implementation of hostConnect on the DefaultHostListener, and Linstor tried to call the none existent default implementation. With the change in the PR a recursion was triggered that triggered a StackOverflow and stopped adding Linstor primary storage. --- .../storage/datastore/provider/LinstorHostListener.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/plugins/storage/volume/linstor/src/main/java/org/apache/cloudstack/storage/datastore/provider/LinstorHostListener.java b/plugins/storage/volume/linstor/src/main/java/org/apache/cloudstack/storage/datastore/provider/LinstorHostListener.java index da458002f6d7..534431ed681b 100644 --- a/plugins/storage/volume/linstor/src/main/java/org/apache/cloudstack/storage/datastore/provider/LinstorHostListener.java +++ b/plugins/storage/volume/linstor/src/main/java/org/apache/cloudstack/storage/datastore/provider/LinstorHostListener.java @@ -18,7 +18,6 @@ import com.cloud.exception.StorageConflictException; import com.cloud.host.HostVO; -import org.apache.cloudstack.storage.datastore.db.StoragePoolVO; public class LinstorHostListener extends DefaultHostListener { @Override @@ -28,7 +27,6 @@ public boolean hostConnect(long hostId, long poolId) throws StorageConflictExcep host.setParent(host.getName()); hostDao.update(host.getId(), host); } - StoragePoolVO pool = primaryStoreDao.findById(poolId); - return super.hostConnect(host, pool); + return super.hostConnect(hostId, poolId); } }