Relax an eager sled agent assert#10401
Open
jmpesp wants to merge 1 commit intooxidecomputer:mainfrom
Open
Conversation
`omicron-stress` was able to trigger a sled-agent panic, and after asking for some pointers from a former very esteemed colleague, we determined that this assert was overly eager: there always was an unwrap that would enforce the same condition. Remove this assert and add a comment. Fixes oxidecomputer#10369
hawkw
approved these changes
May 7, 2026
Member
hawkw
left a comment
There was a problem hiding this comment.
This seems reasonable to me at a glance. I wonder if we might be able to put together a test for sled-agent that reproduces the omicron-stress behavior? It would be nice to be able to have a regression test ensuring we're not just going to end up panicking later at the unwrap...
| // If `propolis_request` is Some leaving the above match group, there | ||
| // must be a Some `self.running_state`, i.e. if there is a request to | ||
| // send to the propolis process, there must be a propolis process. | ||
| // `propolis_state_put` unwraps `self.running_state` and will panic the |
Member
There was a problem hiding this comment.
does the unwrap have a useful error message, and if not, should it be changed to an expect() with the message from the old assertion?
Contributor
Author
There was a problem hiding this comment.
yeah:
let res = self
.running_state
.as_ref()
.expect("Propolis client should be initialized before usage")
Member
|
The |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
omicron-stresswas able to trigger a sled-agent panic, and after asking for some pointers from a former very esteemed colleague, we determined that this assert was overly eager: there always was an unwrap that would enforce the same condition. Remove this assert and add a comment.Fixes #10369