Bug reportPending

k8s_network_check reports flannel.1 missing when ip -d link crashes, and advises restarting k3s on a healthy node

Thanhlinh9191Posted

Bug Details

Thanks for shipping FEAT-110 so quickly. k8s_top, server-side apply, k8s_create_secret and the k8s_join_node dry run all work on our 4-node k3s cluster (1 arm64 server on Ubuntu 24.04.5 plus 3 amd64 agents, flannel vxlan over tailscale0). The network check has two problems.

  1. False "flannel.1 missing" on the server node. k8s_network_check and k8s_overview both report "Pod network degraded: flannel.1 is missing on ... restart k3s (k8s_restart_k3s)", and overview health becomes degraded. The interface is actually there and working: ip -br link shows flannel.1 UP with the MAC that the node's flannel annotation announces, routes to all three other pod CIDRs go through flannel.1, and pinging every other node's flannel address succeeds. The tool's own result agrees: interfacePresent is false and mac is null, yet all three probes say reachable: true.

The cause appears to be that on this node "ip -d link show flannel.1" crashes with a segmentation fault (exit code 139, empty output; iproute2 6.1.0, arm64), and the check treats the empty output as a missing interface. "ip -br link show flannel.1", "ip -j link show flannel.1" and /sys/class/net/flannel.1/address all work on the same node.

Suggested fix: fall back to ip -j link or /sys/class/net/ when ip -d fails, and report "could not read interface details" rather than "missing" when the command errors. Also, when every cross-node probe from a node succeeds, please don't recommend restarting k3s there. Following that advice restarts the control plane for nothing.

  1. nodeServerIds is ignored for some nodes. I passed the Server Compass server ids of all three agents in nodeServerIds. Only one of them was checked. For the other two the result still says "not a Server Compass server: add it, or pass its server id in nodeServerIds". The one that was matched has a hostname that starts with its node name. The two that were skipped have hostnames unrelated to their node names (one is literally "ubuntu"). All nodes register with their Tailscale IP as InternalIP, while the servers are added in Server Compass by public IP. It looks like matching still goes by hostname or address even when the id is given. Explicit ids should be used as given, perhaps confirmed by checking that the server has a flannel.1 whose MAC matches one node's annotation.

Small related note: the k8s_join_node description says it checks the firewall, but the dry run result has no firewall row (systemd, curl, arch, clean, ports, api and name are listed).

Steps to reproduce: on a k3s server node where "ip -d link show flannel.1" segfaults, run k8s_network_check(serverId) or k8s_overview(serverId, force=true). Then call k8s_network_check with nodeServerIds set to agents whose hostname differs from their node name.

Reproducibility: Unknown · Impact: Minor issue

Environment

VERSION
1.47.1
OS
macOS 26.5
ARCH
—
CHANNEL
—

Resolution progress

  1. PENDING

  2. REVIEWING

    —

  3. IN PROGRESS

    —

  4. COMPLETED

    —

  • — Thanhlinh9191 submitted this request

Discussion0

Newest first
  • No comments yet. Add context or ask a question below.

Sign in to comment, vote and follow this request.

Sign in to reply