Skip to content

bug(chart): multi-doc renderer ignores user-supplied machine.network.interfaces #141

@lexfrei

Description

@lexfrei

What

On the Talos v1.12 multi-doc rendering path (charts/generic/templates/_helpers.tpl:talos.config.network.multidoc), the chart fully reconstructs network configuration from live discovery resources (links, addresses, routes) and explicitly does NOT consult talm.discovered.existing_interfaces_configuration.

Source comment (charts/generic/templates/_helpers.tpl:87-90):

Multi-doc format always reconstructs network config from discovery resources.
existing_interfaces_configuration is not used here because v1.12 nodes store
network config in separate documents (LinkConfig, BondConfig, etc.), not in
the legacy machine.network.interfaces field.

The premise — "v1.12 nodes already store network config in separate documents" — does not hold for clusters that were upgraded from a pre-1.12 chart. Their running MachineConfig still carries machine.network.interfaces[] from the legacy schema, and the multi-doc renderer drops it on first re-render.

Symptom

A user upgrading from v0.23 to v0.24+ does not get an automatic migration of legacy machine.network.interfaces[] declarations into multi-doc form. The legacy declarations vanish from the rendered config.

This is invisible at template time: talm template produces a config that looks complete (HostnameConfig, ResolverConfig, one LinkConfig / VLANConfig / BondConfig for the gateway link) but is missing every secondary interface, every secondary VLAN, every static route, and every user-side override that lived under machine.network.interfaces.

Reproduction shape (any of these triggers it)

  • Node with two NICs, one routed (gateway link) and one for storage.
  • Node with multiple VLANs, only one of which carries the default route.
  • values.yaml that injects extra interfaces, addresses, or routes via the legacy machine.network.interfaces[] schema.

Affected versions

Introduced in #116 (v0.24.0). Present in main as of writing.

Possible directions

  1. Consult existing_interfaces_configuration in multi-doc mode and translate non-trivial entries into LinkConfig / VLANConfig / BondConfig / RouteConfig documents.
  2. Read the user-supplied source values (the machine.network.interfaces[] block in values.yaml) and translate them at render time.
  3. As an immediate guardrail: hard-fail or emit a noisy warning when multi-doc mode would drop a non-empty existing_interfaces_configuration. Smallest change; unblocks users until a real translator is built.

Option 3 is recommended as the first step.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/chartIssues or PRs related to charts/ (Chart.yaml, helpers, templates)area/networkingIssues or PRs related to networking (interfaces, VIP, routes)kind/bugCategorizes issue or PR as related to a bugpriority/important-soonMust be staffed and worked on either currently, or very soon, ideally in time for the next releasetriage/acceptedIndicates an issue is ready to be actively worked on

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions