sonic-net / sonic-mgmt

Configuration management examples for SONiC
Other
195 stars 708 forks source link

qos-sai: leaves the DUT with missing configs. #9029

Open rraghav-cisco opened 1 year ago

rraghav-cisco commented 1 year ago

test_qos_sai.py is leaving the DUT with a bunch of config that was not present at the beginning of the script. After the script comes out, we see a lot of difference between golden config and the saved configs: root@xx-37-lc0:/home/cisco# diff /etc/sonic/config_db0.json /etc/sonic/running_golden_config0.json | wc 803 2077 25781 root@xx-37-lc0:/home/cisco#

root@xx-37-lc0:/home/cisco# diff /etc/sonic/config_db1.json /etc/sonic/running_golden_config1.json | wc 632 1614 20457 root@xx-37-lc0:/home/cisco#

Another issue I notice is that the BGP neighbor address for some interfaces is not present after the setup:

root@xx-37-lc0:/home/cisco# show ip int
Interface       Master    IPv4 address/mask    Admin/Oper    BGP Neighbor    Neighbor IP
--------------  --------  -------------------  ------------  --------------  -------------
Ethernet64                10.0.0.4/31          up/up         ARISTA03T3      10.0.0.5
Ethernet184               10.0.0.10/31         up/up         N/A             N/A
Loopback0                 10.1.0.1/32          up/up         N/A             N/A
PortChannel102            10.0.0.0/31          up/up         ARISTA01T3      10.0.0.1
PortChannel106            10.0.0.6/31          up/up         N/A             N/A
docker0                   240.127.1.1/24       up/up         N/A             N/A
eth0                      1.76.0.100/16        up/up         N/A             N/A
eth1                      1.0.2.10/16          up/up         N/A             N/A
                          1.0.2.11/16                        N/A             N/A
                          1.0.2.12/16                        N/A             N/A
eth1-midplane             1.0.0.3/16           up/up         N/A             N/A
lo                        127.0.0.1/16         up/up         N/A             N/A
root@xx-37-lc0:/home/cisco# 

This causes the fixture: dutConfig to fail: Traceback (most recent call last): File "/data/tests/common/plugins/log_section_start/init.py", line 84, in _fixture_generator_decorator res = next(it) File "/data/tests/qos/qos_sai_base.py", line 848, in dutConfig active_ips = dst_asic.get_active_ip_interfaces(tbinfo) File "/data/tests/common/devices/sonic_asic.py", line 293, in get_active_ip_interfaces ip_ifs, tbinfo, self.namespace File "/data/tests/common/devices/sonic.py", line 2048, in active_ip_interfaces self.ping_v4(v["peer_ipv4"], count=3, ns_arg=ns_arg)): File "/data/tests/common/devices/sonic.py", line 2006, in ping_v4 raise Exception("Invalid IPv4 address {}".format(ipv4)) Exception: Invalid IPv4 address N/A

rraghav-cisco commented 1 year ago

@abdosi , @XuChen-MSFT FYI.