Skip to content

Support using a trunk port for node networking#948

Draft
MoteHue wants to merge 4 commits into
mainfrom
support-trunk-ports
Draft

Support using a trunk port for node networking#948
MoteHue wants to merge 4 commits into
mainfrom
support-trunk-ports

Conversation

@MoteHue
Copy link
Copy Markdown
Contributor

@MoteHue MoteHue commented Apr 14, 2026

Locked behind the use_trunk flag. Unless this is set to true, the default networking is used.

I did want to do away with the use_trunk flag and just have it determined from the other vars being set, but it wasn't happy with that.

The "for_each" set includes values derived from resource attributes

There's still room for improvements here, these were just outside the scope of my initial support:

  • Supporting multiple subports in the trunk
  • Supporting the control node
  • Docs

Would also be great to support one shared definition that can be used by mutliple node groups, no idea if this is doable though.

@MoteHue MoteHue requested a review from a team as a code owner April 14, 2026 12:59
Locked behind the use_trunk flag. Unless this is set to true, the
default networking is used.
@MoteHue MoteHue force-pushed the support-trunk-ports branch from ccde789 to 51e4a78 Compare April 14, 2026 13:17
@MoteHue
Copy link
Copy Markdown
Contributor Author

MoteHue commented Apr 14, 2026

Open question: I've included this in compute_fixed_image too, but I don't know if there's actually any point in this? Is there any need to use trunk points with virtual machines?

default = null
}

variable "trunk_subport_network_id" {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Potentially make this a list of networks?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, that's the top in my improvements list.

There's still room for improvements here, these were just outside the scope of my initial support:

  • Supporting multiple subports in the trunk

I've only written enough here to cover the scope of the client work. Would be happy to extend this on R&D time if we decide it's the best use of my time. Could be a follow-up PR?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fair - I missed that comment! Do have consider the module interface potentially changing though: string -> list. Meaning people have to update their config.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that's a really good point, we shouldn't merge until we're happy with that interface. So then it becomes a site-specific fix (= site deals with changes from upstream merge) rather than everyone having to deail with changes.

Comment thread environments/site/tofu/node_group/variables.tf Outdated
@MoteHue
Copy link
Copy Markdown
Contributor Author

MoteHue commented Apr 14, 2026

TODO: hosts.yml needs to include the trunk subnet details for the node networks

Comment thread environments/site/tofu/node_group/network.tf Outdated
@MoteHue MoteHue marked this pull request as draft April 14, 2026 14:57
@sjpb
Copy link
Copy Markdown
Collaborator

sjpb commented Apr 20, 2026

Open question: I've included this in compute_fixed_image too, but I don't know if there's actually any point in this? Is there any need to use trunk points with virtual machines?

Whether the instance is a VM or BM has nothing to do with whether you're using the fixed or mutable image version of the instance, so yes its needed on both.

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.

3 participants