Repository navigation
Reconfigurator: Don't talk to expunged sleds from executor - #5596
Conversation
|
Makes a ton of sense, thanks for doing this! |
| let sleds = self.db_datastore.sled_list(opctx, &pagparams).await?; | ||
| let sleds = self | ||
| .db_datastore | ||
| .sled_list(opctx, &pagparams, SledFilter::All) |
There was a problem hiding this comment.
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)
There was a problem hiding this comment.
I wasn't sure about this, but I'm pretty sure you are right. Good catch!
| 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 |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
Hmm. I mainly was sticking with the existing functionality here, but I think you are correct. I'll change this.
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.
We confirmed on a4x2 that Nexus gets deployed on the new sled with this change.
Fixes #5594