Skip to content

e2e: cover the RHCOS node composition, lldpad running on nodes alongside NetworkManager LLDP reporting #1551

Description

@qinqon

Background

RHCOS now ships lldpad running on the nodes (see OCPSTRAT-2580 "Add LLDPAD to RHCOS"), so on production OpenShift nodes a node-local LLDP agent transmits LLDPDUs (and does DCBX) on the same interfaces where NetworkManager collects LLDP neighbors for nmstate/kubernetes-nmstate reporting.

This co-located agent setup is exactly the scenario behind the phantom "self neighbor" that NetworkManager fixed in NetworkManager/NetworkManager@9a79eba502 ("lldp: filter out frames sourced by the local interface", >= 1.59.1~dev): the agent's outgoing frames are seen by NM's packet socket and, before that fix, NM reported the host itself as its own LLDP neighbor. That NM behavior change is what broke our previous LLDP e2e test (#1548), fixed by the switch emulation in #1549.

Our kubevirtci nodes do not run any node-local LLDP agent, so this production composition is currently untested.

Proposal

Emulate the RHCOS node composition in the e2e environment and cover the lldpad/NM interop:

  1. Install and enable lldpad (TX enabled) on the kubevirtci nodes during cluster/up.sh, mirroring what RHCOS ships.
  2. Extend the LLDP e2e spec (test/e2e/handler/lldp_with_nmpolicy_test.go):
    • Keep asserting the emulated switch neighbor (lldp-switch system name) is reported in NNS — already covered by e2e, cluster: emulate a LLDP switch on the cluster network #1549 and safe against lldpad noise because the assertion matches the specific system name.
    • Add an assertion that the node does not report itself as its own LLDP neighbor (no neighbor entry with the node's own chassis/port MAC or hostname). On NetworkManager >= 1.59.1 this validates the self-frame filter end to end through nmstate/kubernetes-nmstate reporting; it also documents the expected behavior and would catch regressions in NM main via the -latest lanes.
  3. Optionally verify that enabling/disabling lldp through an NNCP does not interfere with the running lldpad agent (both use their own packet sockets, but coexistence is exactly what production will exercise).

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions