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

[Debian9-Accton_AS5712_54X] - decode-syseeprom/show platform syseeprom errors #1969

Closed
vivekvijaykumar opened this issue Aug 22, 2018 · 6 comments
Assignees

Comments

@vivekvijaykumar
Copy link

vivekvijaykumar commented Aug 22, 2018

Description

show platform syseeprom  (or) decode-syseeprom errors on  AS5712_54X platform with the following error
/usr/bin/decode-syseeprom : ERROR : [Errno 2] No such file or directory: '/sys/bus/i2c/devices/0-0057/eeprom'

platform : AS5712_54x

Steps to reproduce the issue:

1. install August 14 build of Sonic on AS5712_54x - (SONiC Software Version: SONiC.HEAD.676-e15cf2d)
2. run the command "show platform syseeprom" to hit the error

Describe the results you received:

/usr/bin/decode-syseeprom : ERROR : [Errno 2] No such file or directory: '/sys/bus/i2c/devices/0-0057/eeprom'

Describe the results you expected:

admin@sonic:~$ show platform syseeprom
TlvInfo Header:
   Id String:    TlvInfo
   Version:      1
   Total Length: 168
TLV Name             Code Len Value
-------------------- ---- --- -----
Base MAC Address     0x24   6 70:72:CF:DF:ED:D8
Serial Number        0x23  14 571254X1448005
Manufacture Date     0x25  19 12/27/2014 04:34:28
Part Number          0x22  13 FP1ZZ5654001A
Product Name         0x21  15 5712-54X-O-AC-F
MAC Addresses        0x2A   2 74
Manufacturer         0x2B   6 Accton
Manufacture Country  0x2C   2 TW
Vendor Name          0x2D   8 Edgecore
Diag Version         0x2E   7 2.0.1.0
Label Revision       0x27   4 R01H
Platform Name        0x28  27 x86_64-accton_as5712_54x-r0
ONIE Version         0x29  13 2014.08.00.05
CRC-32               0xFE   4 0xD7C9B0AF

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

**Output of `show version`:**
root@sonic:/home/admin# show version
SONiC Software Version: SONiC.HEAD.676-e15cf2d
Distribution: Debian 9.5
Kernel: 4.9.0-5-amd64
Build commit: e15cf2d
Build date: Tue Aug 14 09:21:17 UTC 2018
Built by: johnar@jenkins-worker-4

Docker images:
REPOSITORY                 TAG                 IMAGE ID            SIZE
docker-syncd-brcm          HEAD.676-e15cf2d    7a39b6bb40ed        336.6 MB
docker-syncd-brcm          latest              7a39b6bb40ed        336.6 MB
docker-orchagent-brcm      HEAD.676-e15cf2d    b2295fe43cd6        257.6 MB
docker-orchagent-brcm      latest              b2295fe43cd6        257.6 MB
docker-lldp-sv2            HEAD.676-e15cf2d    6841766061a6        270.8 MB
docker-lldp-sv2            latest              6841766061a6        270.8 MB
docker-dhcp-relay          HEAD.676-e15cf2d    5ad496a252c9        253.6 MB
docker-dhcp-relay          latest              5ad496a252c9        253.6 MB
docker-database            HEAD.676-e15cf2d    6bc5cce9d6da        252.3 MB
docker-database            latest              6bc5cce9d6da        252.3 MB
docker-teamd               HEAD.676-e15cf2d    0b41b79cb36e        257.1 MB
docker-teamd               latest              0b41b79cb36e        257.1 MB
docker-snmp-sv2            HEAD.676-e15cf2d    621199b8bf75        291.1 MB
docker-snmp-sv2            latest              621199b8bf75        291.1 MB
docker-router-advertiser   HEAD.676-e15cf2d    7b62a6fd3dc7        250 MB
docker-router-advertiser   latest              7b62a6fd3dc7        250 MB
docker-platform-monitor    HEAD.676-e15cf2d    b6fd06891f9d        283.1 MB
docker-platform-monitor    latest              b6fd06891f9d        283.1 MB
docker-fpm-quagga          HEAD.676-e15cf2d    1c128eb2d68f        263.9 MB
docker-fpm-quagga          latest              1c128eb2d68f        263.9 MB
@vivekvijaykumar vivekvijaykumar changed the title [Debian9-Dell-Z9100] - decode-syseeprom/show platform syseeprom errors [Debian9-Accton_AS5712_54X] - decode-syseeprom/show platform syseeprom errors Aug 23, 2018
@lguohan
Copy link
Collaborator

