Skip to content

Conversation

@AnthoineB
Copy link

@AnthoineB AnthoineB commented Nov 13, 2025

'scan' function uses SNAPSHOT_OF_TAG as a vdi_uuid. Same, function '_finishSnapshot', part of 'clone', initialize SNAPSHOT_OF_TAG field with a vdi_uuid.
Without this patch the MGT is filled with 'OpaqueRef:' VDI after MGT is recreated.

To reproduce:

  1. Create a VDI with a snapshot on LVM SR <SR UUID>.
  2. lvremove /dev/VG_XenStorage-<SR UUID>/MGT
  3. xe sr-scan uuid=<SR UUID>

@MarkSymsCtx
Copy link
Contributor

It might be good to add something to https://github.com/xapi-project/sm/blob/master/tests/test_LVHDSR.py#L111 that checks the correct values are written to the metadata.

@AnthoineB AnthoineB force-pushed the abo-convert-vdi-ref-to-vdi-uuid-in-get-snapshot-of branch 2 times, most recently from 8c604af to bff23f3 Compare December 16, 2025 16:31
@AnthoineB
Copy link
Author

It might be good to add something to https://github.com/xapi-project/sm/blob/master/tests/test_LVHDSR.py#L111 that checks the correct values are written to the metadata.

I create a new test because it was changing the original test too much. I also add 2 small patch I find when writing the test.

Signed-off-by: Anthoine Bourgeois <anthoine.bourgeois@vates.tech>
Signed-off-by: Anthoine Bourgeois <anthoine.bourgeois@vates.tech>
Signed-off-by: Anthoine Bourgeois <anthoine.bourgeois@vates.tech>
…ormat

Signed-off-by: Anthoine Bourgeois <anthoine.bourgeois@vates.tech>
@AnthoineB AnthoineB force-pushed the abo-convert-vdi-ref-to-vdi-uuid-in-get-snapshot-of branch from bff23f3 to 661eed0 Compare December 16, 2025 17:15
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