[update] Marker for VMMs stopped by an update - #11127
Conversation
| * | ||
| * NULL when its state has not been modified by an update. | ||
| */ | ||
| stopped_for_update_disposition_generation INT8, |
There was a problem hiding this comment.
I'm not adding a constraint here to make sure this field can only ever be present if state is Stopping, Stopped, or Failed on purpose. According to RFD 739, we will have a task that looks for the presence of this marker and then start the process of stopping the VMM.
Would like to confirm that this makes sense.
There was a problem hiding this comment.
Yup, that's correct; the mark will be set when the instance is Running (or Starting or Rebooting), and will remain set when it actually has stppped.
hawkw
left a comment
There was a problem hiding this comment.
i had some annoying quibbles over naming, sorry. beyond that, this looks good!
| const STATE: &'static str = "state"; | ||
| const FAILURE_REASON: &'static str = " failure reason"; | ||
| const FAILURE_NOTE: &'static str = " note"; | ||
| const STOPPED_FOR_UPDATE: &'static str = " update disposition"; |
There was a problem hiding this comment.
this may be a bit nitpicky but i feel like i would want this to say something like "marked to stop for sled update" or similar. to an unfamiliar reader, i would want to communicate that:
- this is about stopping the VMM
- this is a mark saying that the VMM should be stopped (not an indication that it has stopped or that a stop has been requested yet)
- the reason it should be stopped is to update the sled (not some hypothetical update of the VMM itself)
There was a problem hiding this comment.
totally fair, tbh I spent quite a bit of time trying to think of what to put here and it all felt wrong. I changed it; it's a little long but readable I think
== VMM =========================================================================
ID: 9c60a0e3-8f2b-4a1e-bd77-1f2e3a4b5c6d
instance ID: 6b6f2f4e-0d3c-4b8a-9e21-7c8d9e0f1a2b
created at: 2026-08-21 17:42:03.123456 UTC
state: stopped
marked to stop for sled update: update disposition generation 4
updated at: 2026-08-21T17:42:05.987654Z (generation 5)
propolis address: fd00:1122:3344:101::1a:12400
sled ID: 2f5e8b1c-3a4d-4e6f-8091-a2b3c4d5e6f7
sled serial: BRM42220004
CPU platform: amd_milan
| * | ||
| * NULL when its state has not been modified by an update. | ||
| */ | ||
| stopped_for_update_disposition_generation INT8, |
There was a problem hiding this comment.
Yup, that's correct; the mark will be set when the instance is Running (or Starting or Rebooting), and will remain set when it actually has stppped.
| * | ||
| * NULL when its state has not been modified by an update. | ||
| */ | ||
| stopped_for_update_disposition_generation INT8, |
There was a problem hiding this comment.
i'm not sure if i love the name "stopped_for_update_disposition_generation" because the use of "stopped" suggests that if this has set, the vmm has stopped, which may not be true. how about
| stopped_for_update_disposition_generation INT8, | |
| should_stop_for_update_generation INT8, |
or something? i'd like it to be clear that this being set means "SHOULD stop" rather than "IS stopped".
i might also try to include the word "sled" so that it's obvious that it's the sled that is being updated, not the Propolis process, but the name of this column is already super long so i dunno if it's worth it.
There was a problem hiding this comment.
i also thought about "stop_requested_...", but i think i like "should_stop_..." better, because we may not have actually sent a request to the sled agent to stop the VMM yet.
There was a problem hiding this comment.
truthfully, I was pretty unhappy with that field as well. I don't want to leave out the "disposition" bit, because "update generation" could be interpreted as something else. should_stop_for_update_disposition_generation ended up being soooo long 🙃
So, I changed it to stop_for_update_disposition_generation. I don't think it implies anything has stopped yet. What do you think?
There was a problem hiding this comment.
Yeah, I think "stop_for_update..." is definitely better than "stopped_for_update...". That plus some comments should hopefully make it clear enough.
| const STATE: &'static str = "state"; | ||
| const FAILURE_REASON: &'static str = " failure reason"; | ||
| const FAILURE_NOTE: &'static str = " note"; | ||
| const STOPPED_FOR_UPDATE: &'static str = " update disposition"; |
There was a problem hiding this comment.
totally fair, tbh I spent quite a bit of time trying to think of what to put here and it all felt wrong. I changed it; it's a little long but readable I think
== VMM =========================================================================
ID: 9c60a0e3-8f2b-4a1e-bd77-1f2e3a4b5c6d
instance ID: 6b6f2f4e-0d3c-4b8a-9e21-7c8d9e0f1a2b
created at: 2026-08-21 17:42:03.123456 UTC
state: stopped
marked to stop for sled update: update disposition generation 4
updated at: 2026-08-21T17:42:05.987654Z (generation 5)
propolis address: fd00:1122:3344:101::1a:12400
sled ID: 2f5e8b1c-3a4d-4e6f-8091-a2b3c4d5e6f7
sled serial: BRM42220004
CPU platform: amd_milan
| * | ||
| * NULL when its state has not been modified by an update. | ||
| */ | ||
| stopped_for_update_disposition_generation INT8, |
There was a problem hiding this comment.
truthfully, I was pretty unhappy with that field as well. I don't want to leave out the "disposition" bit, because "update generation" could be interpreted as something else. should_stop_for_update_disposition_generation ended up being soooo long 🙃
So, I changed it to stop_for_update_disposition_generation. I don't think it implies anything has stopped yet. What do you think?
|
btw, I'll merge with main once this is approved to avoid fixing merge conflicts more than once |
hawkw
left a comment
There was a problem hiding this comment.
sorry to continue quibbling about the way we describe this, but I think the comment could still express how this works a bit more clearly. I do quite like the changes to the omdb output, and other than the comment, this looks good!
| /// The sled's `update_disposition` generation which triggered this VMM to | ||
| /// stop. |
There was a problem hiding this comment.
Sorry to keep splitting hairs about this, but this comment still feels a bit like it's phrased as though the VMM has definitely stopped if this is set. How would you feel about something more like
| /// The sled's `update_disposition` generation which triggered this VMM to | |
| /// stop. | |
| /// The sled's `update_disposition` generation at which this VMM was marked | |
| /// as needing to be stopped in order to update the sled. | |
| /// | |
| /// This is set when the sled begins evacuating its VMs. It indicates two | |
| /// things: that the VMM needs to be stopped, and that when it is stopped, | |
| /// this was in order to update the sled. The sled may not have been stopped | |
| /// yet. |
and perhaps also something noting that the numeric value of the update disposition generation is included mostly for debugging purposes and that it's primarily just used as a flag based on whether it's present or not.
| failure_reason omicron.public.vmm_failure_reason, | ||
| /* | ||
| * The sled's `update_disposition` generation which triggered this VMM to | ||
| * stop. |
There was a problem hiding this comment.
As mentioned in my other comment, I think this could be a bit clearer about the meaning of the field.
| if let Some(ud_generation) = stop_for_update_disposition_generation { | ||
| let u_g = u64::from(ud_generation.0); | ||
| println!( | ||
| "{indent}{STOP_FOR_UPDATE:>width$}: update disposition generation {u_g}" |
karencfv
left a comment
There was a problem hiding this comment.
sorry to continue quibbling about the way we describe this, but I think the comment could still express how this works a bit more clearly.
hahah no worries! It makes sense to take the time to get this right. I've made some changes and thanks for your feedback!
| // | leaving the first copy as an example for the next person. | ||
| // v | ||
| // KnownVersion::new(next_int, "unique-dirname-with-the-sql-files"), | ||
| KnownVersion::new(296, "vmm-stopped-for-update-disposition-generation"), |
There was a problem hiding this comment.
might wanna rename the migration, now that the column is stop_for_update...
First PR for the work laid out in RFD 739 for instance restarts during an update.
We've not completely decided on all of the tasks for the machinery to restart instances, but I think the bit about marking VMMs as "stopped for update" is pretty uncontroversial, so I got started with this.
This is just adding the
stopped_for_update_disposition_generationcolumn to thevmmtable; I will add tests for this field when there is actually something populating it.The output for the
omdb db vmm infocommand would look like this: