Skip to content
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

SystemDescription and ExampleSystem should store Policy structs directly #6803

Open
sunshowers opened this issue Oct 8, 2024 · 0 comments
Open
Labels
cleanup Code cleanliness

Comments

@sunshowers
Copy link
Contributor

Followup from #6785.

Currently, SystemDescription and ExampleSystem store all the fields from Policy separately. This means that each time we add a policy field, we have to go around adding it to both of these components. It would be really nice to store Policy directly since we expect that knobs become automatically available.

One current challenge with that is that the default Nexus allocation policy in ExampleSystem is one Nexus instance per sled. The Policy struct isn't quite amenable to representing that since it accepts the number of Nexus zones as a usize.

  • In response to that, we could change the Policy struct to make the Nexus zone policy more complex than that. But I'm hesitant to do so because production always wants a fixed number of Nexus users.
  • Instead, it seems to be easier to update the tests that expect a non-standard number of Nexus zones to set the policy accordingly.
@sunshowers sunshowers added the cleanup Code cleanliness label Oct 8, 2024
@sunshowers sunshowers changed the title SystemDescription and ExampleSystem should store Policy structs directly. SystemDescription and ExampleSystem should store Policy structs directly Oct 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cleanup Code cleanliness
Projects
None yet
Development

No branches or pull requests

1 participant