Skip to content

feat(lvmsr): support vdi_revert on lvm - #128

Open
klmp200 wants to merge 1 commit into
vdi_revertfrom
vdi_revert_lvm
Open

feat(lvmsr): support vdi_revert on lvm#128
klmp200 wants to merge 1 commit into
vdi_revertfrom
vdi_revert_lvm

Conversation

@klmp200

@klmp200 klmp200 commented Mar 26, 2026

Copy link
Copy Markdown
  • Support vdi_revert
  • Add journals for rollback in case of failure
  • Rewrite lvm journal creation with security feature against writing too much inside allocated space
  • Read more in lvm journal
  • Support CBT on vdi_revert

Integration tests PR: xcp-ng/xcp-ng-tests#631

Stacked PR review

  1. feat(filesr): support vdi_revert #124
  2. feat(lvmsr): support vdi_revert on lvm #128 <- Current
  3. feat(linstor): implement vdi_revert on linstor #132

@klmp200
klmp200 force-pushed the vdi_revert_lvm branch 2 times, most recently from 3e76b0c to 7706981 Compare March 26, 2026 09:12
@klmp200
klmp200 force-pushed the vdi_revert_lvm branch 3 times, most recently from 4869f58 to 5a233c6 Compare April 20, 2026 08:46
@klmp200
klmp200 force-pushed the vdi_revert_lvm branch 5 times, most recently from 278e57e to 32b6861 Compare April 24, 2026 15:03
@klmp200
klmp200 force-pushed the vdi_revert_lvm branch 4 times, most recently from 4da951e to 70bb545 Compare May 22, 2026 12:38
@klmp200
klmp200 force-pushed the vdi_revert_lvm branch 2 times, most recently from 127b385 to 6f7e5b3 Compare June 11, 2026 15:17
@klmp200
klmp200 marked this pull request as ready for review June 11, 2026 15:19
@klmp200
klmp200 marked this pull request as draft July 3, 2026 14:42
@klmp200
klmp200 marked this pull request as ready for review July 10, 2026 16:17
@klmp200
klmp200 requested a review from a team July 10, 2026 16:17
Comment thread drivers/srmetadata.py
Comment thread drivers/LVMSR.py
Comment thread drivers/LVMSR.py
Comment thread drivers/LVMSR.py
Comment thread drivers/LVMSR.py
Comment thread drivers/LVMSR.py Outdated
Comment thread drivers/LVMSR.py Outdated
Comment thread drivers/LVMSR.py Outdated
Comment thread drivers/LVMSR.py Outdated
Comment thread drivers/srmetadata.py
@klmp200
klmp200 requested a review from a team July 16, 2026 08:34
Comment thread drivers/LVMSR.py
inserted.cowutil.setHidden(inserted.path, False)
inserted_ref = inserted._db_introduce()

util.fistpoint.activate("LVM_revert_create_src", self.sr.uuid)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

good idea to include fistpoints

Comment thread drivers/LVMSR.py
dest_ref = dest.session.xenapi.VDI.get_by_uuid(dest.uuid)
dest.sm_config = dest.session.xenapi.VDI.get_sm_config(dest_ref)

with dest.activated(False):

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

good practice to use context manager here
we have to use it more !

@Lankou66 Lankou66 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

LGTM
Good PR regarding the complexity of lvmsr code
GG

@Wescoeur
Wescoeur requested a review from Nambrok August 7, 2026 15:49
* Support `vdi_revert`
* Add journals for rollback in case of failure
* Rewrite lvm journal creation with security feature against writing too much inside allocated space
* Read more in lvm journal
* Support CBT on vdi revert

Signed-off-by: Antoine Bartuccio <antoine.bartuccio@vates.tech>
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