-
Notifications
You must be signed in to change notification settings - Fork 40
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
[reconfigurator] Avoid deploying expunged datasets to sled agents #7308
base: main
Are you sure you want to change the base?
Conversation
This does not resolve #6177 , and the issues raised by @davepacheco there are still open (namely, the ordering between {dataset,zone} {add,remove} which could cause issues during zone expungement). However, this solves the more scope-limited issue raised by #7304 : If a blueprint thinks a dataset is expunged, we stop telling the sled agents to instantiate it. |
@@ -969,7 +969,14 @@ impl From<BlueprintDatasetsConfig> for DatasetsConfig { | |||
datasets: config | |||
.datasets | |||
.into_iter() | |||
.map(|(id, d)| (id, d.into())) | |||
.filter_map(|(id, d)| { |
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.
This is the actual fix - basically, converting from "Blueprint dataset" -> "Deployable dataset" format will filter out expunged datasets.
If this feels too magical, I can remove impl From
here and instead create:
impl BlueprintDatasetsConfig {
fn into_in_service_datasets(self) -> DatasetsConfig {
...
}
}
(the implementation would be the same, but this could make it more explicit that we're filtering)
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.
I like your suggestion, seems like a good refactor :)
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.
Done in 0bca90f
I agree that this shouldn't change the net effect of the system, without subsequent PRs.
Not sure I agree with this one. IMO this PR inches us closer to "more correct" behavior because it makes the reconfigurator do the right thing with the APIs it has. I think it'll have the same impact on the Sled Agent as "not requesting expunged datasets" because they aren't getting deleted regardless. I think it would make sense to do the following:
At this point: The reconfigurator would be sending a set of info to the sled agents that's correct, but not being carried out correctly, because things aren't being deleted. Then we could:
|
Agreed!
I agree that sequence should work. My worry here stems mainly from various recent discussions (like the R12/#7265 one) where I feel like we struggled to accurately predict how the system would behave in this area, particularly across various releases. #7309 itself is an example of a non-obvious consequence of a bunch of other reasonable-seeming things. I guess another way to say that is that if we land this fix, then a bug (6177) becomes load-bearing for zone expungement to keep working, which feels like a weird place to be. |
If a blueprint has marked a dataset as expunged, stop telling sled agents to deploy it.
Fixes #7304