From 56f0448f0d46e95f50047636000a73fc754fd0be Mon Sep 17 00:00:00 2001 From: Rene Peinthor Date: Thu, 8 Feb 2024 19:27:38 +0100 Subject: [PATCH] Linstor fix migration while node offline (#8610) * linstor: Add util method getBestErrorMessage from main * linstor: failed remove of allow-two-primaries is no fatal error * linstor: Fix failure if a Linstor node is down while migrating If a Linstor node is down while migrating resource, allow-two-primaries setting will fail because we can't reach the downed node. But it will still set the property on the other nodes and migration should work. We now just report an error instead of completely failing. --- .../kvm/storage/LinstorStorageAdaptor.java | 28 +++++++++++++------ .../storage/datastore/util/LinstorUtil.java | 11 ++++++++ 2 files changed, 30 insertions(+), 9 deletions(-) diff --git a/plugins/storage/volume/linstor/src/main/java/com/cloud/hypervisor/kvm/storage/LinstorStorageAdaptor.java b/plugins/storage/volume/linstor/src/main/java/com/cloud/hypervisor/kvm/storage/LinstorStorageAdaptor.java index 3a703cdb426f..426145d9dcc5 100644 --- a/plugins/storage/volume/linstor/src/main/java/com/cloud/hypervisor/kvm/storage/LinstorStorageAdaptor.java +++ b/plugins/storage/volume/linstor/src/main/java/com/cloud/hypervisor/kvm/storage/LinstorStorageAdaptor.java @@ -269,27 +269,35 @@ public boolean connectPhysicalDisk(String volumePath, KVMStoragePool pool, Map