Skip to content

pass vminfo by reference and improve sync error handling#1391

Merged
spai-p9 merged 8 commits intomainfrom
private/main/ghi-1390
Jan 22, 2026
Merged

pass vminfo by reference and improve sync error handling#1391
spai-p9 merged 8 commits intomainfrom
private/main/ghi-1390

Conversation

@spai-p9
Copy link
Copy Markdown
Collaborator

@spai-p9 spai-p9 commented Jan 20, 2026

What this PR does / why we need it

Snapshot: Updated disk info before sync start to ensure work on fresh snapshots.

Which issue(s) this PR fixes

(optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged)

fixes

Special notes for your reviewer

Testing done

please add testing details (logs, screenshots, etc.)

Copy link
Copy Markdown
Contributor

@windsurf-bot windsurf-bot Bot left a comment

Choose a reason for hiding this comment

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

💡 To request another review, post a new comment with "/windsurf-review".

Comment thread v2v-helper/migrate/migrate.go Outdated
@spai-p9
Copy link
Copy Markdown
Collaborator Author

spai-p9 commented Jan 20, 2026

/windsurf-review

Copy link
Copy Markdown
Contributor

@windsurf-bot windsurf-bot Bot left a comment

Choose a reason for hiding this comment

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

💡 To request another review, post a new comment with "/windsurf-review".

Comment thread v2v-helper/migrate/migrate.go Outdated
Comment thread v2v-helper/migrate/migrate.go
@spai-p9
Copy link
Copy Markdown
Collaborator Author

spai-p9 commented Jan 20, 2026

/windsurf-review

Copy link
Copy Markdown
Contributor

@windsurf-bot windsurf-bot Bot left a comment

Choose a reason for hiding this comment

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

💡 To request another review, post a new comment with "/windsurf-review".

Comment thread v2v-helper/migrate/migrate.go Outdated
@spai-p9 spai-p9 force-pushed the private/main/ghi-1390 branch from b2992f8 to 0892f8f Compare January 20, 2026 10:18
@spai-p9 spai-p9 force-pushed the private/main/ghi-1390 branch from 0892f8f to 950bf06 Compare January 20, 2026 10:30
@spai-p9
Copy link
Copy Markdown
Collaborator Author

spai-p9 commented Jan 20, 2026

/windsurf-review

Copy link
Copy Markdown
Contributor

@windsurf-bot windsurf-bot Bot left a comment

Choose a reason for hiding this comment

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

💡 To request another review, post a new comment with "/windsurf-review".

// Before starting NBD server, update disk info with new snapshot details
// We have marked block copy as false, in order to not update changeID.
// This should now update the snapname and snapBackingDisk with the new snapshot details and copy correctly.
err = vmops.UpdateDiskInfo(&vminfo, vminfo.VMDisks[idx], false)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The SyncCBT function is updating vminfo with new snapshot details, but since vminfo is passed by value, these changes won't be reflected in the caller. The PR correctly changes this to pass by reference with &vminfo, ensuring updates are properly reflected globally.

OmkarDeshpande7 and others added 6 commits January 22, 2026 11:32
Co-authored-by: Omkar Deshpande <omideshpande7@gmail.com>
Co-authored-by: Abhijeet Thakur <abhijeet.thakur@indexnine.com>
Signed-off-by: Geet Jain <geet@platform9.com>
Co-authored-by: Geet Jain <geet-pf9@MacBookAir.localdomain>
Co-authored-by: windsurf-bot[bot] <189301087+windsurf-bot[bot]@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

@sanya-pf9 sanya-pf9 left a comment

Choose a reason for hiding this comment

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

LGTM

@spai-p9 spai-p9 enabled auto-merge (squash) January 22, 2026 08:24
@spai-p9 spai-p9 merged commit 5807eb7 into main Jan 22, 2026
12 checks passed
@spai-p9 spai-p9 deleted the private/main/ghi-1390 branch January 22, 2026 08:30
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.

5 participants