Skip to content

Resume paused instances on restore requests - #489

Merged
sjmiller609 merged 1 commit into
mainfrom
hypeship/resume-paused-on-restore
Oct 1, 2026
Merged

sjmiller609 merged 1 commit into
mainfrom
hypeship/resume-paused-on-restore

Conversation

@sjmiller609

@sjmiller609 sjmiller609 commented Oct 1, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • Resume the existing VMM when a restore request finds a paused instance, under the existing instance lock.
  • Publish the running state and restore event after success; invalidate cached state on resume failure so another wake can retry.
  • Leave standby rollback, startup/shutdown, start requests, snapshots, and networking unchanged.

Note

Medium Risk
Changes VM lifecycle restore behavior and hypervisor resume/caching under lock; mistakes could leave paused VMs stuck or double-resume, though tests cover concurrency and retry paths.

Overview
Restore requests no longer fail when the instance is paused with an existing VMM. Instead of falling through to standby restore (which rejects non-standby states), RestoreInstance now resumes the live hypervisor under the per-instance lock, refreshes cached hypervisor state, and emits LifecycleEventRestore on success.

On resume failure, cached hypervisor state is invalidated so a later restore can retry. Running and initializing instances remain a no-op, and the full standby snapshot restore path is unchanged.

New tests cover resume success for running/initializing metadata targets, unchanged on-disk metadata, failed-then-success retry, idempotent second restores, and concurrent restores invoking Resume only once.

Reviewed by Cursor Bugbot for commit 2653831. Bugbot is set up for automated code reviews on this repo. Configure here.

@sjmiller609
sjmiller609 marked this pull request as ready for review October 1, 2026 19:51
@sjmiller609
sjmiller609 requested a review from chruffins October 1, 2026 20:17
@sjmiller609
sjmiller609 merged commit 8554b4e into main Oct 1, 2026
9 checks passed
@sjmiller609
sjmiller609 deleted the hypeship/resume-paused-on-restore branch October 1, 2026 20:28
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