xapi-cli-server: stop using SR records for cross pool migrations (master)#6947
Open
psafont wants to merge 3 commits intoxapi-project:masterfrom
Open
xapi-cli-server: stop using SR records for cross pool migrations (master)#6947psafont wants to merge 3 commits intoxapi-project:masterfrom
psafont wants to merge 3 commits intoxapi-project:masterfrom
Conversation
…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)
last-genius
approved these changes
Mar 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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