Skip to content

Commit c560105

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 129ba38 commit c560105

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
@@ -374,7 +374,10 @@ public boolean connectPhysicalDisk(
374374
// controller >= 1.29 prepares the live migration itself:
375375
// dual-primary for DRBD, activation on both nodes for shared storage pools
376376
ResourceMakeAvailable rma = new ResourceMakeAvailable();
377-
rma.autoManageDualPrimary(isVMMigration);
377+
if (isVMMigration) {
378+
// only set when needed: older controllers reject the unknown property
379+
rma.autoManageDualPrimary(true);
380+
}
378381
ApiCallRcList answers = api.resourceMakeAvailableOnNode(rscName, localNodeName, rma);
379382
checkLinstorAnswersThrow(answers);
380383
} else {

0 commit comments

Comments
 (0)