Skip to content

host-device: support wireless PHY namespace moves#1274

Draft
mbaragiola wants to merge 1 commit into
containernetworking:mainfrom
mbaragiola:feat/host-device-wireless-phy
Draft

host-device: support wireless PHY namespace moves#1274
mbaragiola wants to merge 1 commit into
containernetworking:mainfrom
mbaragiola:feat/host-device-wireless-phy

Conversation

@mbaragiola

Copy link
Copy Markdown

Summary

Add wireless PHY support to the host-device CNI plugin.

Linux wireless devices cannot be moved with the ordinary RTM_SETLINK/LinkSetNsFd path. This change detects wireless interfaces through sysfs and uses the nl80211 wiphy move operation instead.

Safety behavior:

  • Wireless PHYs with sibling interfaces are rejected because moving a wiphy moves every associated interface.
  • Ordinary links retain the existing movement path.
  • ADD, DEL, and rollback paths use the matching operation.
  • The unavoidable race between sysfs sibling enumeration and the subsequent wiphy move is documented; there is no atomic userspace operation covering both steps.

Dependency

This PR depends on the Linux-only API proposed in:

The current declared vishvananda/netlink v1.3.1 does not contain WiphySetNsFd, so this PR is intentionally opened as a draft until that API is accepted and released (or the maintainers advise on dependency sequencing).

Related issue: #957

Testing

  • Focused wireless tests with a temporary local netlink replacement: passed.
  • go vet for plugins/main/host-device with the temporary local replacement: passed.
  • gofmt and git diff --check: passed.
  • go.mod and go.sum remain unchanged.
  • Privileged namespace integration tests cannot run in the current sandbox because namespace setup fails with operation not permitted.

@mbaragiola

Copy link
Copy Markdown
Author

CI is currently blocked by dependency sequencing, not by the GitHub runner and not by a separate defect found in this CNI diff.

Exact evidence:

  • The latest CNI workflow run is 29760443748, job 88413435298 (Lint). golangci-lint reaches Go type checking and fails at plugins/main/host-device/host-device.go:49:25 with undefined: netlink.WiphySetNsFd.
  • This branch's go.mod and vendor metadata still select github.com/vishvananda/netlink v1.3.1. That release does not contain WiphySetNsFd; the API is introduced by nl80211: add wiphy network namespace support vishvananda/netlink#1203, whose current head is 8079d6be48527700e1628d3ff69563c94656eb61.
  • I reproduced the identical type-check error locally with the declared dependency.
  • In an isolated temporary tree, I supplied the exact API implementation from netlink PR build(deps): bump the golang group across 1 directory with 3 updates #1203 without changing this branch's go.mod or adding a replace directive. The 9 new wireless device moves specs passed, and the host-device test package compiled for every architecture used by CNI CI: amd64 386 arm arm64 s390x mips64le ppc64le riscv64.
  • The other 44 host-device specs could not execute in the local sandbox because test namespace setup failed with mount --make-rshared /run/user/1000/netns: operation not permitted; this occurred after successful compilation and is local privilege/environment evidence only.
  • I reviewed the full 206-line CNI diff and did not find an independent actionable defect that would explain the CI result.

Note that netlink PR #1203 itself currently has an unrelated Linux check failure: run 29760919064, job 88415026849, fails while compiling pre-existing handle_retry_linux_test.go:60 because (*Handle).RetryInterrupted is undefined. Its macOS check passes. That needs to be resolved in the dependency PR, then the netlink change must be merged and released (or otherwise become a publishable module version), after which this CNI PR can update go.mod and vendor normally.

No CNI code or module files were changed.

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