Skip to content

Conversation

gthvn1
Copy link

@gthvn1 gthvn1 commented Jun 30, 2025

This patch adds the field supported-image-format to SM object of the XAPI database. It is based on upstream code. As it modifies the database and also the storage live migration it is hard to have same patches for our 8.3 and upstream. There are too many conflicts. So this pull request should have the same behavior than #10 but for upstream version.
It is a draft for now until I found a way to test it. Than after a first internal review we will propose it upstream.

gthvn1 added 4 commits June 27, 2025 18:10
When running `xe sm-list params=all` you will now have the info of
supported image formats if the SM plugin specified it in its DRIVER_INFO.
The field is called `supported-image-formats`. If the plugin doesn't
provide the info the field will be empty.

This patch modifies the datamodel and add a new field to store this
information into the SM object.

Signed-off-by: Guillaume <[email protected]>
This patch allows specifying the destination format for individual VDIs
mapped to a destination SR. It adds a new parameter to `VM.migrate_send`
and `VM.assert_can_migrate` API. It also adds a new parameter to XE CLI.
The format to specify the image format is `image-format:<source VDI
UUID>=<destination image format>`. If the given image format cannot be
validated, an error is returned.

Signed-off-by: Guillaume <[email protected]>
This patch add a new parameter to `VDI.pool-migrate`. This new parameter
allows to provide a string that is the destination format. This string is used
to check whether the destination SR supports the expected format. If the check
fails or cannot be performed due to missing information on the destination SR,
an error is returned.

Signed-off-by: Guillaume <[email protected]>
A new field supported_image_format has been added to SM object and a new field
has been added to:
  - VM.migrate_send
  - VM.assert_can_migrate
  - VDI.pool_migrate

Signed-off-by: Guillaume <[email protected]>
@gthvn1 gthvn1 marked this pull request as draft June 30, 2025 08:19
@coveralls
Copy link

Pull Request Test Coverage Report for Build 15967656746

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 77.719%

Totals Coverage Status
Change from base Build 15963251437: 0.0%
Covered Lines: 3359
Relevant Lines: 4322

💛 - Coveralls

@gthvn1 gthvn1 changed the title Gtn supported image formats supported image formats Jun 30, 2025
@gthvn1 gthvn1 changed the title supported image formats supported image formats (upstream) Jun 30, 2025
@gthvn1 gthvn1 changed the title supported image formats (upstream) Adding supported image formats in sm-list (upstream) Jun 30, 2025
@gthvn1 gthvn1 self-assigned this Jun 30, 2025
@@ -1145,10 +1146,10 @@ module StorageAPI (R : RPC) = struct
@-> returning unit_p err
)

(** Called on the receiving end
Copy link
Author

@gthvn1 gthvn1 Jun 30, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is strange that when I run make format locally it fixes the extra spaces. What is really strange is that if I run make format without any of my modifications (so on clean master) the extra spaces remain. But if I modify the file then the formatting removes the extra space. Maybe it detects some code around modification. Not sure how it works.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it was the same for me when modifying these files in a different branch. should probably include fixed line endings

let vdi =
Client.VDI.get_by_uuid ~rpc ~session_id ~uuid:vdi_uuid
in
debug "GTNDEBUG: add image format %s,%s" vdi_uuid vdi_fmt ;
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: I used GTNDEBUG here because I will probably remove it so I don't want to forget a useless message of debug

@gthvn1
Copy link
Author

gthvn1 commented Aug 11, 2025

I'm closing this pull request because I will rebase #10 on our last xapi version that has the new code for storage multiplexing. It will be easier to test and then to push it upstream.

@gthvn1 gthvn1 closed this Aug 11, 2025
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.

3 participants