sonic-net / sonic-mgmt

Configuration management examples for SONiC
Other
196 stars 717 forks source link

Everflow test is failing in ptf topology #730

Open shaukathsathar opened 5 years ago

shaukathsathar commented 5 years ago

Description

Script location : /var/johnar/sonic-mgmt/ansible/roles/test/tasks/everflow/config_test/config_test.yml

Issue : Failed to get the expected error message upon configuring invalid json files only with pft topology

Steps to reproduce the issue: run the script : ansible-playbook test_sonic.yml -i lab --limit sonic-z9100-02 --tags everflow --extra-vars "testbed_type=ptf32 ptf_host=10.11.150.80"

Describe the results you received:

TASK [test : Check that expected error messages are found (negative tests only).] * task path: /var/johnar/sonic-mgmt/ansible/roles/test/tasks/run_command_with_log_analyzer.yml:34 Thursday 01 November 2018 07:48:03 +0000 (0:00:00.331) 0:03:01.757 *** fatal: [sonic-z9100-02]: FAILED! => {"changed": false, "failed": true, "invocation": {"module_args": {"msg": "Expected error messages are not found while running config_test / docker exec -i swss swssconfig /home/config_src_ip_invalid_1.json"}, "module_name": "fail"}, "msg": "Expected error messages are not found while running config_test / docker exec -i swss swssconfig /home/config_src_ip_invalid_1.json"}

Upon confguring this manually, observed loading message in syslog file but did not get result as "r, ".Failed to parse session . attribute .*"

root@sonic-z9100-02:~# docker exec -it swss swssconfig /home/config_dst_ip_invalid_1.json root@sonic-z9100-02:~# root@sonic-z9100-02:~# tail -f /var/log/syslog Nov 1 09:49:17.581126 sonic-z9100-02 NOTICE swssconfig: :- main: Loading config from JSON file:/home/config_dst_ip_invalid_1.json...

Describe the results you expected:

/var/johnar/sonic-mgmt/ansible/roles/test/tasks/everflow/config_test/config_test_expect_file

r, ".Failed to parse session . attribute .*" Additional information you deem important:

**Output of `show version`:**

root@sonic-z9100-02:~# show ver SONiC Software Version: SONiC.HEAD.86-e2d565a Distribution: Debian 8.11 Kernel: 3.16.0-6-amd64 Build commit: e2d565a Build date: Fri Oct 19 12:00:33 UTC 2018 Built by: johnar@jenkins-worker-4

Docker images: REPOSITORY TAG IMAGE ID SIZE docker-syncd-brcm-rpc latest 65c5c84841c9 621 MB docker-syncd-brcm latest 65c5c84841c9 621 MB docker-syncd-brcm HEAD.86-e2d565a e4a9b8a0559f 372.8 MB docker-orchagent-brcm HEAD.86-e2d565a 287353d22a91 294.5 MB docker-orchagent-brcm latest 287353d22a91 294.5 MB docker-lldp-sv2 HEAD.86-e2d565a 9446bc76ddb5 306.9 MB docker-lldp-sv2 latest 9446bc76ddb5 306.9 MB docker-dhcp-relay HEAD.86-e2d565a 1a1c71ac6fb5 288.9 MB docker-dhcp-relay latest 1a1c71ac6fb5 288.9 MB docker-database HEAD.86-e2d565a 885c8ea08150 288.9 MB docker-database latest 885c8ea08150 288.9 MB docker-teamd HEAD.86-e2d565a 7e22af12d92f 294.3 MB docker-teamd latest 7e22af12d92f 294.3 MB docker-snmp-sv2 HEAD.86-e2d565a 3e20dddf0aa1 326.7 MB docker-snmp-sv2 latest 3e20dddf0aa1 326.7 MB docker-router-advertiser HEAD.86-e2d565a aa36713c2264 286.4 MB docker-router-advertiser latest aa36713c2264 286.4 MB docker-platform-monitor HEAD.86-e2d565a a5887985691b 308.3 MB docker-platform-monitor latest a5887985691b 308.3 MB docker-fpm-quagga HEAD.86-e2d565a 69d12dbb7174 300.7 MB docker-fpm-quagga latest 69d12dbb7174 300.7 MB

shaukathsathar commented 5 years ago

PTF: everflow test

root@sonic-z9100-02:~# docker exec -it swss swssconfig /home/config_dst_ip_invalid_1.json root@sonic-z9100-02:~# root@sonic-z9100-02:~# tail -f /var/log/syslog Nov 1 09:49:17.581126 sonic-z9100-02 NOTICE swssconfig: :- main: Loading config from JSON file:/home/config_dst_ip_invalid_1.json...

Script expects failed messages upon loading the invalid file. This could be a bug from sonic side. Verified in redis-db. The invalid session is not programmed. 127.0.0.1:6379[4]> keys MIRROR 1) "MIRROR_SESSION|test_session_1" 2) "MIRROR_SESSION|everflow0"