Skip to content

Remove multi-provider config from tdns#245

Open
johanix wants to merge 1 commit into
mainfrom
mp-removal-from-tdns
Open

Remove multi-provider config from tdns#245
johanix wants to merge 1 commit into
mainfrom
mp-removal-from-tdns

Conversation

@johanix
Copy link
Copy Markdown
Owner

@johanix johanix commented May 28, 2026

Summary

Bite 9b step 4 of the MP config cutover. The multi-provider feature
now lives entirely in tdns-mp (under tdns-mpagent, tdns-mpsigner,
tdns-mpcombiner, tdns-mpauditor). Standalone tdns-agent and
tdns-auth lose MP capability with this commit.

What's deleted

  • `MultiProviderConf` struct + `MultiProvider` field on `Config`.
  • Sub-types: `PeerConf`, `LocalAgentApiConf`, `LocalAgentDnsConf`,
    `ProviderZoneConf`, `MessageRetentionConf` (was only used by
    `LocalAgentDnsConf`).
  • Option enums: `CombinerOption`, `SignerOption`, `AgentOption` +
    the `StringTo*` / `*ToString` maps + the
    `CombinerOptAddSignature` constant.
  • `LocalIdentity()` accessor on `*Config`.
  • `parseMultiProviderOptions()` and its call from `ParseConfig`.
  • `normalizeConfigIdentities()` (body was entirely MP fields).
  • `ConfigResponse.CombinerOptions` + populator + tdns-cli rendering.
  • `AgentMgmtResponse.AgentConfig` (dead field on tdns side; never
    read or written).
  • Multi-provider role-match validation in `ParseConfig`.
  • Some commented-out dead code.

Behavioural changes

  • tdns-agent with a primary zone is now unconditionally an error.
    Was previously allowed if `multi-provider.identity` matched the
    zone name. Use `tdns-mpagent` for multi-provider agent roles.
  • `tdns-cli config status` no longer renders combiner options.
    Use `tdns-mpcli combiner config status [-v]` instead.
  • Standalone `tdns-auth` no longer accepts `multi-provider:` in
    its config. Use `tdns-mpsigner` for the multi-provider signer.

What's preserved

  • The `OptMultiProvider` zone option — tdns-mp marks zones with it
    to identify MP zones. It's a zone-level flag, not a config field.

Strict ordering requirement

This PR is the tdns half of Bite 9b. The tdns-mp half is on
tdns-mp PR #31
(branch `mp-config-cutover`, commits `04b7229` through `0801d9c`).

Both halves must land for the cutover to be complete. This PR
should merge first
, so that tdns-mp can then bump its tdns version
pin to a tdns commit that has the deletes applied. Without that
ordering, an updated tdns-mp would temporarily target a tdns
version where `tdns.MultiProvider` still exists (harmless, but
muddier).

Test plan

  • Local build clean: all 5 tdns binaries (tdns-auth, tdns-agent,
    tdns-imr, tdns-cli, dog) compile.
  • Local build clean: all 5 tdns-mp binaries (tdns-mpagent,
    tdns-mpsigner, tdns-mpcombiner, tdns-mpauditor, tdns-mpcli)
    compile against this tdns via the local `replace` directive.
  • NetBSD VM testing on operator's lab: bites 1-9a already
    tested clean. Bite 9b additionally needs:
    • tdns-mpsigner, tdns-mpcombiner, tdns-mpagent, tdns-mpauditor
      all start cleanly with realistic configs.
    • `tdns-mpcli combiner config status` and `-v` produce sensible
      output.
    • A tdns-agent config containing a `primary` zone produces the
      new "tdns-agent does not support primary zones" error.

Plan reference

Full execution plan in
tdns-mp/docs/2026-05-28-bite-9b-plan.md.
Findings carry stable IDs (B9b-N) that map to the deletes here.

Bite 9b step 4 of the MP config cutover. The multi-provider feature
now lives entirely in tdns-mp (under tdns-mpagent, tdns-mpsigner,
tdns-mpcombiner, tdns-mpauditor); standalone tdns-agent and
tdns-auth lose MP capability with this commit.

Deletes:

- MultiProviderConf struct + the MultiProvider field on Config.
- Sub-types: PeerConf, LocalAgentApiConf, LocalAgentDnsConf,
  ProviderZoneConf, MessageRetentionConf (was only used by
  LocalAgentDnsConf).
- Option enums: CombinerOption, SignerOption, AgentOption +
  StringTo*/​*ToString maps + CombinerOptAddSignature constant.
- LocalIdentity() accessor on *Config.
- parseMultiProviderOptions() + its call from ParseConfig.
- normalizeConfigIdentities() — its body was entirely MP fields.
- ConfigResponse.CombinerOptions field + the apihandler_funcs.go
  population site + tdns-cli's rendering. (tdns-mpcli combiner
  config status -v is now the home for combiner-side config
  introspection.)
- AgentMgmtResponse.AgentConfig (MultiProviderConf) — dead field
  on the tdns side, never read or written.
- Multi-provider role-match validation in ParseConfig (B9b-5).
- Commented-out buildChunkQueryEndpoint dead code.

Behavioural changes:

- tdns-agent with a primary zone is now unconditionally a
  ConfigError ("tdns-agent does not support primary zones; use
  tdns-mpagent for multi-provider roles"). Was previously allowed
  if multi-provider.identity matched (B9b-6 simplification).
- tdns-cli "config status" no longer renders combiner options.
  Use "tdns-mpcli combiner config status [-v]" instead.

The OptMultiProvider zone option is preserved — tdns-mp uses it
to mark zones as multi-provider. It's a zone-level flag, not a
config field.

Verified: all 5 tdns binaries (tdns-auth, tdns-agent, tdns-imr,
tdns-cli, dog) build clean. All 5 tdns-mp binaries (against this
modified tdns via the local replace directive) build clean.

This commit must NOT land before the tdns-mp side bite 9b PR
(commits 04b7229, 9fde0e0, 0f8e473 on mp-config-cutover) is on
origin/main. The tdns-mp side is the runtime source of truth for
MP config now; deleting it from tdns first would leave tdns-mp
unable to build.

Plan: tdns-mp/docs/2026-05-28-bite-9b-plan.md
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 28, 2026

Warning

Review limit reached

@johanix, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 40 minutes and 39 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: ab54070d-3bdc-48c5-a1b1-66989e9479a7

📥 Commits

Reviewing files that changed from the base of the PR and between 9e970f6 and 11044a7.

📒 Files selected for processing (9)
  • v2/api_structs.go
  • v2/apihandler_funcs.go
  • v2/cli/config_cmds.go
  • v2/config.go
  • v2/enums.go
  • v2/main_initfuncs.go
  • v2/parseconfig.go
  • v2/parseoptions.go
  • v2/structs.go
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch mp-removal-from-tdns

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

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.

1 participant