-
Notifications
You must be signed in to change notification settings - Fork 83
Block multiple sled reservations with the same gen #10479
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
base: main
Are you sure you want to change the base?
Changes from all commits
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 |
|---|---|---|
|
|
@@ -73,6 +73,7 @@ pub async fn create_reservation( | |
| .sled_reservation_create( | ||
| &opctx, | ||
| instance_id, | ||
| nexus_db_model::Generation::new(), | ||
|
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. nit, may not be important: I wonder if rather than always inserting the reservation at generation 1, we ought to change this function to take an on the other hand, maybe updating all the test code that uses this to pass an |
||
| vmm_id, | ||
| small_resource_request(), | ||
| SledReservationConstraintBuilder::new().build(), | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
super annoying obnoxious nitpick: man this is a long name...I suppose including the
SledResourceVmmprefix is necessary because this type is currently re-exported by apub use sled_resource_vmm::*;so we can't just expect callers to refer to it assled_resource_vmm::InstanceStateGeneration. which...I dunno if it's worth trying to fix that. I guess this is fine, it just makes me feel a certain type of way!