Skip to content

xapi-cli-server: stop using SR records for cross pool migrations (master)#6947

Open
psafont wants to merge 3 commits intoxapi-project:masterfrom
psafont:dev/pau/cross-pool-fix
Open

xapi-cli-server: stop using SR records for cross pool migrations (master)#6947
psafont wants to merge 3 commits intoxapi-project:masterfrom
psafont:dev/pau/cross-pool-fix

Conversation

@psafont
Copy link
Member

@psafont psafont commented Mar 13, 2026

SR records have variant fields that add new variants when storage features are added, as is the case with current_operations.
This means that fetching records from remote pool cause deserialization exceptions when their records contain newer, unknown variants when using OCaml-based clients.

xe uses SR records to minimize remote calls to select the SR with the largest amount of free space during cross-pool migrations.

Change xe to use expressions for filtering SRs and minimize the amount of calls done.
This means that now PBD records are fetched, but these don't contain any variants, and have been unchanged since early 2008.

Now the amount of calls have changed from 1 per host-attached PBD to 2, but the amount of calls can be limited to shared SRs, if there are any.

This is a prerequisite to reintroduce this change: 723a498#diff-22f9f03f35e06c26ffd8f5ee9a8573167dae627ac8927d260d7

Commits have been ported from #6905

psafont added 3 commits March 13, 2026 08:22
…ross-pool migration

SR records have variant fields that add new variants when storage
features are added, as is the case with current_operations. This means
that fetching records from remote pools cause deserialization exceptions
when their records contain newer, unknown variants.

xe uses SR records to minimize the amount of remote calls needed for
selecting the SR with the highest amount of free space during cross-pool
migrations.

Change xe to fetch references of only non-ISO SRs, and filter PBD
records with them. This means that now PBD records are fetched, but
these don't contain any variants, and have been unchanged since early
2008.

This has the side effect of reducing the amount of calls from 2 per
host-attached PBDS to 1 per non-iso, host-attached PBD with the
additional cost of a single call to fetch the non-iso SRs

Signed-off-by: Pau Ruiz Safont <[email protected]>
(cherry picked from commit 5a61aae)
SR records have variant fields that add new variants when storage features are added, as is the case with current_operations.
This means that fetching records from remote pool cause deserialization exceptions when their records contain newer, unknown variants when using OCaml-based clients.

Use expression-based queries to separate shared from local SRs without records, and add 2 queries per SR to gather the free space.

Now the amount of calls have changed from 1 per host-attached PBD to 2,
but the amount of calls can be limited to shared SRs, if there are any.

Signed-off-by: Pau Ruiz Safont <[email protected]>
(cherry picked from commit c1de0d7)
Otherwise there's no feedback on the reason why this failed

Signed-off-by: Pau Ruiz Safont <[email protected]>
(cherry picked from commit a93a984)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants