-
Notifications
You must be signed in to change notification settings - Fork 732
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
test_reload_config.py test failure due to interface-config.service dependency #11654
Comments
Hi @abdosi , @JibinBao , @stepanblyschak , for your viz. Thanks |
Hi @anamehra, I am looking at the test code, not sure I understand why test expects swss.service to depend on interfaces-config.service, also, why "config reload" should throw an error? |
Hi @stepanblyschak , the test code validates a negative scenario where config reload should fail when swss is not up yet. It relies on the timing to run the command right at the moment when redis is accessible but swss has not started yet and I think interfaces-config check was introduced just to achieve ive that. Given that swss has no dependency on interfaces-config now, the test case needs to change. I think instead of validating this negative scenario during boot, it should just explicitly stop swss and validate that config reload fails. |
@anamehra Thanks, so as I understand "config reload" should fail when swss is down, any reason why? "config reload" cold restarts all services, so not sure such check in "config reload" is needed or are there any issues restarting services when swss is down? |
@dgsudharsan, Can you help check the above issue? If there is no direct dependency between interfaces-config and swss, shoud we revert the fix #7289? And then how to stabilize the test_reload_configuration_checks? |
@anamehra This check was introduced to overcome a race condition where config reload gets executed while interface-services.config is running and the loopback ip is not accessible giving traceback for the command the resulting in the test failure. Below is example
You will get
However this issue was fixed by @saiarcot895 sonic-net/sonic-buildimage#15080. Given we have this fix the change in sonic-mgmt can be reverted. @JibinBao please revert the change to check interface-services.config. |
1. Revert PR: sonic-net#7289, because the relevant issue has been fixed by PR:sonic-net/sonic-buildimage#15080 2. Remove wait_until(60, 1, 0, check_interfaces_config_service_status, duthost) in PR: sonic-net#7953 due to the above same reason Change-Id: Ifde0a83020bb06fb191a646e5ca91738b864ad7f
1. Revert PR: sonic-net#7289, because the relevant issue has been fixed by PR:sonic-net/sonic-buildimage#15080 2. Remove wait_until(60, 1, 0, check_interfaces_config_service_status, duthost) in PR: sonic-net#7953 due to the above same reason Change-Id: I022a948cb2e36ba7d5538258159ea047d13d80a7
1. Revert PR: #7289, because the relevant issue has been fixed by PR:sonic-net/sonic-buildimage#15080 2. Remove wait_until(60, 1, 0, check_interfaces_config_service_status, duthost) in PR: #7953 due to the above same reason
1. Revert PR: sonic-net#7289, because the relevant issue has been fixed by PR:sonic-net/sonic-buildimage#15080 2. Remove wait_until(60, 1, 0, check_interfaces_config_service_status, duthost) in PR: sonic-net#7953 due to the above same reason
1. Revert PR: sonic-net#7289, because the relevant issue has been fixed by PR:sonic-net/sonic-buildimage#15080 2. Remove wait_until(60, 1, 0, check_interfaces_config_service_status, duthost) in PR: sonic-net#7953 due to the above same reason
Cherry-pick #11674 to 202205 branch 1. Revert PR: #7289, because the relevant issue has been fixed by PR:sonic-net/sonic-buildimage#15080 2. Remove wait_until(60, 1, 0, check_interfaces_config_service_status, duthost) in PR: #7953 due to the above same reason
1. Revert PR: #7289, because the relevant issue has been fixed by PR:sonic-net/sonic-buildimage#15080 2. Remove wait_until(60, 1, 0, check_interfaces_config_service_status, duthost) in PR: #7953 due to the above same reason
1. Revert PR: #7289, because the relevant issue has been fixed by PR:sonic-net/sonic-buildimage#15080 2. Remove wait_until(60, 1, 0, check_interfaces_config_service_status, duthost) in PR: #7953 due to the above same reason
The original issue is still not fixed. interfcae-config.service dependency is removed but now we see the original "redis connection failure" error if the config reload is done quickly after database check passes. The config reload check after database up and before swss start is totally timing based here. If we want to validate config reload to fail for swss down, we can have a test case to stop swss and check the config reload. |
Log for the above..
|
HI @dgsudharsan , looks like the issue is not completely fixed. We still observe the error |
Description
test_reload_config test case has a dependency on interfaces-config.service. In a test to validate config reload failure when swss is not up, the test checks for interfaces-config.service state (https://github.com/sonic-net/sonic-mgmt/blob/master/tests/platform_tests/test_reload_config.py#L129) to be up to test config reload, expecting swss is not up at that time. This change was introduced by #7289
This code assumes that the swss service has a dependency on interface-config.service and starts after the interface-config, which was the case earlier. This dependency was removed a year ago via sonic-net/sonic-buildimage#13084
There is no direct dependency between interfaces-config and swss, so systemd won't guarantee swss service starts only after interfaces-config.
Steps to reproduce the issue:
1.
2.
3.
Describe the results you received:
Describe the results you expected:
Additional information you deem important:
The text was updated successfully, but these errors were encountered: