Suggestion: Update DiscoverSriovDevices to use /sys/class/net
in order to support netns isolation
#432
Labels
lifecycle/stale
Denotes an issue or PR has remained open with no activity and has become stale.
We found out that there is a case in which the user needs to distribute the PFs exclusivity in a few network namespaces.
For example running two clusters, each with its own netns,
and each netns with one PF exclusivity (assigned by
ip link set <PF> netns <NS>
).One use case, for example, is to run 2 prow jobs on the same node, each with its own PF and netns.
Since current config-daemon
DiscoverSriovDevices
detects the interfaces via/sys/devices/pci*
,all the PFs would be visible because the daemon runs on host netns.
As a result the unconfigured PFs will be reset in
resetSriovDevice
which is called bySyncNodeState
.This will cause one cluster to corrupt the 2nd cluster, even if the PF isn't in its own netns.
Please consider using
/sys/class/net/*/device/uevent
for discovering instead.Tested it for the above scenario and it fixed the problem,
i could run two clusters, each with its own PF, side by side on the same node.
As we spoke, it should be discussed if there are use cases where the daemon still needs to discover all the interfaces, via
/sys/devices/pci*
and then a flag should be added in order to select the desired discovery method.see U/S k8snetworkplumbingwg/sriov-network-operator#2
/cc @zshi-redhat
The text was updated successfully, but these errors were encountered: