Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mgmtvrf test fails with 'Host Unreachable' error #1615

Closed
noaOrMlnx opened this issue Apr 26, 2020 · 6 comments · Fixed by #1775
Closed

Mgmtvrf test fails with 'Host Unreachable' error #1615

noaOrMlnx opened this issue Apr 26, 2020 · 6 comments · Fixed by #1775

Comments

@noaOrMlnx
Copy link
Contributor

Description

test_mgmtvrf.py fails on setup_mvrf() function when tries to execute:
localhost.wait_for(host=var['dut_ip'], port=22, state='started', search_regex=SONIC_SSH_REGEX, timeout=90)

NOTE: mgmt vrf becomes enabled after this function execution.

When ignoring the wait_for() function on setup_mvrf() function, the test fails on test_service_acl() test case - also on wait_for() function.

Steps to reproduce the issue:

  1. Execute test_mgmtvrf.py
  2. Test fails on wait_for() function saying 'Host Unreachable'.

Describe the results you received:
'Host Unreachable'.

Describe the results you expected:
Test should pass.

@yxieca
Copy link
Collaborator

yxieca commented May 6, 2020

@noaOrMlnx looks like the wait_for is waiting for dut to reboot. This is a known instability with using wait_for for this purpose. Please use work-around similar to reboot test to wait for DUT to come back.

@wangxin
Copy link
Collaborator

wangxin commented May 6, 2020

Checked the test script, it's not related with reboot. @noaOrMlnx Could you please check if manual SSH to DUT works after duthost.command('sudo config vrf add mgmt')?

@vsenchyshyn
Copy link
Contributor

vsenchyshyn commented May 7, 2020

The console where sudo config vrf add mgmt is executed manually hangs and I guess this is why following wait_for() call in the test fails with timeout. It is possible to connect to DUT from the separate console window.

@wangxin
Copy link
Collaborator

wangxin commented May 9, 2020

@vsenchyshyn If running sudo config vrf add mgmt hangs, it's another issue of the product and need further investigation.

I tried from my side on master image and got some findings:

  • Initiate SSH connection to DUT from sonic-mgmt docker
  • Run "sudo config vrf add mgmt" on DUT. The SSH connection was not broken.
  • Run "sudo config vrf del mgmt" on DUT. The SSH connection was not broken.

When the SSH connection is not broken, the localhost.wait_for module will always fail with "Host Unreachable". Probably a limitation of the module.

So, is the SSH connection to DUT supposed to be broken or not when mgmt VRF is configured/removed on DUT? @chitra-raghavan

@chitra-raghavan
Copy link
Contributor

@vsenchyshyn , When the tests were written , the command hangs device for long time and ssh connection got broken. Now in latest images, if ansible ssh doesnt get timed out , wait_for can be removed

@lguohan
Copy link
Contributor

lguohan commented Jun 7, 2020

@chitra-raghavan , can you open an pr to resolve this issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants