sonic-net / sonic-mgmt

Configuration management examples for SONiC
Other
176 stars 703 forks source link

[restart_syncd] restart_syncd.yml does not exist in sonic-mgmt question #649

Open mooncat2 opened 6 years ago

mooncat2 commented 6 years ago

There is a restart_syncd test in testcases.yml:

restart_syncd.r: filename: restart_syncd.yml topologies: [t0, t0-64, t0-64-32, t0-116, t1, t1-lag, t1-64-lag, ptf32, ptf64]

Try to run the restart_syncd test using the following CLI in my testbed:

ansible-playbook -vvv -i lab -l sonic test_sonic.yml -e testbed_name=vms-t0 -e testcase_name=restart_syncd

But got error log like following:

TASK [test : fail] ***** task path: /var/sonic/sonic-mgmt/ansible/roles/test/tasks/sonic.yml:63 Tuesday 26 June 2018 05:41:58 +0000 (0:00:00.078) 0:00:06.269 ** fatal: [sonic]: FAILED! => {"failed": true, "msg": "ERROR! The conditional check '(testcase_name is not defined) or (testbed_type not in testcases[testcase_name]['topologies'])' failed. The error was: ERROR! error while evaluating conditional ((testcase_name is not defined) or (testbed_type not in testcases[testcase_name]['topologies'])): ERROR! 'dict object' has no attribute u'restart_syncd'\n\nThe error appears to have been in '/var/sonic/sonic-mgmt/ansible/roles/test/tasks/sonic.yml': line 63, column 7, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n - fail: msg=\"cannot find {{ testcase_name }} in available testcases or is not supported topology of this testbed {{ testbed_name }}\"\n ^ here\nWe could be wrong, but this one looks like it might be an issue with\nmissing quotes. Always quote template expression brackets when they\nstart a value. For instance:\n\n with_items:\n - {{ foo }}\n\nShould be written as:\n\n with_items:\n - \"{{ foo }}\"\n"}

PLAY RECAP ***** sonic : ok=9 changed=0 unreachable=0 failed=1

Also I cannot find any yml file named "restart_syncd.yml" in folder /var/sonic/sonic-mgmt/ansible/roles/test/tasks/ , does anyone face this issue before?

there're no restart_syncd.yml files. sonic@ddf368cc9db8:~/sonic-mgmt/ansible/roles/test/tasks$ cat re reboot.yml repeat_harness.yml repeat_tasks.yml restart_swss.yml resume_fanout_ports.yml

qiluo-msft commented 6 years ago

Did you get the latest code? It should be there checking https://github.com/Azure/sonic-mgmt/blob/master/ansible/roles/test/tasks/restart_syncd.yml