Skip to content

Properly check prior instance/vmm states when starting an instance#6278

Merged
gjcolombo merged 4 commits into
mainfrom
gjcolombo/instance-start-prerequisites
Aug 9, 2024
Merged

Properly check prior instance/vmm states when starting an instance#6278
gjcolombo merged 4 commits into
mainfrom
gjcolombo/instance-start-prerequisites

Conversation

@gjcolombo

Copy link
Copy Markdown
Contributor

Fix the following instance start dispositions:

  • an instance with no active VMM can only be started if it's in the "NoVmm" instance state
  • an instance with a migrating active VMM has been started, so allow start to succeed for idempotency
  • an instance with a SagaUnwound active VMM is allowed to be started again (the new start saga's VMM supplants the old VMM)

Add some unit tests to cover these cases.

Fixes #6274.

Fix the following instance start dispositions:

- an instance with no active VMM can only be started if it's in the
  "NoVmm" instance state
- an instance with a migrating active VMM has been started, so allow
  start to succeed for idempotency
- an instance with a SagaUnwound active VMM is allowed to be started
  again (the new start saga's VMM supplants the old VMM)

Add some unit tests to cover these cases.
@gjcolombo gjcolombo requested a review from hawkw August 9, 2024 17:20
Comment thread nexus/src/app/instance.rs
Comment thread nexus/src/app/instance.rs Outdated
Comment thread nexus/src/app/instance.rs
Comment thread nexus/src/app/instance.rs Outdated
Comment thread nexus/src/app/instance.rs Outdated
@gjcolombo gjcolombo enabled auto-merge (squash) August 9, 2024 17:57
@gjcolombo gjcolombo merged commit 04fdbcd into main Aug 9, 2024
@gjcolombo gjcolombo deleted the gjcolombo/instance-start-prerequisites branch August 9, 2024 19:51
hawkw added a commit that referenced this pull request Aug 9, 2024
This makes @gjcolombo's change from #6278 a bit more consistent with the
rest of the code, and in particular, ensures that we always present the
user with the same instance state names. It also addresses the
`SagaUnwound` behavior Greg pointed out in [this comment][1].

[1]: #5749 (comment)
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.

Nexus::instance_start doesn't check that the target instance is fully created

2 participants