Skip to content

[8/n] [sync-switch] read switch config in one transaction#10649

Open
sunshowers wants to merge 3 commits into
mainfrom
sunshowers/spr/8n-sync-switch-read-switch-config-in-one-transaction
Open

[8/n] [sync-switch] read switch config in one transaction#10649
sunshowers wants to merge 3 commits into
mainfrom
sunshowers/spr/8n-sync-switch-read-switch-config-in-one-transaction

Conversation

@sunshowers

Copy link
Copy Markdown
Contributor

Part two of the fix for #10640. This wires up what was introduced in the previous commit, #10648, dropping the piecemeal reads. We aren't totally out of the woods yet, because the transactional read currently doesn't handle transient db issues as well as it could. We're going to fix that in a principled fashion in upcoming commits.

Note that I haven't touched the mgd and other parts of the switch config in this commit, since @jgallagher is actively working on them. (Let me know if I should also include those changes either here or in a followup.)

Depends on:

Created using spr 1.3.6-beta.1

[skip ci]
Created using spr 1.3.6-beta.1
@jgallagher

Copy link
Copy Markdown
Contributor

Note that I haven't touched the mgd and other parts of the switch config in this commit, since @jgallagher is actively working on them. (Let me know if I should also include those changes either here or in a followup.)

The work I'm doing can be summarized as "move any progenitor/HTTP interactions between nexus and {mgd,dpd} out of sync_switch_configuration and into sled-agent-scrimlet-reconcilers". I'm mostly not touching the types (although I'm filing some issues as I run into problems) nor anything that involves the db - if there are similar db/transaction-safety issues with other parts of the switch config, I'd vote for fixing those too. The scrimlet reconcilers project is mostly only a consumer of the bootstore; it expects Nexus to construct a correct one.

@jgallagher

Copy link
Copy Markdown
Contributor

Note that I haven't touched the mgd and other parts of the switch config in this commit, since @jgallagher is actively working on them. (Let me know if I should also include those changes either here or in a followup.)

The work I'm doing can be summarized as "move any progenitor/HTTP interactions between nexus and {mgd,dpd} out of sync_switch_configuration and into sled-agent-scrimlet-reconcilers". I'm mostly not touching the types (although I'm filing some issues as I run into problems) nor anything that involves the db - if there are similar db/transaction-safety issues with other parts of the switch config, I'd vote for fixing those too. The scrimlet reconcilers project is mostly only a consumer of the bootstore; it expects Nexus to construct a correct one.

Ohhh I might have misunderstood. Is this about this comment?

// NOTE: this mgd-apply path re-reads each peer's
// communities and import/export policies via
// `communities_for_peer` / `allow_*_for_peer`, even
// though `switch_port_settings_get` already loaded
// them. That redundancy could be removed too, but is
// left for now.

and the related code? If so, yes, you can ignore this for now - all of that is definitely under the "progenitor interaction between nexus and mgd" umbrella. It does use the db but not to construct the bootstore, and yeah we'll be able to just delete it all once the scrimlets are responsible for mgd config sync'ing.

@sunshowers

Copy link
Copy Markdown
Contributor Author

and the related code? If so, yes, you can ignore this for now - all of that is definitely under the "progenitor interaction between nexus and mgd" umbrella. It does use the db but not to construct the bootstore, and yeah we'll be able to just delete it all once the scrimlets are responsible for mgd config sync'ing.

Yeah, exactly -- that's what I figured.

@sunshowers sunshowers changed the base branch from sunshowers/spr/main.8n-sync-switch-read-switch-config-in-one-transaction to main June 30, 2026 00:21
Created using spr 1.3.6-beta.1
@sunshowers sunshowers enabled auto-merge (squash) June 30, 2026 00:22
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.

2 participants