Skip to content

Make tunnel.NAME.(interface|local) a node specific network config#2263

Merged
stgraber merged 2 commits intolxc:mainfrom
breml:node-specific-network-config
Jul 10, 2025
Merged

Make tunnel.NAME.(interface|local) a node specific network config#2263
stgraber merged 2 commits intolxc:mainfrom
breml:node-specific-network-config

Conversation

@breml
Copy link
Copy Markdown
Collaborator

@breml breml commented Jul 9, 2025

No description provided.

@stgraber
Copy link
Copy Markdown
Member

stgraber commented Jul 9, 2025

@breml I think we should make all the tunnel.XYZ keys be node specific as most tunnels use local IPs and the like anyway.

@breml
Copy link
Copy Markdown
Collaborator Author

breml commented Jul 9, 2025

@stgraber I double checked the tunnel.XYZ keys and I don't think, it makes sense to make all of them node specific.

My proposal would be:

key description node specific
tunnel.NAME.group Multicast address for vxlan (used if local and remote aren’t set) no
tunnel.NAME.id Specific tunnel ID to use for the vxlan tunnel no
tunnel.NAME.interface Specific host interface to use for the tunnel yes
tunnel.NAME.local Local address for the tunnel (not necessary for multicast vxlan) yes
tunnel.NAME.port Specific port to use for the vxlan tunnel no
tunnel.NAME.protocol Tunneling protocol: vxlan or gre no
tunnel.NAME.remote Remote address for the tunnel (not necessary for multicast vxlan) no
tunnel.NAME.ttl Specific TTL to use for multicast routing topologies no

(taken from https://linuxcontainers.org/incus/docs/main/reference/network_bridge/#configuration-options)

@stgraber
Copy link
Copy Markdown
Member

stgraber commented Jul 9, 2025

You're right for the VXLAN mesh case that we care about now, but for the other types of tunnel, we'd definitely want to have some control as to what machine has a given tunnel set up.

Otherwise if you combine a cluster-wide VXLAN tunnel with a regular GRE or VXLAN tunnel, you'll get all the servers suddenly sending the same traffic over that extra tunnel which may then send it back once of the other tunnels, creating a loop.

Anyway, we may be able to make your approach work by being pretty careful about when we bring up the tunnel.

If dealing with GRE, that's easy, we need a local IP, so if it's not set in the node config, we skip the tunnel.

VXLAN is a bit trickier because of the multicast support, for that one, we basically need to check if we have a remote IP defined, then if we do, a local IP also becomes required for the tunnel to be brought online.

@breml
Copy link
Copy Markdown
Collaborator Author

breml commented Jul 9, 2025

OK, I will implement the verification of the node specific config settings based on my table above, fix the linter issues and I will have a look at the conditions for when to bring up which tunnel and update the PR.

@breml breml changed the title Make tunnel.NAME.interface a node specific network config Make tunnel.NAME.(interface|local) a node specific network config Jul 10, 2025
@breml
Copy link
Copy Markdown
Collaborator Author

breml commented Jul 10, 2025

@stgraber I just looked at the code. The two checks you have mentioned in #2263 (comment) are already present. For gre and for vxlan. So think we are good on that side.

@breml breml force-pushed the node-specific-network-config branch from 55df242 to a12aad1 Compare July 10, 2025 05:26
breml added 2 commits July 10, 2025 07:40
Signed-off-by: Lucas Bremgartner <lucas.bremgartner@futurfusion.io>
* tunnel.NAME.interface
* tunnel.NAME.local

Signed-off-by: Lucas Bremgartner <lucas.bremgartner@futurfusion.io>
@stgraber stgraber merged commit c1c5679 into lxc:main Jul 10, 2025
37 of 38 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants