Skip to content

Commit 0f28d52

Browse files
committed
linstor: only send auto_manage_dual_primary when migrating
Linstor controllers older than 1.29 reject requests with unknown properties, so a make-available carrying auto_manage_dual_primary fails against them - which broke every make-available call (and with it template copies and VM starts) even though the live-migrate API is version gated: the generated client initializes fields with their schema default (false here) and serialized everything non-null, so the property was always sent.
1 parent 917f0f7 commit 0f28d52

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

‎plugins/storage/volume/linstor/src/main/java/com/cloud/hypervisor/kvm/storage/LinstorStorageAdaptor.java‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -595,7 +595,10 @@ public boolean connectPhysicalDisk(
595595
// controller >= 1.29 prepares the live migration itself:
596596
// dual-primary for DRBD, activation on both nodes for shared storage pools
597597
ResourceMakeAvailable rma = new ResourceMakeAvailable();
598-
rma.autoManageDualPrimary(isVMMigration);
598+
if (isVMMigration) {
599+
// only set when needed: older controllers reject the unknown property
600+
rma.autoManageDualPrimary(true);
601+
}
599602
ApiCallRcList answers = api.resourceMakeAvailableOnNode(rscName, localNodeName, rma);
600603
checkLinstorAnswersThrow(answers);
601604
} else {

0 commit comments

Comments
 (0)