Skip to content

RT-5.7_Fix#5264

Open
suredhar wants to merge 4 commits intoopenconfig:mainfrom
b4firex:rt-5.7_fix
Open

RT-5.7_Fix#5264
suredhar wants to merge 4 commits intoopenconfig:mainfrom
b4firex:rt-5.7_fix

Conversation

@suredhar
Copy link
Copy Markdown
Contributor

RT-5.7 AGGREGATE ALL NOT VIABLE TEST - CODE CHANGES EXPLANATION

CHANGE #1: VRF ASSIGNMENT FIX FOR CISCO LAG INTERFACES

Location: aggregate_all_not_forwarding_viable_test.go, lines 529-537

Problem:

The test was calling fptest.AssignToNetworkInstance() for all interfaces
including LAG (Bundle-Ether) interfaces. On Cisco devices, LAG interfaces
cannot be directly assigned to a VRF/Network Instance.

Error Message:
"'RSI' detected the 'warning' condition 'The specified interface type does not
support VRFs'"

Code Change:

BEFORE:
fptest.AssignToNetworkInstance(t, dut, p.Name(),
deviations.DefaultNetworkInstance(dut), 0)

AFTER:
// Assign the interface to the default network instance if not CISCO
// Cisco LAG interfaces do not support VRF assignment
if dut.Vendor() != ondatra.CISCO {
fptest.AssignToNetworkInstance(t, dut, p.Name(),
deviations.DefaultNetworkInstance(dut), 0)
}

Explanation:

Cisco IOS-XR handles LAG interfaces differently from other vendors. Bundle-Ether
interfaces are implicitly part of the default network instance and cannot be
explicitly assigned to a VRF. The fix adds a vendor check to skip this
assignment for Cisco devices only.

CHANGE #2: LOOPBACK INTERFACE CONFIGURATION FOR ISIS

Location: aggregate_all_not_forwarding_viable_test.go, lines 561-564, 590-612

Problem:

Cisco requires a loopback interface for ISIS to function properly. The test
was not configuring Loopback0 when the ISISLoopbackRequired deviation is true.

Code Added:

  1. Conditional loopback configuration call:

    // Configure Loopback0 for Cisco where ISIS requires a loopback interface
    if deviations.ISISLoopbackRequired(dut) {
    configureLoopback(t, dut)
    aggIDs = append(aggIDs, "Loopback0")
    }

  2. New configureLoopback function:

    func configureLoopback(t *testing.T, dut *ondatra.DUTDevice) {
    t.Helper()
    d := &oc.Root{}
    loopbackIntf := d.GetOrCreateInterface("Loopback0")
    loopbackIntf.Name = ygot.String("Loopback0")
    loopbackIntf.Description = ygot.String("Loopback for ISIS")
    loopbackIntf.Type = oc.IETFInterfaces_InterfaceType_softwareLoopback
    if deviations.InterfaceEnabled(dut) {
    loopbackIntf.Enabled = ygot.Bool(true)
    }
    s := loopbackIntf.GetOrCreateSubinterface(0)
    s4 := s.GetOrCreateIpv4()
    if deviations.InterfaceEnabled(dut) {
    s4.Enabled = ygot.Bool(true)
    }
    s4.GetOrCreateAddress(dutLoopback.IPv4).PrefixLength = ygot.Uint8(dutLoopback.IPv4Len)
    s6 := s.GetOrCreateIpv6()
    if deviations.InterfaceEnabled(dut) {
    s6.Enabled = ygot.Bool(true)
    }
    s6.GetOrCreateAddress(dutLoopback.IPv6).PrefixLength = ygot.Uint8(dutLoopback.IPv6Len)
    gnmi.Update(t, dut, gnmi.OC().Interface("Loopback0").Config(), loopbackIntf)
    }

Explanation:

Cisco IOS-XR ISIS implementation requires a loopback interface to be configured
and included in ISIS for proper route advertisement. The Loopback0 interface:

  • Uses IP 192.0.2.21/32 and 2001:db8::21/128
  • Is added to the aggIDs list so it gets configured in ISIS
  • Serves as the router-ID source for ISIS

CHANGE #3: ISIS LOOPBACK INTERFACE HANDLING

Location: aggregate_all_not_forwarding_viable_test.go, lines 801-840

Problem:

The configureDUTISIS function was treating all interfaces the same:

  1. Adding ".0" suffix to ALL interfaces when InterfaceRefInterfaceIDFormat is true
  2. Setting CircuitType to POINT_TO_POINT for ALL interfaces
  3. Not setting loopback interfaces as passive

This caused:

  • Invalid interface name "Loopback0.0" (Cisco doesn't use this format)
  • Loopback interfaces trying to form adjacencies (should be passive)

Code Change:

BEFORE:
for _, aggID := range aggIDs {
isisIntf := isis.GetOrCreateInterface(aggID)
if deviations.InterfaceRefInterfaceIDFormat(dut) {
isisIntf = isis.GetOrCreateInterface(aggID + ".0")
}
// ... same treatment for all interfaces
isisIntf.CircuitType = oc.Isis_CircuitType_POINT_TO_POINT

AFTER:
for _, aggID := range aggIDs {
isLoopback := strings.HasPrefix(strings.ToLower(aggID), "loopback")
intfID := aggID
// Only add .0 suffix for non-loopback interfaces
// Loopback interfaces on Cisco do not use subinterface notation
if deviations.InterfaceRefInterfaceIDFormat(dut) && !isLoopback {
intfID = aggID + ".0"
}
isisIntf := isis.GetOrCreateInterface(intfID)
// ...
isisIntf.Enabled = ygot.Bool(true)
// Loopback interfaces should be passive (they don't form ISIS adjacencies)
if isLoopback {
isisIntf.SetPassive(true)
} else {
isisIntf.CircuitType = oc.Isis_CircuitType_POINT_TO_POINT
}

Explanation:

  1. Loopback Detection: strings.HasPrefix(strings.ToLower(aggID), "loopback")

    • Detects if the interface is a loopback interface
  2. Skip ".0" suffix for loopback:

    • Cisco Loopback interfaces don't use subinterface notation
    • "Loopback0" is valid, "Loopback0.0" is NOT valid
  3. Set Passive for loopback:

    • Loopback interfaces don't need to form ISIS adjacencies
    • They just advertise their routes into ISIS
    • SetPassive(true) tells ISIS to advertise the loopback subnet but not
      send/receive ISIS hello packets on this interface
  4. CircuitType only for non-loopback:

    • POINT_TO_POINT circuit type is only for actual network interfaces
    • Loopback interfaces are internal and don't have a circuit type

CHANGE #4: ISIS ADJACENCY LOOKUP PATH FIX

Location: aggregate_all_not_forwarding_viable_test.go, lines 243-246, 396-399,
1253-1261

Problem:

The awaitAdjacency function and direct gnmi.LookupAll calls were using the base
interface name (e.g., "Bundle-Ether2") to query ISIS adjacency state. However,
when InterfaceRefInterfaceIDFormat deviation is true, ISIS interface would be
configured as "Bundle-Ether2.0", causing lookups to fail.

Code Change:

  1. Modified awaitAdjacency function:

    func awaitAdjacency(t *testing.T, dut *ondatra.DUTDevice, intfName string,
    state []oc.E_Isis_IsisInterfaceAdjState) bool {
    isisIntfID := intfName
    // When InterfaceRefInterfaceIDFormat is true, ISIS interface ID has .0 suffix
    if deviations.InterfaceRefInterfaceIDFormat(dut) &&
    !strings.HasPrefix(strings.ToLower(intfName), "loopback") {
    isisIntfID = intfName + ".0"
    }
    isisPath := ocpath.Root().NetworkInstance(deviations.DefaultNetworkInstance(dut)).
    Protocol(oc.PolicyTypes_INSTALL_PROTOCOL_TYPE_ISIS, isisInstance).Isis()
    intf := isisPath.Interface(isisIntfID)
    // ...
    }

  2. Fixed direct gnmi.LookupAll calls:

    if ok := awaitAdjacency(...); !ok {
    isisIntfID := aggIDs[1]
    if deviations.InterfaceRefInterfaceIDFormat(dut) {
    isisIntfID = aggIDs[1] + ".0"
    }
    if presence := gnmi.LookupAll(t, dut, ocpath.Root()...
    .Isis().Interface(isisIntfID).LevelAny()...); len(presence) > 0 {
    // ...
    }
    }

Explanation:

The ISIS state query path must match the configured ISIS interface name. When
InterfaceRefInterfaceIDFormat deviation is enabled, the ISIS interface is
configured with ".0" suffix, so queries must also use the same suffix.

CHANGE #5: METADATA DEVIATION FIX (CRITICAL)

Location: metadata.textproto, Cisco platform_exceptions section

Problem:

The test had interface_ref_interface_id_format: true deviation set for Cisco,
but comparing with WORKING Cisco ISIS tests revealed they don't use this deviation:

Test Uses interface_ref_interface_id_format
weighted_ecmp_test (WORKS) NO
isis_drain_test (WORKS) NO
aggregate_all_not_viable YES <-- PROBLEM

This deviation was causing:

  1. ISIS interface names to use ".0" suffix (Bundle-Ether2.0)
  2. Mismatch between configured interface and ISIS adjacency lookup
  3. ISIS adjacency never forming properly

Code Change:

BEFORE:
platform_exceptions: {
platform: {
vendor: CISCO
}
deviations: {
interface_ref_config_unsupported:true
wecmp_auto_unsupported: true
isis_loopback_required: true
weighted_ecmp_fixed_packet_verification: true
interface_ref_interface_id_format: true <-- REMOVED
}
}

AFTER:
platform_exceptions: {
platform: {
vendor: CISCO
}
deviations: {
interface_ref_config_unsupported:true
wecmp_auto_unsupported: true
isis_loopback_required: true
weighted_ecmp_fixed_packet_verification: true
}
}

Explanation:

The interface_ref_interface_id_format deviation is used for certain interfaces
that require subinterface notation in their configuration. However, for Cisco
LAG interfaces in ISIS, this is not needed. Working Cisco ISIS tests use only:

  • interface_ref_config_unsupported: true (skip interface-ref in ISIS config)
  • isis_loopback_required: true (configure Loopback0 for ISIS)

Removing this unnecessary deviation ensures ISIS interfaces are configured
with the correct names that match the actual interface names on the device.

FILES MODIFIED

  1. aggregate_all_not_forwarding_viable_test.go

  2. metadata.textproto

@suredhar suredhar requested a review from a team as a code owner March 26, 2026 06:12
@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request addresses several critical issues related to ISIS configuration and network instance assignment specifically for Cisco devices within a test environment. The changes ensure proper handling of LAG and loopback interfaces, correct ISIS adjacency lookups by aligning query paths with configured interface names, and resolve an incorrect metadata deviation. These fixes collectively lead to more robust and accurate network testing by accommodating Cisco-specific networking behaviors.

Highlights

  • VRF Assignment Fix for Cisco LAG Interfaces: Implemented a vendor check to prevent assigning Cisco LAG (Bundle-Ether) interfaces to VRFs, resolving an error where Cisco devices do not support direct VRF assignment for these interface types.
  • Loopback Interface Configuration for ISIS: Added conditional configuration for Loopback0 on Cisco devices when the ISISLoopbackRequired deviation is true, ensuring ISIS functions properly by providing a required loopback interface with specified IPv4 and IPv6 addresses.
  • ISIS Loopback Interface Handling: Modified ISIS configuration to correctly handle loopback interfaces by detecting them, skipping the '.0' suffix for their names, setting them as passive to prevent adjacency formation, and applying the POINT_TO_POINT circuit type only to non-loopback interfaces.
  • ISIS Adjacency Lookup Path Fix: Updated the awaitAdjacency function and direct gnmi.LookupAll calls to correctly query ISIS adjacency state by conditionally appending the '.0' suffix to interface IDs for non-loopback interfaces when the InterfaceRefInterfaceIDFormat deviation is true, matching the configured ISIS interface names.
  • Metadata Deviation Fix (CRITICAL): Removed the interface_ref_interface_id_format: true deviation for Cisco platforms in metadata.textproto, as this deviation was incorrectly applied and caused mismatches between configured ISIS interface names and adjacency lookups, leading to ISIS adjacency failures.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@OpenConfigBot
Copy link
Copy Markdown

OpenConfigBot commented Mar 26, 2026

Pull Request Functional Test Report for #5264 / 52f2931

Virtual Devices

Device Test Test Documentation Job Raw Log
Arista cEOS status
RT-5.7: Aggregate Not Viable All
Cisco 8000E status
RT-5.7: Aggregate Not Viable All
Cisco XRd status
RT-5.7: Aggregate Not Viable All
Juniper ncPTX status
RT-5.7: Aggregate Not Viable All
Nokia SR Linux status
RT-5.7: Aggregate Not Viable All
Openconfig Lemming status
RT-5.7: Aggregate Not Viable All

Hardware Devices

Device Test Test Documentation Raw Log
Arista 7808 status
RT-5.7: Aggregate Not Viable All
Cisco 8808 status
RT-5.7: Aggregate Not Viable All
Juniper PTX10008 status
RT-5.7: Aggregate Not Viable All
Nokia 7250 IXR-10e status
RT-5.7: Aggregate Not Viable All

Help

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request removes the interface_ref_interface_id_format platform exception from the metadata.textproto file for the aggregate_all_not_viable_test. There are no review comments to address.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants