Skip to content

Bug: T2 fails test_lo_interface.py with Failed: Loopback interface 'Loopback4096' is not deleted successfully #23586

@arista-nwolfe

Description

@arista-nwolfe

Is it platform specific

generic

Importance or Severity

High

Description of the bug

generic_config_updater/test_lo_interface.py was recently updated to run on T2 chassis in #17293
test_lo_interface.py::test_lo_interface_tc1_suite tries to remove all the configured loopback interfaces in cleanup_lo_interface_config.
On T2 chassis this will be 2 loopback ports:

(Pdb) cfg_facts.get('LOOPBACK_INTERFACE',{})
{'Loopback0': {'10.1.0.1/32': {}, 'fc00:10::1/128': {}}, 'Loopback4096': {'2603:10e2:400::1/128': {}, '8.0.0.1/32': {}}}

The problem is if you try to delete Loopback4096 it will return an error:

> sudo config loopback del Loopback4096
Usage: config loopback del [OPTIONS] <loopback_name>
Try 'config loopback del -h' for help.

Error: Loopback4096 is invalid, name should have prefix 'Loopback' and suffix '<0-999>'

This upper bound restriction of 999 comes from this code and has been there for a long time:
https://github.com/sonic-net/sonic-utilities/blob/202511/config/main.py#L108

The usage of Loopback4096 comes from the TestbedProcessing script and has been there for a long time as well:
https://github.com/sonic-net/sonic-mgmt/blob/master/ansible/TestbedProcessing.py#L713-L717

Steps to Reproduce

Run generic_config_updater/test_lo_interface.py on T2.

Actual Behavior and Expected Behavior

generic_config_updater/test_lo_interface.py should pass on T2.

Relevant log output

Output of show version

Attach files (if any)

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions