Remove redundant plumb_service_firewall_rules call from rack_initialize #9764
+4
−18
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This call was added in March 2024 (05ed790) to ensure firewall rules are plumbed during initial rack setup. However, in May 2024 (f2602b5), await_ip_allowlist_plumbing() was added to Server::start() to ensure the allowlist is enforced before the external HTTP server starts.
This created redundancy: in the test/RSS path, rack_initialize() plumbs the rules, then Server::start() immediately re-plumbs them via await_ip_allowlist_plumbing().
Removing the call from rack_initialize() is safe because:
await_ip_allowlist_plumbing() handles both fresh rack and restart:
The call in rack_initialize() has no unique purpose - the external server doesn't start until after await_ip_allowlist_plumbing() anyway
Order is preserved:
Also removes the now-unused Nexus::plumb_service_firewall_rules wrapper method from sled.rs, since all callers use nexus_networking:: directly.
Saves ~400ms in nexus test setup time.