lguohan commented Sep 1, 2018

@xinliu-seattle
Copy link
Contributor

@vivekvijaykumar: can you please retry if this repros?

@xinliu-seattle
Copy link
Contributor

I am contacting Accton POC on this.

@xinliu-seattle xinliu-seattle removed their assignment Sep 2, 2018
@vivekvijaykumar
Copy link
Author

@xinliu-seattle: we tried the latest build (sep21) and that seems to have the bug still . The July build was OK.

Could you please pass on the Accton POC ? we will also try to ping them to see the progress of this.

@xinliu-seattle xinliu-seattle self-assigned this Sep 21, 2018
@roylee123
Copy link
Collaborator

Hi, I've just sent a PR, #2110, to fix this problem on master branch.
Your can wait for PR been merged, or built it on my repository.

@lguohan
Copy link
Collaborator

lguohan commented Oct 2, 2018

#2110 merged.

@lguohan lguohan closed this as completed Oct 14, 2018
qiluo-msft added a commit that referenced this issue Dec 20, 2021
#### Why I did it
Including below commits:
```
fe00bbf 2021-12-17 | Revert "[sonic-package-manager] support sonic-cli-gen and packages with YANG model (#1650)" (#1972) [Prince George]
5fe6d92 2021-12-16 | [warm/fast-reboot] Fix kexec portion to support platforms based on Device Tree (#1966) [dflynn-Nokia]
74d2a09 2021-12-17 | [portstat] check TX/RX utilization calculation correctness (#1840) [Andriy Yurkiv]
e44c3f6 2021-12-16 | [generic-config-updater] Improving CreateOnly validator and marking /LOOPBACK_INTERFACE/LOOPBACK#/vrf_name as create-only (#1969) [Mohamed Ghoneim]
0067cc4 2021-12-15 | [build] adapt for upstream target path change (#1971) [Qi Luo]
96143ee 2021-12-09 | preserve old order for config reload (#1964) [arlakshm]
f08c81d 2021-12-10 | [vxlan] remove unnecessary whitespace for show commands (#1792) [Gord Chen]
14889ce 2021-12-09 | [soft-reboot] Add support for platforms based on Device Tree (#1963) [dflynn-Nokia]
7ceccd7 2021-12-08 | [generic-config-updater] Adding non-strict mode (#1929) [Mohamed Ghoneim]
2e462ef 2021-12-07 | [sfputil] Firmware download/upgrade CLI support for QSFP-DD (#1947) [Prince George]
7c34b79 2021-12-07 | [config] Add portchannel support  for static route  (#1857) [Dmytro]
54cc370 2021-12-06 | [doc] Refine doc on show loopback/mgmt ports (#1958) [Qi Luo]
3714f63 2021-12-06 | [port2alias]: Fix to get right number of return values (#1906) [SuvarnaMeenakshi]
3fa0854 2021-12-06 | [CLI][show bgp] On chassis don't show internal BGP sessions by default (#1927) [Mahesh Maddikayala]
6de91af 2021-12-06 | [Auto-Techsupport] Issues related to Multiple Cores crashing handled (#1948) [Vivek Reddy]
656ade1 2021-12-06 | SFP-Refactor: Vendor revision is not displayed properly (#1950) [Aravind Mani]
67466cb 2021-12-05 | [port] Fix port speed set (#1952) [Mykola Gerasymenko]
5172972 2021-12-04 | Fix invalid output of syslog IPv6 servers (#1933) [jingwenxie]
290ff5f 2021-12-03 | Routed subinterface enhancements (#1821) [Preetham]
1ea88e2 2021-12-01 | Enhance sfputil for CMIS QSFP (#1949) [andywongarista]
4e132c1 2021-11-30 | [debug dump] Refactoring Modules and Unit Tests (#1943) [Vivek Reddy]
b550c44 2021-11-30 | Add command reference for trap flow counters (#1876) [Junchao-Mellanox]
67a267b 2021-11-30 | [Reclaim buffer] [Mellanox] Db migrator support reclaiming reserved buffer for unused ports (#1822) [Stephen Sun]
30e4654 2021-11-25 | Add show command for BFD sessions (#1942) [Shi Su]
e63f47e 2021-11-25 | [warm-reboot] Fix failures of warm reboot on disconnect of ssh session (#1529) [maksymbelei95]
c05845d 2021-11-25 | Add trap flow counter support (#1868) [Junchao-Mellanox]
ef82f00 2021-11-24 | [load_minigraph] Delay pfcwd start until the buffer templates are rendered (#1937) [Neetha John]
f5e5a56 2021-11-24 | [sonic-package-manager] support sonic-cli-gen and packages with YANG model (#1650) [Stepan Blyshchak]
64777a4 2021-11-23 | generic_config_updater: Filename changed & VLAN validator added (#1919) [Renuka Manavalan]
1f8f6ab 2021-11-23 | [config reload] Update command reference (#1941) [Sudharsan Dhamal Gopalarathnam]
```
judyjoseph added a commit that referenced this issue Jan 9, 2022
4236bc4 [config reload] Fixing config reload when timer based delayed services are disabled (#1967)
d2514e4 [GCU] Different apply-patch runs should produce same sorted steps (#1988)
2878adb [GCU] Using simulated config instead of target config when validating replace operation in NoDependencyMoveValidator (#1987)
fb8ca98 [GCU] Loading yang-models only once (#1981)
f88ee92 [GCU] Copying config_db before callding sonic_yang.loadData (#1983)
9ed0e91 [GCU] Implementing DryRun by printing patch-sorter steps/imitating config_db (#1973)
b36b5e3 [GCU] Moving PatchSorter unit-test to json file to make it easier to read/maintain (#1977)
c0fa28b [generic-config-updater] Improving CreateOnly validator and marking /LOOPBACK_INTERFACE/LOOPBACK#/vrf_name as create-only (#1969)
0559d04 [generic-config-updater] Adding non-strict mode (#1929)
b07f477 [debug dump util] FDB debug dump util changes (#1968)
6d8757a [warm/fast-reboot] Fix kexec portion to support platforms based on Device Tree (#1966)
cc1409e [Auto Techsupport] Event driven Techsupport Bug Fixes (#1986)
6c48bd5 Fix wrong help message for cable length setting (#1978)
c0bbbe3 [breakout] Fix the check  when port is not present in BREAKOUT_CFG table (#1765)
5bb8cad [doc][DPB] Update DPB related interface breakout command Info (#1438)
e6fd990 [config] Fix 'config reload -l' command to get filename by default (#1611)
bd8f7bb Update swss_ready check to check per namespace swss service (#1974)
5439f94 [soft-reboot] Add support for platforms based on Device Tree (#1963)
7c5810a [config] Add portchannel support  for static route  (#1857)
7cb6a1b preserve old order for config reload (#1964)
20bddbd [Auto-Techsupport] Issues related to Multiple Cores crashing handled (#1948)
taras-keryk pushed a commit to taras-keryk/sonic-buildimage that referenced this issue Apr 28, 2022
…LOOPBACK_INTERFACE/LOOPBACK#/vrf_name as create-only (sonic-net#1969)

#### What I did
Fix sonic-net#1962

Updated `create-only` flag meaning.

From, Field is not replaceable but can be added or deleted. In other words:
- Field can be added
- Field can be deleted
- Field cannot be replaced

To, Field is only created, but never modified/updated. In other words:
- Field cannot be added, only if the parent is added
- Field cannot be deleted, only if the parent is deleted
- Field cannot be replaced

Also marked `/LOOPBACK_INTERFACE/LOOPBACK#/vrf_name` as `create-only`

#### How I did it
- Field was already not replaceable -- so no changes
- If field is added, but parent already exist -- fail create-only validation
- If field is deleted, but parent remain -- fail create-only validation

#### How to verify it
unit-test

#### Examples
Check issue to see how `apply-patch` behaved before this fix.

Each example below we show configdb, vrf_01, vrf_02, and ip interfaces before and after the update.

**Adding vrf_name**
```sh
admin@vlab-01:~/lo$ show run all | grep -i 'loopback0\|vrf_01' -a3
        }
    },
    "LOOPBACK_INTERFACE": {
        "Loopback0": {},
        "Loopback0|10.1.0.32/32": {},
        "Loopback0|FC00:1::32/128": {}
    },
    "MAP_PFC_PRIORITY_TO_QUEUE": {
        "AZURE": {
--
        }
    },
    "VRF": {
        "Vrf_01": {},
        "Vrf_02": {}
    },
    "WRED_PROFILE": {
admin@vlab-01:~/lo$ show ip route vrf Vrf_01
admin@vlab-01:~/lo$ show ip route vrf Vrf_02
admin@vlab-01:~/lo$ show ip interfaces | grep -i loopback0
Loopback0                  10.1.0.32/32         up/up         N/A             N/A
admin@vlab-01:~/lo$ sudo config apply-patch add-lo0-vrf01.json-patch -i /BGP_NEIGHBOR -i /DEVICE_METADATA -i /FEATURE -i /FLEX_COUNTER_TABLE -i /VLAN/Vlan1000/members -i /SCHEDULER -i /QUEUE
Patch Applier: Patch application starting.
Patch Applier: Patch: [{"op": "add", "path": "/LOOPBACK_INTERFACE/Loopback0/vrf_name", "value": "Vrf_01"}]
Patch Applier: Getting current config db.
Patch Applier: Simulating the target full config after applying the patch.
Patch Applier: Validating target config does not have empty tables, since they do not show up in ConfigDb.
Patch Applier: Sorting patch updates.
Note: Below table(s) have no YANG models:
BGP_PEER_RANGE, CABLE_LENGTH, CONSOLE_SWITCH, DEVICE_NEIGHBOR_METADATA, DHCP_SERVER, KDUMP, RESTAPI, SNMP, SNMP_COMMUNITY, SYSLOG_SERVER, TELEMETRY, 
Note: Below table(s) have no YANG models:
BGP_PEER_RANGE, CABLE_LENGTH, CONSOLE_SWITCH, DEVICE_NEIGHBOR_METADATA, DHCP_SERVER, KDUMP, RESTAPI, SNMP, SNMP_COMMUNITY, SYSLOG_SERVER, TELEMETRY, 
Note: Below table(s) have no YANG models:
BGP_PEER_RANGE, CABLE_LENGTH, CONSOLE_SWITCH, DEVICE_NEIGHBOR_METADATA, DHCP_SERVER, KDUMP, RESTAPI, SNMP, SNMP_COMMUNITY, SYSLOG_SERVER, TELEMETRY, 
libyang[0]: Must condition "(current() = ../../LOOPBACK_INTERFACE_LIST[name=current()]/name)" not satisfied. (path: /sonic-loopback-interface:sonic-loopback-interface/LOOPBACK_INTERFACE/LOOPBACK_INTERFACE_IPPREFIX_LIST[name='Loopback0'][ip-prefix='10.1.0.32/32']/name)
libyang[0]: Must condition not satisfied, Try adding lo<>: {}, Example: 'lo1': {} (path: /sonic-loopback-interface:sonic-loopback-interface/LOOPBACK_INTERFACE/LOOPBACK_INTERFACE_IPPREFIX_LIST[name='Loopback0'][ip-prefix='10.1.0.32/32']/name)
sonic_yang(3):Data Loading Failed:Must condition not satisfied, Try adding lo<>: {}, Example: 'lo1': {}
Patch Applier: The patch was sorted into 4 changes:
Patch Applier:   * [{"op": "remove", "path": "/LOOPBACK_INTERFACE"}]
Patch Applier:   * [{"op": "add", "path": "/LOOPBACK_INTERFACE", "value": {"Loopback0": {"vrf_name": "Vrf_01"}}}]
Patch Applier:   * [{"op": "add", "path": "/LOOPBACK_INTERFACE/Loopback0|10.1.0.32~132", "value": {}}]
Patch Applier:   * [{"op": "add", "path": "/LOOPBACK_INTERFACE/Loopback0|FC00:1::32~1128", "value": {}}]
Patch Applier: Applying 4 changes in order:
Patch Applier:   * [{"op": "remove", "path": "/LOOPBACK_INTERFACE"}]
Patch Applier:   * [{"op": "add", "path": "/LOOPBACK_INTERFACE", "value": {"Loopback0": {"vrf_name": "Vrf_01"}}}]
Patch Applier:   * [{"op": "add", "path": "/LOOPBACK_INTERFACE/Loopback0|10.1.0.32~132", "value": {}}]
Patch Applier:   * [{"op": "add", "path": "/LOOPBACK_INTERFACE/Loopback0|FC00:1::32~1128", "value": {}}]
Patch Applier: Verifying patch updates are reflected on ConfigDB.
Patch Applier: Patch application completed.
Patch applied successfully.
admin@vlab-01:~/lo$ show run all | grep -i 'loopback0\|vrf_01' -a3
        }
    },
    "LOOPBACK_INTERFACE": {
        "Loopback0": {
            "vrf_name": "Vrf_01"
        },
        "Loopback0|10.1.0.32/32": {},
        "Loopback0|FC00:1::32/128": {}
    },
    "MAP_PFC_PRIORITY_TO_QUEUE": {
        "AZURE": {
--
        }
    },
    "VRF": {
        "Vrf_01": {},
        "Vrf_02": {}
    },
    "WRED_PROFILE": {
admin@vlab-01:~/lo$ show ip route vrf Vrf_01
Codes: K - kernel route, C - connected, S - static, R - RIP,
       O - OSPF, I - IS-IS, B - BGP, E - EIGRP, N - NHRP,
       T - Table, v - VNC, V - VNC-Direct, A - Babel, D - SHARP,
       F - PBR, f - OpenFabric,
       > - selected route, * - FIB route, q - queued, r - rejected, b - backup

VRF Vrf_01:
C>* 10.1.0.32/32 is directly connected, Loopback0, 00:00:19

admin@vlab-01:~/lo$ show ip route vrf Vrf_02
admin@vlab-01:~/lo$ show ip interfaces | grep -i loopback0
Loopback0        Vrf_01    10.1.0.32/32         up/up         N/A             N/A
admin@vlab-01:~/lo$ 
```

**Replacing vrf_name**
```sh
admin@vlab-01:~/lo$ show run all | grep -i 'loopback0\|vrf_01' -a3
        }
    },
    "LOOPBACK_INTERFACE": {
        "Loopback0": {
            "vrf_name": "Vrf_01"
        },
        "Loopback0|10.1.0.32/32": {},
        "Loopback0|FC00:1::32/128": {}
    },
    "MAP_PFC_PRIORITY_TO_QUEUE": {
        "AZURE": {
--
        }
    },
    "VRF": {
        "Vrf_01": {},
        "Vrf_02": {}
    },
    "WRED_PROFILE": {
admin@vlab-01:~/lo$ show ip route vrf Vrf_01
Codes: K - kernel route, C - connected, S - static, R - RIP,
       O - OSPF, I - IS-IS, B - BGP, E - EIGRP, N - NHRP,
       T - Table, v - VNC, V - VNC-Direct, A - Babel, D - SHARP,
       F - PBR, f - OpenFabric,
       > - selected route, * - FIB route, q - queued, r - rejected, b - backup

VRF Vrf_01:
C>* 10.1.0.32/32 is directly connected, Loopback0, 00:00:19

admin@vlab-01:~/lo$ show ip route vrf Vrf_02
admin@vlab-01:~/lo$ show ip interfaces | grep -i loopback0
Loopback0        Vrf_01    10.1.0.32/32         up/up         N/A             N/A
admin@vlab-01:~/lo$ sudo config apply-patch replace-lo0-vrf02.json-patch -i /BGP_NEIGHBOR -i /DEVICE_METADATA -i /FEATURE -i /FLEX_COUNTER_TABLE -i /VLAN/Vlan1000/members -i /SCHEDULER -i /QUEUE
Patch Applier: Patch application starting.
Patch Applier: Patch: [{"op": "replace", "path": "/LOOPBACK_INTERFACE/Loopback0/vrf_name", "value": "Vrf_02"}]
Patch Applier: Getting current config db.
Patch Applier: Simulating the target full config after applying the patch.
Patch Applier: Validating target config does not have empty tables, since they do not show up in ConfigDb.
Patch Applier: Sorting patch updates.
Note: Below table(s) have no YANG models:
BGP_PEER_RANGE, CABLE_LENGTH, CONSOLE_SWITCH, DEVICE_NEIGHBOR_METADATA, DHCP_SERVER, KDUMP, RESTAPI, SNMP, SNMP_COMMUNITY, SYSLOG_SERVER, TELEMETRY, 
Note: Below table(s) have no YANG models:
BGP_PEER_RANGE, CABLE_LENGTH, CONSOLE_SWITCH, DEVICE_NEIGHBOR_METADATA, DHCP_SERVER, KDUMP, RESTAPI, SNMP, SNMP_COMMUNITY, SYSLOG_SERVER, TELEMETRY, 
Note: Below table(s) have no YANG models:
BGP_PEER_RANGE, CABLE_LENGTH, CONSOLE_SWITCH, DEVICE_NEIGHBOR_METADATA, DHCP_SERVER, KDUMP, RESTAPI, SNMP, SNMP_COMMUNITY, SYSLOG_SERVER, TELEMETRY, 
libyang[0]: Must condition "(current() = ../../LOOPBACK_INTERFACE_LIST[name=current()]/name)" not satisfied. (path: /sonic-loopback-interface:sonic-loopback-interface/LOOPBACK_INTERFACE/LOOPBACK_INTERFACE_IPPREFIX_LIST[name='Loopback0'][ip-prefix='10.1.0.32/32']/name)
libyang[0]: Must condition not satisfied, Try adding lo<>: {}, Example: 'lo1': {} (path: /sonic-loopback-interface:sonic-loopback-interface/LOOPBACK_INTERFACE/LOOPBACK_INTERFACE_IPPREFIX_LIST[name='Loopback0'][ip-prefix='10.1.0.32/32']/name)
sonic_yang(3):Data Loading Failed:Must condition not satisfied, Try adding lo<>: {}, Example: 'lo1': {}
Patch Applier: The patch was sorted into 4 changes:
Patch Applier:   * [{"op": "remove", "path": "/LOOPBACK_INTERFACE"}]
Patch Applier:   * [{"op": "add", "path": "/LOOPBACK_INTERFACE", "value": {"Loopback0": {"vrf_name": "Vrf_02"}}}]
Patch Applier:   * [{"op": "add", "path": "/LOOPBACK_INTERFACE/Loopback0|10.1.0.32~132", "value": {}}]
Patch Applier:   * [{"op": "add", "path": "/LOOPBACK_INTERFACE/Loopback0|FC00:1::32~1128", "value": {}}]
Patch Applier: Applying 4 changes in order:
Patch Applier:   * [{"op": "remove", "path": "/LOOPBACK_INTERFACE"}]
Patch Applier:   * [{"op": "add", "path": "/LOOPBACK_INTERFACE", "value": {"Loopback0": {"vrf_name": "Vrf_02"}}}]
Patch Applier:   * [{"op": "add", "path": "/LOOPBACK_INTERFACE/Loopback0|10.1.0.32~132", "value": {}}]
Patch Applier:   * [{"op": "add", "path": "/LOOPBACK_INTERFACE/Loopback0|FC00:1::32~1128", "value": {}}]
Patch Applier: Verifying patch updates are reflected on ConfigDB.
Patch Applier: Patch application completed.
Patch applied successfully.
admin@vlab-01:~/lo$ show run all | grep -i 'loopback0\|vrf_01' -a3        }
    },
    "LOOPBACK_INTERFACE": {
        "Loopback0": {
            "vrf_name": "Vrf_02"
        },
        "Loopback0|10.1.0.32/32": {},
        "Loopback0|FC00:1::32/128": {}
    },
    "MAP_PFC_PRIORITY_TO_QUEUE": {
        "AZURE": {
--
        }
    },
    "VRF": {
        "Vrf_01": {},
        "Vrf_02": {}
    },
    "WRED_PROFILE": {
admin@vlab-01:~/lo$ show ip route vrf Vrf_01
admin@vlab-01:~/lo$ show ip route vrf Vrf_02
Codes: K - kernel route, C - connected, S - static, R - RIP,
       O - OSPF, I - IS-IS, B - BGP, E - EIGRP, N - NHRP,
       T - Table, v - VNC, V - VNC-Direct, A - Babel, D - SHARP,
       F - PBR, f - OpenFabric,
       > - selected route, * - FIB route, q - queued, r - rejected, b - backup

VRF Vrf_02:
C>* 10.1.0.32/32 is directly connected, Loopback0, 00:00:29

admin@vlab-01:~/lo$ show ip interfaces | grep -i loopback0
Loopback0        Vrf_02    10.1.0.32/32         up/up         N/A             N/A
admin@vlab-01:~/lo$ 
```

**Removing vrf_name**
```sh
admin@vlab-01:~/lo$ show run all | grep -i 'loopback0\|vrf_01' -a3        }
    },
    "LOOPBACK_INTERFACE": {
        "Loopback0": {
            "vrf_name": "Vrf_02"
        },
        "Loopback0|10.1.0.32/32": {},
        "Loopback0|FC00:1::32/128": {}
    },
    "MAP_PFC_PRIORITY_TO_QUEUE": {
        "AZURE": {
--
        }
    },
    "VRF": {
        "Vrf_01": {},
        "Vrf_02": {}
    },
    "WRED_PROFILE": {
admin@vlab-01:~/lo$ show ip route vrf Vrf_01
admin@vlab-01:~/lo$ show ip route vrf Vrf_02
Codes: K - kernel route, C - connected, S - static, R - RIP,
       O - OSPF, I - IS-IS, B - BGP, E - EIGRP, N - NHRP,
       T - Table, v - VNC, V - VNC-Direct, A - Babel, D - SHARP,
       F - PBR, f - OpenFabric,
       > - selected route, * - FIB route, q - queued, r - rejected, b - backup

VRF Vrf_02:
C>* 10.1.0.32/32 is directly connected, Loopback0, 00:00:29

admin@vlab-01:~/lo$ show ip interfaces | grep -i loopback0
Loopback0        Vrf_02    10.1.0.32/32         up/up         N/A             N/A
admin@vlab-01:~/lo$ sudo config apply-patch remove-lo0-vrf02.json-patch -i /BGP_NEIGHBOR -i /DEVICE_METADATA -i /FEATURE -i /FLEX_COUNTER_TABLE -i /VLAN/Vlan1000/members -i /SCHEDULER -i /QUEUE
Patch Applier: Patch application starting.
Patch Applier: Patch: [{"op": "remove", "path": "/LOOPBACK_INTERFACE/Loopback0/vrf_name"}]
Patch Applier: Getting current config db.
Patch Applier: Simulating the target full config after applying the patch.
Patch Applier: Validating target config does not have empty tables, since they do not show up in ConfigDb.
Patch Applier: Sorting patch updates.
Note: Below table(s) have no YANG models:
BGP_PEER_RANGE, CABLE_LENGTH, CONSOLE_SWITCH, DEVICE_NEIGHBOR_METADATA, DHCP_SERVER, KDUMP, RESTAPI, SNMP, SNMP_COMMUNITY, SYSLOG_SERVER, TELEMETRY, 
Note: Below table(s) have no YANG models:
BGP_PEER_RANGE, CABLE_LENGTH, CONSOLE_SWITCH, DEVICE_NEIGHBOR_METADATA, DHCP_SERVER, KDUMP, RESTAPI, SNMP, SNMP_COMMUNITY, SYSLOG_SERVER, TELEMETRY, 
Note: Below table(s) have no YANG models:
BGP_PEER_RANGE, CABLE_LENGTH, CONSOLE_SWITCH, DEVICE_NEIGHBOR_METADATA, DHCP_SERVER, KDUMP, RESTAPI, SNMP, SNMP_COMMUNITY, SYSLOG_SERVER, TELEMETRY, 
libyang[0]: Must condition "(current() = ../../LOOPBACK_INTERFACE_LIST[name=current()]/name)" not satisfied. (path: /sonic-loopback-interface:sonic-loopback-interface/LOOPBACK_INTERFACE/LOOPBACK_INTERFACE_IPPREFIX_LIST[name='Loopback0'][ip-prefix='10.1.0.32/32']/name)
libyang[0]: Must condition not satisfied, Try adding lo<>: {}, Example: 'lo1': {} (path: /sonic-loopback-interface:sonic-loopback-interface/LOOPBACK_INTERFACE/LOOPBACK_INTERFACE_IPPREFIX_LIST[name='Loopback0'][ip-prefix='10.1.0.32/32']/name)
sonic_yang(3):Data Loading Failed:Must condition not satisfied, Try adding lo<>: {}, Example: 'lo1': {}
Patch Applier: The patch was sorted into 4 changes:
Patch Applier:   * [{"op": "remove", "path": "/LOOPBACK_INTERFACE"}]
Patch Applier:   * [{"op": "add", "path": "/LOOPBACK_INTERFACE", "value": {"Loopback0": {}}}]
Patch Applier:   * [{"op": "add", "path": "/LOOPBACK_INTERFACE/Loopback0|10.1.0.32~132", "value": {}}]
Patch Applier:   * [{"op": "add", "path": "/LOOPBACK_INTERFACE/Loopback0|FC00:1::32~1128", "value": {}}]
Patch Applier: Applying 4 changes in order:
Patch Applier:   * [{"op": "remove", "path": "/LOOPBACK_INTERFACE"}]
Patch Applier:   * [{"op": "add", "path": "/LOOPBACK_INTERFACE", "value": {"Loopback0": {}}}]
Patch Applier:   * [{"op": "add", "path": "/LOOPBACK_INTERFACE/Loopback0|10.1.0.32~132", "value": {}}]
Patch Applier:   * [{"op": "add", "path": "/LOOPBACK_INTERFACE/Loopback0|FC00:1::32~1128", "value": {}}]
Patch Applier: Verifying patch updates are reflected on ConfigDB.
Patch Applier: Patch application completed.
Patch applied successfully.
admin@vlab-01:~/lo$ show run all | grep -i 'loopback0\|vrf_01' -a3
        }
    },
    "LOOPBACK_INTERFACE": {
        "Loopback0": {},
        "Loopback0|10.1.0.32/32": {},
        "Loopback0|FC00:1::32/128": {}
    },
    "MAP_PFC_PRIORITY_TO_QUEUE": {
        "AZURE": {
--
        }
    },
    "VRF": {
        "Vrf_01": {},
        "Vrf_02": {}
    },
    "WRED_PROFILE": {
admin@vlab-01:~/lo$ show ip route vrf Vrf_01
admin@vlab-01:~/lo$ show ip route vrf Vrf_02
admin@vlab-01:~/lo$ show ip interfaces | grep -i loopback0
Loopback0                  10.1.0.32/32         up/up         N/A             N/A
admin@vlab-01:~/lo$ 
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants