You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Following sonic-net/sonic-utilities#3025, db_migrator.py will check config DB for YANG validation issues. It appears that bgp/test_traffic_shift.py::test_TSA_TSB_with_config_reload (or some fixture) is creating a BGP monitor named bgp_monitor. However, as per the YANG model for this, the BGP monitor must be named BGPMonitor. Because of this, config reload fails.
Set up a T1 KVM topology running a SONiC image with the latest sonic-utilities commit.
Run the bgp/test_traffic_shift.py::test_TSA_TSB_with_config_reload test case.
Describe the results you received:
Test case fails on config reload -y -f.
Syslog error lines:
Nov 29 07:36:34.624371 vlab-03 ERR sonic_yang: Data Loading Failed:Invalid BGP monitor name
Nov 29 07:36:34.624426 vlab-03 CRIT db_migrator.py: Yang validation failed: Data Loading Failed#012Invalid BGP monitor name
Nov 29 07:36:34.624452 vlab-03 ERR db_migrator.py: Caught exception: 'UTILITIES_UNIT_TESTING'
This also breaks vms-kvm-four-asic-t1-lag topology with the default config that gets deployed:
admin@vlab-08:~$ sudo config reload
Clear current config and reload config in config_db format from the default config file(s) ? [y/N]: y
Disabling container monitoring ...
Stopping SONiC target ...
Running command: /usr/local/bin/sonic-cfggen -j /etc/sonic/init_cfg.json -j /etc/sonic/config_db.json --write-to-db
Running command: /usr/local/bin/db_migrator.py -o migrate
libyang[0]: Missing required element "lanes" in "PORT_LIST". (path: /sonic-port:sonic-port/PORT/PORT_LIST[name='Ethernet1/1'])
Traceback (most recent call last):
File "/usr/local/bin/db_migrator.py", line 1195, in main
result = getattr(dbmgtr, operation)()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/bin/db_migrator.py", line 1150, in migrate
if os.environ["UTILITIES_UNIT_TESTING"] == "2":
~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<frozen os>", line 679, in __getitem__
KeyError: 'UTILITIES_UNIT_TESTING'
sonic_yang(3):Data Loading Failed:Missing required element "lanes" in "PORT_LIST".
'UTILITIES_UNIT_TESTING'
usage: db_migrator.py [-h] [-o operation migrate, set_version, get_version] [-s unix socket] [-n asic namespace]
options:
-h, --help show this help message and exit
-o operation (migrate, set_version, get_version)
operation to perform [default: get_version]
-s unix socket the unix socket that the desired database listens on
-n asic namespace The asic namespace whose DB instance we need to connect
Description
Following sonic-net/sonic-utilities#3025, db_migrator.py will check config DB for YANG validation issues. It appears that
bgp/test_traffic_shift.py::test_TSA_TSB_with_config_reload
(or some fixture) is creating a BGP monitor namedbgp_monitor
. However, as per the YANG model for this, the BGP monitor must be namedBGPMonitor
. Because of this,config reload
fails.See also sonic-net/sonic-buildimage#17069 and sonic-net/sonic-buildimage#17297.
Steps to reproduce the issue:
bgp/test_traffic_shift.py::test_TSA_TSB_with_config_reload
test case.Describe the results you received:
Test case fails on
config reload -y -f
.Syslog error lines:
Added bgpmon config:
Manual config reload with this config added:
Describe the results you expected:
Test case should pass.
Additional information you deem important:
The text was updated successfully, but these errors were encountered: