Skip to content

add sun-k3s nodes and allow FORWARD on hm.sun - #55

Merged
bborbe merged 1 commit into
masterfrom
fix/sun-k3s-vm-host
Oct 20, 2026
Merged

bborbe merged 1 commit into
masterfrom
fix/sun-k3s-vm-host

Conversation

@bborbe

@bborbe bborbe commented Oct 20, 2026

Copy link
Copy Markdown
Owner

What

  • nodes/hm.sun.py: enable -A FORWARD -j ACCEPT. bundles/kvm-host/files/bridge.conf sets bridge-nf-call-iptables = 1 and bundles/iptables/files/rules.v4 defaults :FORWARD DROP, so traffic bridged onto br0 was dropped and libvirt VMs on sun were unreachable. hm.nuke.py already carries the same rule.
  • nodes/hm.sun-k3s-master-0.py, nodes/hm.sun-k3s-worker-0.py: new nodes for the sun k3s cluster, copied from hm.nuke-k3s-prod-{master,worker}-0.py with address 192.168.30.10 / .11, gateway 192.168.30.1, k3s.network 192.168.30.0/24, and the openvpn-client block removed.

Observed

  • make precommit (bw test --ignore-missing-faults) passes.
  • The FORWARD rule was applied to hm.sun with bw apply hm.sun -o file:/etc/iptables/rules.v4, then iptables-restore and the docker reconcile run by hand (-o skips triggers). iptables -S FORWARD now ends with -A FORWARD -j ACCEPT.
  • Both nodes were applied with bw apply; ssh bborbe@192.168.30.10 hostname returns sun-k3s-master-0 and ssh bborbe@192.168.30.11 hostname returns sun-k3s-worker-0.

Known gap, not fixed here

On both new nodes bw verify reports 24 bad items, all one cause: the apt bundle repoints the sources to ftp.uni-stuttgart.de but no apt-get update runs before installs, so apt finds no candidate (iotop, make, iptables-persistent, monit, ...). As a result the nodes' iptables rules were never written. Re-applying needs coordination with the k3s install now running on them, since the iptables bundle replaces the whole filter table.

Test plan

  • bw verify hm.sun shows the iptables file in sync
  • host reboot of hm.sun keeps -A FORWARD -j ACCEPT (netfilter-persistent is installed and enabled there)

hm.sun's kvm-host bundle sets bridge-nf-call-iptables=1 and the iptables
bundle defaults FORWARD to DROP, so bridged VM traffic on br0 was dropped.
Enable the same FORWARD accept hm.nuke carries.

The node files are copied from hm.nuke-k3s-prod-{master,worker}-0 with
the 192.168.30.0/24 subnet, gateway 192.168.30.1, k3s network
192.168.30.0/24, and no openvpn-client block.
@bborbe
bborbe marked this pull request as ready for review October 20, 2026 19:33

@ben-s-pull-request-reviewer ben-s-pull-request-reviewer Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The review is complete. Let me consolidate findings.

Changes reviewed:

  1. nodes/hm.sun.py — Enables -A FORWARD -j ACCEPT on the sun host, required for KVM bridge networking to function.

  2. nodes/hm.sun-k3s-master-0.py — New k3s master node at 192.168.30.10/24. Follows the established pattern from hm.nuke-k3s-prod-master-0.py (including the node-cidr-mask-size=22 fix), with openvpn-client deliberately omitted since sun is the gateway itself.

  3. nodes/hm.sun-k3s-worker-0.py — New k3s worker node at 192.168.30.11/24. Same pattern as hm.nuke-k3s-prod-worker-0.py with agent: True.

The 192.168.30.0/24 subnet matches sun's bridge (br0 at 192.168.30.2/24), so the k3s nodes will be on the same L2 network as their gateway — correct topology.

The plan notes the apt/apt-get update gap is pre-existing debt in the base templates, not introduced by this PR.

{
  "verdict": "approve",
  "summary": "PR adds two new k3s nodes (master and worker) on the 192.168.30.0/24 subnet behind sun's bridge, and enables FORWARD on sun to allow bridge traffic. The node configurations match established nuke-k3s patterns with the node-cidr-mask-size=22 fix applied to the master. No correctness or security issues found.",
  "comments": [],
  "concerns_addressed": [
    {
      "concern": "correctness: apt/apt-get update gap in nodes/hm.sun.py",
      "disposition": "not-an-issue",
      "detail": "Pre-existing debt in the base templates, not introduced by this PR. The FORWARD rule change is a one-line diff with no apt interaction."
    },
    {
      "concern": "correctness: apt/apt-get update gap in nodes/hm.sun-k3s-master-0.py",
      "disposition": "not-an-issue",
      "detail": "Known gap from copied base template (hm.nuke-k3s-prod-master-0.py); same issue exists in the source. Not introduced by this PR."
    },
    {
      "concern": "correctness: apt/apt-get update gap in nodes/hm.sun-k3s-worker-0.py",
      "disposition": "not-an-issue",
      "detail": "Known gap from copied base template (hm.nuke-k3s-prod-worker-0.py); same issue exists in the source. Not introduced by this PR."
    }
  ]
}

@bborbe
bborbe merged commit cb5225a into master Oct 20, 2026
4 checks passed
@bborbe
bborbe deleted the fix/sun-k3s-vm-host branch October 20, 2026 19:37
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