The disable_container_autorestart func in tests/conftest.py sometimes fails in qos test for multi_asic chassis due to the container inconsistent autorestart state across namespace.
Prior running qos test, few services are stopped and container autorestart feature is disabled. While disabling, if the autorestart state of the feature at asic-level is not in sync with the host level, the test error with
Feature 'xxx' auto-restart is not consistent across namespaces
Fixes # (issue)
Feature 'xxx' auto-restart is not consistent across namespaces
Type of change
[ ] Bug fix
[ ] Testbed and Framework(new/improvement)
[x] Test case(new/improvement)
Back port request
[ ] 202012
[x] 202205
[ ] 202305
[ ] 202311
[x] 202405
Approach
For the multi_asic chassis,
Before disabling the container autorestart, make sure the autorestart state of the selected container is same at asic-level and host level
What is the motivation for this PR?
qos test failures with error "Feature 'xxx' auto-restart is not consistent across namespaces"
How did you do it?
How did you verify/test it?
Ran qos test suite and verify the results
Any platform specific information?
Supported testbed topology if it's a new test case?
Description of PR
The disable_container_autorestart func in tests/conftest.py sometimes fails in qos test for multi_asic chassis due to the container inconsistent autorestart state across namespace. Prior running qos test, few services are stopped and container autorestart feature is disabled. While disabling, if the autorestart state of the feature at asic-level is not in sync with the host level, the test error with Feature 'xxx' auto-restart is not consistent across namespaces
:~$ show feature autorestart Feature AutoRestart
acms enabled bgp enabled database always_enabled dhcp_relay enabled lldp enabled macsec enabled mux enabled pmon enabled radv enabled restapi enabled snmp enabled swss enabled syncd enabled teamd enabled telemetry enabled :~$ sudo ip netns exec asic0 show feature autorestart Feature AutoRestart
acms enabled bgp disabled database always_enabled dhcp_relay enabled lldp enabled macsec enabled mux enabled pmon enabled radv enabled restapi enabled snmp enabled swss enabled syncd enabled teamd enabled telemetry enabled :~$ sudo ip netns exec asic1 show feature autorestart Feature AutoRestart
acms enabled bgp enabled database always_enabled dhcp_relay enabled lldp enabled macsec enabled mux enabled pmon enabled radv enabled restapi enabled snmp enabled swss enabled syncd enabled teamd enabled telemetry enabled :~$ sudo config feature autorestart bgp disabled Feature 'bgp' auto-restart is not consistent across namespaces Summary:
Fixes # (issue) Feature 'xxx' auto-restart is not consistent across namespaces
Type of change
Back port request
Approach
For the multi_asic chassis, Before disabling the container autorestart, make sure the autorestart state of the selected container is same at asic-level and host level
What is the motivation for this PR?
qos test failures with error "Feature 'xxx' auto-restart is not consistent across namespaces"
How did you do it?
How did you verify/test it?
Ran qos test suite and verify the results
Any platform specific information?
Supported testbed topology if it's a new test case?
Documentation