← Back to Pull requests

net, evpn: fix EVPN test infrastructure for OVN-K VTEP BGP advertisement #6208

Closed
unknown closed this pull request without merging on Sep 08, 2026 09:34 UTC
View on GitHub
unknown unknown commented on Sep 03, 2026 13:18 UTC
Author

##### What this PR does / why we need it:

Fix the external FRR pod nexthop advertisement to be compatible with
the VTEP host IP BGP advertisement introduced in recent OVN-K versions,
and strengthen the overall EVPN test setup.

Main fix — frr-external nexthop advertisement:
Recent OVN-K versions introduced per-node VTEP host IP advertisement
via BGP through the ovnk-generated FRRConfiguration. With eBGP
next-hop-self, the external FRR pod was re-advertising these /32 host
routes to peer nodes with itself as the next-hop, installing host routes
in the main routing table that redirected all inter-node traffic
(including etcd raft) through the FRR pod, which dropped it.
Fixed by using attribute-unchanged next-hop so the original node IP
is preserved, making the host routes harmless.

FRR reference:
https://docs.frrouting.org/en/latest/bgp.html#clicmd-neighbor-PEER-attribute-unchanged-as-path-next-hop-med

EVPN setup improvements:

  • use node-primary-ifaddr for node IP extraction

  • Replace parsing of k8s.ovn.org/host-cidrs with k8s.ovn.org/node-primary-ifaddr.
    OVN-K sets this annotation to the node's primary interface address per address
    family, giving exactly one unambiguous entry per family.

  • ovn_local_gateway_mode yielded without waiting

  • Patching routingViaHost: True triggers an OVN-K DaemonSet rollout.
    Following the same pattern used in similar network operator patches
    across the repo (e.g. cluster_network_resource_ra_enabled,
    multi_network_policy_enabled), add wait_for_consistent_resource_conditions
    on the network ClusterOperator before yielding and after teardown.
    This is a safety measure to ensure the cluster is fully stable before and after
    applying the routingViaHost: True patch, consistent with how other fixtures
    handle network operator changes.

  • remove redundant as-path exclusion from evpn route-map

  • OVN-K now generates allowas-in origin on nodes for both IPv4 unicast
    and L2VPN EVPN address families, so cluster nodes accept routes where
    their own ASN is the origin AS without needing the external FRR pod to
    strip it first.
    References:
    https://github.com/ovn-kubernetes/ovn-kubernetes/pull/6307
    https://github.com/ovn-kubernetes/ovn-kubernetes/pull/6481

    ##### Which issue(s) this PR fixes:

    ##### Special notes for reviewer:

    ##### jira-ticket:
    NONE

    <!-- This is an auto-generated comment: release notes by coderabbit.ai -->

    Summary by CodeRabbit

    Bug Fixes

  • Improved BGP external-router configuration to preserve IPv4 next-hop information and correctly handle EVPN routes.

  • Improved EVPN gateway-mode updates by confirming network components reach consistent states before and after changes.
  • Tests

  • Improved EVPN and VTEP validation by using each worker’s primary IPv4 network information for more reliable network checks.

  • <!-- end of auto-generated comment: release notes by coderabbit.ai -->

    Diff: 368 lines (+276 / -92) across 4 files Reviewer: qinqon Review duration: 6976m
    All Vouch review confidence checks passed
    Residual risk 0.26 = Change Risk (0.66) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.66 · 368 lines diff across 4 files
    0.66
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.354
    Shallow Review Depth shallow_review_depth
    0.289
    Sensitive Paths sensitive_paths
    0.066
    Real PR Conversation Timeline
    1 comments
    "Review active on #6208"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed sensitive_module
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 65.9% (HIGH) · Higher = larger blast radius
    65.9%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 60.5% · Lower = rushed or shallow review
    60.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 26% · Safe to merge
    26%