Skip to content

Reconfigurator: Don't talk to expunged sleds from executor - #5596

Merged
andrewjstone merged 5 commits into
mainfrom
fix-5594
Apr 25, 2024
Merged

andrewjstone merged 5 commits into
mainfrom
fix-5594

Conversation

@andrewjstone

@andrewjstone andrewjstone commented Apr 22, 2024 •

Copy link
Copy Markdown
Contributor

We confirmed on a4x2 that Nexus gets deployed on the new sled with this change.

Fixes #5594

@andrewjstone andrewjstone changed the title wip Fix 5594 Apr 22, 2024
@sunshowers

Copy link
Copy Markdown
Contributor

Makes a ton of sense, thanks for doing this!

@andrewjstone
andrewjstone marked this pull request as ready for review April 23, 2024 22:51
Comment thread nexus/src/app/rack.rs Outdated
let sleds = self.db_datastore.sled_list(opctx, &pagparams).await?;
let sleds = self
.db_datastore
.sled_list(opctx, &pagparams, SledFilter::All)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be SledFilter::InService? I think with ::All we wouldn't allow re-initializing a previously-expunged sled (because we'd still see its baseboard here)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wasn't sure about this, but I'm pretty sure you are right. Good catch!

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 8b07fa8

Comment thread nexus/src/app/sled.rs Outdated
pagparams: &DataPageParams<'_, Uuid>,
) -> ListResultVec<db::model::Sled> {
self.db_datastore.sled_list(&opctx, pagparams).await
self.db_datastore.sled_list(&opctx, pagparams, SledFilter::All).await

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure where this is called, but from context I would have guessed this should be ::InService (e.g., why would Nexus list expunged sleds?). Or maybe this method could take a filter as an argument?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm. I mainly was sticking with the existing functionality here, but I think you are correct. I'll change this.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 8b07fa8

@andrewjstone
andrewjstone enabled auto-merge (squash) April 24, 2024 21:18
@andrewjstone
andrewjstone disabled auto-merge April 24, 2024 21:28
@andrewjstone andrewjstone changed the title Fix 5594 Reconfigurator: Don't talk to expunged sleds from executor Apr 24, 2024
@andrewjstone
andrewjstone enabled auto-merge (squash) April 24, 2024 21:37
@andrewjstone
andrewjstone merged commit f475e75 into main Apr 25, 2024
@andrewjstone
andrewjstone deleted the fix-5594 branch April 25, 2024 01:40
sunshowers added a commit that referenced this pull request Apr 26, 2024
Conflict between #5596 and #5622.

* #5596 changed `DataStore::sled_list` to take a `SledFilter` argument
-- and `Nexus::sled_list` always uses `InService`.
* #5622 made the functions call `DataStore::sled_list` instead of
`Nexus::sled_list`

Not entirely sure that `InService` is correct, but it seems fine to just
have all non-expunged sleds here for now.
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.

Reconfigurator: Executor should not try to talk to expunged sleds

3 participants