Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"show interfaces neighbor expected" returns empty results when neighbor missing loopback address #15348

Closed
veronica-arista opened this issue Jun 5, 2023 · 2 comments
Assignees
Labels
MSFT Triaged this issue has been triaged

Comments

@veronica-arista
Copy link

veronica-arista commented Jun 5, 2023

Description

"show interfaces neighbor expected" returns empty results when run on our clusters after a recent change in minigraph.py:
1496d1d

Specifically, the device_data now explicitly excludes values that are "None", resulting in the entry being skipped by the "show interfaces neighbor expected" command implementation ( show/interfaces/__init__.py )

Steps to reproduce the issue:

  1. Run "show interfaces neighbor expected" on a DUT for which the neighbor metadata lacks loopback addr

Describe the results you received:

The command now returns empty results, though our device has neighbors:

root@nfc420-7:~# show interfaces neighbor expected
LocalPort    Neighbor    NeighborPort    NeighborLoopback    NeighborMgmt    NeighborType
-----------  ----------  --------------  ------------------  --------------  --------------

root@nfc420-7:~# sonic-cfggen -d --var-json "DEVICE_NEIGHBOR"
{
    "Ethernet0": {
        "name": "ARISTA01T3",
        "port": "Ethernet1"
    },
    "Ethernet160": {
        "name": "ARISTA03T3",
        "port": "Ethernet1"
    },
    "Ethernet168": {
        "name": "ARISTA04T3",
        "port": "Ethernet1"
    },
    "Ethernet172": {
        "name": "ARISTA04T3",
        "port": "Ethernet2"
    },
    "Ethernet176": {
        "name": "ARISTA06T3",
        "port": "Ethernet1"
    },
    "Ethernet36": {
        "name": "ARISTA01T3",
        "port": "Ethernet2"
    }
}

Describe the results you expected:

Prior to the change in minigraph.py the command returned the following on the same device:

root@nfc420-7:~$ show interfaces neighbor expected
LocalPort    Neighbor    NeighborPort    NeighborLoopback    NeighborMgmt    NeighborType
-----------  ----------  --------------  ------------------  --------------  --------------
Ethernet0    ARISTA01T3  Ethernet1       None                10.250.25.2     CoreRouter
Ethernet36   ARISTA01T3  Ethernet2       None                10.250.25.2     CoreRouter
Ethernet160  ARISTA03T3  Ethernet1       None                10.250.25.3     CoreRouter
Ethernet168  ARISTA04T3  Ethernet1       None                10.250.25.4     CoreRouter
Ethernet172  ARISTA04T3  Ethernet2       None                10.250.25.4     CoreRouter
Ethernet176  ARISTA06T3  Ethernet1       None                10.250.25.5     CoreRouter

Output of show version:

Output of show techsupport:

Additional information you deem important (e.g. issue happens only occasionally):

@judyjoseph
Copy link
Contributor

@jcaiMR Could you check why it is getting skipped in show command. Thanks.

@judyjoseph judyjoseph added the Triaged this issue has been triaged label Jun 7, 2023
@judyjoseph judyjoseph added the MSFT label Jun 7, 2023
@wenyiz2021
Copy link
Contributor

this issue should be fixed by sonic-net/sonic-utilities#2465
it is already in 202205
it adds safety check if lo_addr etc is emtpy

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
MSFT Triaged this issue has been triaged
Projects
None yet
Development

No branches or pull requests

4 participants