c1 rook-ceph: host networking on VLAN 21 with msgr2 on-wire encryption #1785

Open
opened 2026-11-22 21:30:06 +00:00 by ginjiruu · 0 comments
Owner

Moved from lab/machine-configs#27. The dual-stack rebuild is done, but Rook still runs on the pod network. Related: #1707 (mons all on Pis), lab/iac ADR-0008, lab/machine-configs ADR-0012.

Goal

Run c1's Ceph on VLAN 21 (10.30.21.0/24, fdd5:c8ef:2fa0:21::/64) with Rook network.provider: host and msgr2 encryption on the wire. Encryption at rest (dm-crypt OSDs) is already live and must stay that way.

Why (decided earlier, with sources)

  • Host networking, not Multus. Rook's Multus mode still needs a host interface and a route on every node, because the CSI plugin runs on the host (mc#27, comment 2026-11-16).
  • One subnet for public and cluster. Ceph treats a separate cluster network as optional. Splitting it adds a failure mode: OSDs flap when the cluster net is down and the public net is up (mc#27 2026-11-16; iac ADR-0008 "VLAN 21 carries both Ceph networks").
  • MTU 1500. The Pi 4 mons can't go higher (bcmgenet maxmtu 1500, checked on pi-01 2026-11-15). A mixed MTU on one VLAN passes small packets and stalls large ones, so the failure would hide until recovery traffic. Jumbo frames would save about 1.5% at 1 Gbit. Revisit at 10G with no Pi on VLAN 21 (iac ADR-0008).
  • Never routed. Static addresses only, no DHCP, no RA, no gateway: "a default route on a storage network is wrong" (iac ADR-0008 table; mc ADR-0012 "VLAN 21"; iac routeros/modules/site/main.tf:23 # never routed, no gateway). Host numbers follow VLAN 20: think-01 is 10.30.21.21 / P:21::21.
  • msgr2 encryption. Host networking bypasses Cilium's encryption, so Rook has to encrypt the traffic itself (mc#27 2026-11-16).
  • Encryption at rest. OSDs are dm-crypt, with keys in OpenBao rook-c1, which the YubiKey unseals (mc#14; clusters/c1/rook/cluster/values.yaml security.kms).
  • Why it wasn't done in place before. Mons can't change address family in place, and VLAN 21 didn't exist before the router cutover (lab/iac#73) (mc#27 2026-11-16). The cutover is done, and the dual-stack rebuild left Rook on the pod network.

Current state (live, 2026-11-22)

  • Rook v1.21.2, Ceph 20.2.5, HEALTH_OK. Rook isn't on host networking: the CephCluster has no network.provider and no addressRanges, and every Ceph pod has hostNetwork: false. public_network and cluster_network are empty.
  • Mons are reached through ClusterIP Services, v2 only, IPv4 only: a 10.30.200.41:3300 (pi-04), b 10.30.194.235:3300 (pi-01), c 10.30.204.188:3300 (pi-03). The mon pods sit on pod IPs 10.30.132-134.x, and ms_bind_ipv6=false.
  • spec.network.connections: encryption.enabled: false, compression.enabled: false, requireMsgr2: true. Effective modes are ms_cluster/service/client_mode = crc secure and ms_mon_*_mode = secure crc, so data-path traffic runs in crc mode, not encrypted.
  • Cilium on c1 has no WireGuard or IPsec (cilium-config has no wireguard or encryption keys). OSD traffic is therefore plaintext on the wire today.
  • Encryption at rest is on: osd-0/1/2 (think-01/02/03) are labelled encrypted=true and run the encryption-kms-get-kek, encryption-open and encrypted-block-status init containers.
  • Data: about 447 MB raw used of 1.6 TB, no Ceph-backed client PVs (only the three ceph-osd local PVs), no ObjectBucketClaims.
  • Nodes: InternalIPs are on VLAN 20 only (10.30.20.x + P:20::x), and no node has a network.rook.io/mon-ip annotation. Kernel 7.2.15 everywhere, which meets the 5.11 minimum for msgr2 and secure mode in kernel clients.
  • Switch ports: VLAN 21 is tagged to the thinks (rb5009-a ether4/5, rb5009-b ether4) and bridged across crs309. The Pi ports (rb5009-a ether6/7, rb5009-b ether6/7) carry tagged = [], so no Pi can reach VLAN 21 today, and all three mons run on Pis.
  • machine-configs: modules/network.nix configures one interface per host (animeteamspeak.host.interface). It has no VLAN 21 interface yet, and nothing on any branch mentions 10.30.21 outside ADR-0012. The host firewall opens only the k8s ports plus DRBD.

Target values (from mc#27)

cephClusterSpec:
  network:
    provider: host
    dualStack: true
    addressRanges:
      public:  ["10.30.21.0/24", "fdd5:c8ef:2fa0:21::/64"]
      cluster: ["10.30.21.0/24", "fdd5:c8ef:2fa0:21::/64"]
    connections:
      encryption: {enabled: true}
      requireMsgr2: true

Tasks

lab/iac (RouterOS):

  • Tag VLAN 21 on the Pi ports: rb5009-a ether6/7 and rb5009-b ether6/7 (tagged = ["21"]). The thinks already have it.
  • Confirm VLAN 21 has no gateway, DHCP or RA on either RB5009 (ADR-0012's context lists 21 among the VLANs with VRRP, DHCP and RA, which contradicts the site module).

lab/machine-configs:

  • Add a VLAN 21 sub-interface option to modules/network.nix: static 10.30.21.<octet>/24 + P:21::<octet>/64, no gateway, accept_ra = 0, MTU 1500. Set it on think-01..03 and all four Pis: CSI node plugins run on every node (mc#25), and mons can fail over to any Pi.
  • Host firewall on the VLAN 21 interface only: TCP 3300 and 6800-7300. Leave 6789 closed, because requireMsgr2 disables v1.
  • Check what binds on the hosts once daemons use host networking: RGW :80 on thinks, mgr dashboard and metrics, exporter. Their Services get node-IP (VLAN 20) endpoints, so the firewall must allow them on VLAN 20 from the cluster, or the ports must change.

lab/clusters:

  • clusters/c1/rook/cluster/values.yaml: add the network block above.
  • mon-ip: node IPs stay on VLAN 20, so each mon node needs network.rook.io/mon-ip: 10.30.21.<octet>. Declare it in code (k3s node config or a Flux-managed patch), not with kubectl annotate. The annotation takes one address: rehearse how that fits dualStack: true.
  • CephFS on-wire encryption for kernel mounts needs ms_mode=secure in the kernel mount options (Rook CephCluster CRD docs, encryption). Set it through ceph-csi-operator (live csi-cluster-config-json has kernelMountOptions: ""). Check that krbd maps with ms_mode=secure too.
  • Pod-network Ceph clients (rook operator, toolbox, anything using librados) must reach the unrouted VLAN 21 through their node. Cilium has devices: "" (auto-detect) and IPv4/IPv6 masquerade on. After the interface lands, check that Cilium picked it up and that ceph -s works from the toolbox.
  • Settle #1707 mon placement in the same change, so mons are created once, on their final nodes and addresses. Any think that gets a mon needs its own mon-ip annotation.
  • Migration path. Recommendation: if Ceph still holds no client data when the window opens, redeploy the CephCluster on host networking. Wipe /var/lib/rook on the mon nodes, re-prepare the 3 OSD partitions, and delete the old OSD keys in OpenBao rook-c1 (Rook only deletes them when the CephCluster is deleted). Otherwise use Rook's documented conversion: change the provider, restart the OSD/MDS/RGW/mgr pods, then fail over the mons one at a time ("existing mons will remain running with the same network settings"). The mon healthCheck timeout is 20m on slow-booting Pis. The address-family change makes this the riskier path.
  • Rehearse first (mc#27 "Lab rehearsal"): bedrock phase B, VLAN 21 on the containerlab bridge labsw, one extra disk per VM, Rook with these values, an RBD mount held open throughout, HEALTH_OK at the end.
  • Rollback: for a redeploy, revert values and redeploy on the pod network. For a conversion, revert values and fail mons back over. Keep the iac and machine-configs VLAN 21 changes, they are harmless on their own.

Done when

  • ceph mon dump: every mon has v2 addrs only in 10.30.21.0/24 (plus P:21::/64 if dual stack holds). No ClusterIP or pod IP.
  • ceph config get osd.0 public_network / cluster_network return the VLAN 21 ranges, and ceph osd dump shows OSD addresses in 10.30.21.x.
  • ceph config get osd.0 ms_cluster_mode / ms_service_mode / ms_client_mode return secure.
  • HEALTH_OK with 3 mons in quorum and 3 OSDs up/in. All three OSDs still run encryption-open, and their dm-crypt keys are in OpenBao rook-c1.
  • An RBD PVC and a CephFS PVC are mounted on a think and on a Pi. The rbd device config_info and the CephFS mount options show ms_mode=secure.
  • From a VLAN 30 client, 10.30.21.21 is unreachable. No node has a default route via its VLAN 21 interface.
  • ss -tn on a think shows ceph-osd peers only on 10.30.21.x.
  • One think reboot (kured) and one Pi reboot each return to HEALTH_OK without a mon failover.
Moved from lab/machine-configs#27. The dual-stack rebuild is done, but Rook still runs on the pod network. Related: #1707 (mons all on Pis), lab/iac ADR-0008, lab/machine-configs ADR-0012. ## Goal Run c1's Ceph on VLAN 21 (`10.30.21.0/24`, `fdd5:c8ef:2fa0:21::/64`) with Rook `network.provider: host` and msgr2 encryption on the wire. Encryption at rest (dm-crypt OSDs) is already live and must stay that way. ## Why (decided earlier, with sources) - **Host networking, not Multus.** Rook's Multus mode still needs a host interface and a route on every node, because the CSI plugin runs on the host (mc#27, comment 2026-11-16). - **One subnet for public and cluster.** Ceph treats a separate cluster network as optional. Splitting it adds a failure mode: OSDs flap when the cluster net is down and the public net is up (mc#27 2026-11-16; iac ADR-0008 "VLAN 21 carries both Ceph networks"). - **MTU 1500.** The Pi 4 mons can't go higher (`bcmgenet maxmtu 1500`, checked on pi-01 2026-11-15). A mixed MTU on one VLAN passes small packets and stalls large ones, so the failure would hide until recovery traffic. Jumbo frames would save about 1.5% at 1 Gbit. Revisit at 10G with no Pi on VLAN 21 (iac ADR-0008). - **Never routed.** Static addresses only, no DHCP, no RA, no gateway: "a default route on a storage network is wrong" (iac ADR-0008 table; mc ADR-0012 "VLAN 21"; iac `routeros/modules/site/main.tf:23` `# never routed, no gateway`). Host numbers follow VLAN 20: think-01 is `10.30.21.21` / `P:21::21`. - **msgr2 encryption.** Host networking bypasses Cilium's encryption, so Rook has to encrypt the traffic itself (mc#27 2026-11-16). - **Encryption at rest.** OSDs are dm-crypt, with keys in OpenBao `rook-c1`, which the YubiKey unseals (mc#14; `clusters/c1/rook/cluster/values.yaml` `security.kms`). - **Why it wasn't done in place before.** Mons can't change address family in place, and VLAN 21 didn't exist before the router cutover (lab/iac#73) (mc#27 2026-11-16). The cutover is done, and the dual-stack rebuild left Rook on the pod network. ## Current state (live, 2026-11-22) - Rook v1.21.2, Ceph 20.2.5, HEALTH_OK. Rook isn't on host networking: the CephCluster has no `network.provider` and no `addressRanges`, and every Ceph pod has `hostNetwork: false`. `public_network` and `cluster_network` are empty. - Mons are reached through ClusterIP Services, v2 only, IPv4 only: a `10.30.200.41:3300` (pi-04), b `10.30.194.235:3300` (pi-01), c `10.30.204.188:3300` (pi-03). The mon pods sit on pod IPs `10.30.132-134.x`, and `ms_bind_ipv6=false`. - `spec.network.connections`: `encryption.enabled: false`, `compression.enabled: false`, `requireMsgr2: true`. Effective modes are `ms_cluster/service/client_mode = crc secure` and `ms_mon_*_mode = secure crc`, so data-path traffic runs in crc mode, not encrypted. - Cilium on c1 has no WireGuard or IPsec (cilium-config has no wireguard or encryption keys). OSD traffic is therefore plaintext on the wire today. - Encryption at rest is on: osd-0/1/2 (think-01/02/03) are labelled `encrypted=true` and run the `encryption-kms-get-kek`, `encryption-open` and `encrypted-block-status` init containers. - Data: about 447 MB raw used of 1.6 TB, no Ceph-backed client PVs (only the three `ceph-osd` local PVs), no ObjectBucketClaims. - Nodes: InternalIPs are on VLAN 20 only (`10.30.20.x` + `P:20::x`), and no node has a `network.rook.io/mon-ip` annotation. Kernel 7.2.15 everywhere, which meets the 5.11 minimum for msgr2 and secure mode in kernel clients. - Switch ports: VLAN 21 is tagged to the thinks (rb5009-a ether4/5, rb5009-b ether4) and bridged across crs309. The Pi ports (rb5009-a ether6/7, rb5009-b ether6/7) carry `tagged = []`, so **no Pi can reach VLAN 21 today**, and all three mons run on Pis. - machine-configs: `modules/network.nix` configures one interface per host (`animeteamspeak.host.interface`). It has no VLAN 21 interface yet, and nothing on any branch mentions `10.30.21` outside ADR-0012. The host firewall opens only the k8s ports plus DRBD. ## Target values (from mc#27) ```yaml cephClusterSpec: network: provider: host dualStack: true addressRanges: public: ["10.30.21.0/24", "fdd5:c8ef:2fa0:21::/64"] cluster: ["10.30.21.0/24", "fdd5:c8ef:2fa0:21::/64"] connections: encryption: {enabled: true} requireMsgr2: true ``` ## Tasks lab/iac (RouterOS): - [ ] Tag VLAN 21 on the Pi ports: rb5009-a ether6/7 and rb5009-b ether6/7 (`tagged = ["21"]`). The thinks already have it. - [ ] Confirm VLAN 21 has no gateway, DHCP or RA on either RB5009 (ADR-0012's context lists 21 among the VLANs with VRRP, DHCP and RA, which contradicts the site module). lab/machine-configs: - [ ] Add a VLAN 21 sub-interface option to `modules/network.nix`: static `10.30.21.<octet>/24` + `P:21::<octet>/64`, no gateway, `accept_ra = 0`, MTU 1500. Set it on think-01..03 and **all four Pis**: CSI node plugins run on every node (mc#25), and mons can fail over to any Pi. - [ ] Host firewall on the VLAN 21 interface only: TCP 3300 and 6800-7300. Leave 6789 closed, because `requireMsgr2` disables v1. - [ ] Check what binds on the hosts once daemons use host networking: RGW `:80` on thinks, mgr dashboard and metrics, exporter. Their Services get node-IP (VLAN 20) endpoints, so the firewall must allow them on VLAN 20 from the cluster, or the ports must change. lab/clusters: - [ ] `clusters/c1/rook/cluster/values.yaml`: add the network block above. - [ ] mon-ip: node IPs stay on VLAN 20, so each mon node needs `network.rook.io/mon-ip: 10.30.21.<octet>`. Declare it in code (k3s node config or a Flux-managed patch), not with `kubectl annotate`. The annotation takes one address: rehearse how that fits `dualStack: true`. - [ ] CephFS on-wire encryption for kernel mounts needs `ms_mode=secure` in the kernel mount options (Rook CephCluster CRD docs, `encryption`). Set it through ceph-csi-operator (live `csi-cluster-config-json` has `kernelMountOptions: ""`). Check that krbd maps with `ms_mode=secure` too. - [ ] Pod-network Ceph clients (rook operator, toolbox, anything using librados) must reach the unrouted VLAN 21 through their node. Cilium has `devices: ""` (auto-detect) and IPv4/IPv6 masquerade on. After the interface lands, check that Cilium picked it up and that `ceph -s` works from the toolbox. - [ ] Settle #1707 mon placement in the same change, so mons are created once, on their final nodes and addresses. Any think that gets a mon needs its own mon-ip annotation. - [ ] Migration path. Recommendation: if Ceph still holds no client data when the window opens, redeploy the CephCluster on host networking. Wipe `/var/lib/rook` on the mon nodes, re-prepare the 3 OSD partitions, and delete the old OSD keys in OpenBao `rook-c1` (Rook only deletes them when the CephCluster is deleted). Otherwise use Rook's documented conversion: change the provider, restart the OSD/MDS/RGW/mgr pods, then fail over the mons one at a time ("existing mons will remain running with the same network settings"). The mon `healthCheck` timeout is 20m on slow-booting Pis. The address-family change makes this the riskier path. - [ ] Rehearse first (mc#27 "Lab rehearsal"): bedrock phase B, VLAN 21 on the containerlab bridge `labsw`, one extra disk per VM, Rook with these values, an RBD mount held open throughout, HEALTH_OK at the end. - [ ] Rollback: for a redeploy, revert values and redeploy on the pod network. For a conversion, revert values and fail mons back over. Keep the iac and machine-configs VLAN 21 changes, they are harmless on their own. ## Done when - `ceph mon dump`: every mon has v2 addrs only in `10.30.21.0/24` (plus `P:21::/64` if dual stack holds). No ClusterIP or pod IP. - `ceph config get osd.0 public_network` / `cluster_network` return the VLAN 21 ranges, and `ceph osd dump` shows OSD addresses in `10.30.21.x`. - `ceph config get osd.0 ms_cluster_mode` / `ms_service_mode` / `ms_client_mode` return `secure`. - HEALTH_OK with 3 mons in quorum and 3 OSDs up/in. All three OSDs still run `encryption-open`, and their dm-crypt keys are in OpenBao `rook-c1`. - An RBD PVC and a CephFS PVC are mounted on a think and on a Pi. The rbd device `config_info` and the CephFS mount options show `ms_mode=secure`. - From a VLAN 30 client, `10.30.21.21` is unreachable. No node has a default route via its VLAN 21 interface. - `ss -tn` on a think shows ceph-osd peers only on `10.30.21.x`. - One think reboot (kured) and one Pi reboot each return to HEALTH_OK without a mon failover.
Sign in to join this conversation.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
lab/clusters#1785
No description provided.