Open joolli opened 6 months ago
I am working on this bug.
Just let me know if I can be of help.
@joolli Thanks, can you provide the CLI commands (the sonic CLI config bgp commands) to simulate the issue. I dont see this command "config bgp-peer-group-af add --admin-status up default UNDERLAY ipv4_unicast"
I have loaded the following
admin@sonic:~$ show ver
SONiC Software Version: SONiC.master.563622-9cbaf42f1 SONiC OS Version: 12 Distribution: Debian 12.5 Kernel: 6.1.0-11-2-amd64 Build commit: 9cbaf42f1 Build date: Tue Jun 4 13:59:08 UTC 2024 Built by: cloudtest@2258ec2bc00000F
Platform: x86_64-kvm_x86_64-r0 HwSKU: Force10-S6000 ASIC: vs ASIC Count: 1 Serial Number: N/A Model Number: N/A Hardware Revision: N/A Uptime: 18:10:09 up 2:02, 2 users, load average: 2.92, 1.85, 1.25 Date: Mon 10 Jun 2024 18:10:09
Hi, sorry for the late response. I will be quicker next time
Yes, you need to load the yang model: sonic-cli-gen generate config sonic-bgp-neighbor sonic-cli-gen generate config sonic-bgp-peergroup sonic-cli-gen generate show sonic-bgp-neighbor sonic-cli-gen generate show sonic-bgp-peergroup
You can find the yang models under /usr/local/yang
Sorry for the delay in replying, i tried the above commands the python files got generated for each command respectively. The peer-group creation fails and then the peer-group should be activated under ipv4_unicast AF. Tried creating a peer group in default VRF and i got the following error. Kindly let me know if am missing something.
root@sonic:~# config bgp-peer-group add default New
libyang[0]: Leafref "/sonic-bgp-global:sonic-bgp-global/sonic-bgp-global:BGP_GLOBALS/sonic-bgp-global:BGP_GLOBALS_LIST/sonic-bgp-global:vrf_name" of value "default" points to a non-existing leaf. (path: /sonic-bgp-peergroup:sonic-bgp-peergroup/BGP_PEER_GROUP/BGP_PEER_GROUP_LIST[vrf_name='default'][peer_group_name='New']/vrf_name)
libyang[0]: Leafref "/sonic-bgp-global:sonic-bgp-global/sonic-bgp-global:BGP_GLOBALS/sonic-bgp-global:BGP_GLOBALS_LIST/sonic-bgp-global:vrf_name" of value "default" points to a non-existing leaf. (path: /sonic-bgp-peergroup:sonic-bgp-peergroup/BGP_PEER_GROUP/BGP_PEER_GROUP_LIST[vrf_name='default'][peer_group_name='New']/vrf_name)
sonic_yang(3):Data Loading Failed:Leafref "/sonic-bgp-global:sonic-bgp-global/sonic-bgp-global:BGP_GLOBALS/sonic-bgp-global:BGP_GLOBALS_LIST/sonic-bgp-global:vrf_name" of value "default" points to a non-existing leaf.
Error: Failed to validate configuration: Data Loading Failed
Leafref "/sonic-bgp-global:sonic-bgp-global/sonic-bgp-global:BGP_GLOBALS/sonic-bgp-global:BGP_GLOBALS_LIST/sonic-bgp-global:vrf_name" of value "default" points to a non-existing leaf.
Aborted!
root@sonic:~#
root@sonic:~# show bgp-peer-group
VRF NAME PEER GROUP NAME SONIC BGP CMN
---------- ----------------- ---------------
root@sonic:~#
root@sonic:~# show vrf
VRF Interfaces
----- ------------
root@sonic:~#
You also need to load sonic-bgp-global yang model it seems:
sudo sonic-cli-gen generate config sonic-bgp-global sudo config bgp-globals add --router-id 10.1.1.1 --local-asn 65001 default sudo config bgp-peer-group add default New --local-asn 65001 --peer-type internal
Hey, sorry for off topic, but I'm trying to reproduce @joolli issue and seems that loaded yang modules does not work for me.
As example I load sonic-bgp-global
sonic-cli-gen generate config sonic-bgp-global
Then try to execute
sudo config bgp-globals add --router-id 10.1.1.1 --local-asn 65001 default
But I cannot see the configuration present when checking through vtysh -c 'show runn'
Although the configuration is visible in config_db.json
And same happens with, as example, bgp-neighbor
What I am missing here? Do I need to enable something else?
You need to set the following under DEVICE_METADATA
"docker_routing_config_mode": "split-unified",
"frr_mgmt_framework_config": "true",
The value of "unified" for docker routing config mode might also work, but I haven't tried it.
https://github.com/sonic-net/sonic-buildimage/commit/7502dc8fbf7bf6e79859483696ffff8c99d6b882
After looking over the code I made this tiny change and it seems to fix the problem. I'm no programmer though.
Description
Steps to reproduce the issue:
config bgp-peer-group-af add --admin-status up default UNDERLAY ipv4_unicast
Describe the results you received:
The address family does not get created in FRR config. Verify with -> vtysh -c "show run"
Describe the results you expected:
I expected to see an address-family ipv4 unicast in FRR like so:
Output of
show version
:Additional info:
Address-family is added to FRR if config_db.json is edited and "up" is changed to "true" and the config is reloaded. However, "config" command stops working because the current configuration can't be validated anymore, as it expects "up".
changed to:
and the config loaded.
The below output shows the log entries in /var/log/frr/zebra.log when the command:
config bgp-peer-group-af add --admin-status up default UNDERLAY ipv4_unicast
is executed.