Repository navigation
[live-update] adapt instance update saga to account for VMMs stopped by reconfigurator #11491
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 4 commits
abba45f
e9d2af5
47742f0
abf4fa5
a6f3fc1
85b0614
29fe880
f26364e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -350,6 +350,11 @@ impl<'s> InstanceStateComputer<'s> { | |
| // - An instance with no VMM is always "stopped" (as long as it's | ||
| // not "starting" etc.) | ||
| (InstanceState::NoVmm, None) => instance::InstanceState::Stopped, | ||
| // - An instance with no VMM because it was in a sled that is being | ||
| // evacuated is always "rebooting" | ||
| (InstanceState::SledEvacuating, None) => { | ||
| instance::InstanceState::Rebooting | ||
| } | ||
|
Comment on lines
+368
to
+370
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. <3 |
||
| // - The instance should not be in `InstanceState::Vmm` if there is | ||
| // no active VMM record, this is probably a bug, but return | ||
| // `InstanceState::Stopped`, because that's basically true | ||
|
|
@@ -370,6 +375,14 @@ impl<'s> InstanceStateComputer<'s> { | |
| ); | ||
| instance::InstanceState::Stopped | ||
| } | ||
| (InstanceState::SledEvacuating, _vmm_state) => { | ||
| debug_assert_eq!( | ||
| _vmm_state, None, | ||
| "if the instance is in `InstanceState::SledEvacuating`, \ | ||
| there should be no VMM state" | ||
| ); | ||
| instance::InstanceState::Rebooting | ||
| } | ||
|
hawkw marked this conversation as resolved.
Resolved
|
||
| // - If there's no VMM state, use the instance's state. | ||
| (instance_state, None) => instance_state.into(), | ||
| (instance_state, _vmm_state) => { | ||
|
|
||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I was going to say that if we want to have the HOWEVER, I did notice there's a log line there that says "transitioned to Failed" which we should probably change to say the actual state we're transitioning the instance to, because it might not be
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks for the heads up! I'll make those changes in #11504 (this PR is just a placeholder right now with a couple of changes, so not ready at all) |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| ALTER TYPE | ||
| omicron.public.instance_state_v2 | ||
| ADD VALUE IF NOT EXISTS | ||
| 'sled_evacuating' | ||
| AFTER | ||
| 'destroyed' | ||
| ; |
Uh oh!
There was an error while loading. Please reload this page.