Skip to content

[action] [PR:12883] Set mux mode to manual to disable port toggle in cacl scripts on dualtor testbed#12894

Merged
mssonicbld merged 1 commit intosonic-net:202311from
mssonicbld:cherry/202311/12883
May 20, 2024
Merged

[action] [PR:12883] Set mux mode to manual to disable port toggle in cacl scripts on dualtor testbed#12894
mssonicbld merged 1 commit intosonic-net:202311from
mssonicbld:cherry/202311/12883

Conversation

@mssonicbld
Copy link
Collaborator

Description of PR

GCU test_cacl case failed on dualtor testbed randomly.
The failed message:
failed on teardown with "Failed: iptable rules are not suppose to change after test. diff: ['+ -A DHCP -m mark --mark 0x67008 -j DROP', '+ -A DHCP -m mark --mark 0x67024 -j DROP', '+ -A DHCP -m mark --mark 0x67022 -j DROP', '+ -A DHCP -m mark --mark 0x67018 -j DROP', '+ -A DHCP -m mark --mark 0x67014 -j DROP', '+ -A DHCP -m mark --mark 0x67013 -j DROP', '+ -A DHCP -m mark --mark 0x67010 -j DROP', '+ -A DHCP -m mark --mark 0x67009 -j DROP', '+ -A DHCP -m mark --mark 0x67004 -j DROP', '+ -A DHCP -m mark --mark 0x67007 -j DROP', '+ -A DHCP -m mark --mark 0x67006 -j DROP', '+ -A DHCP -m mark --mark 0x67002 -j DROP', '+ -A DHCP -m mark --mark 0x67001 -j DROP', '+ -A DHCP -m mark --mark 0x67005 -j DROP']"

Summary:
Fixes # (issue)
The failed reason is dualtor oscillation feature is enabled by default in 202311/mater/internal branch.
In nightly test environment, it's easy to trigger oscillation between standby and active ports.
In this case, before running test case, some ports are active on DUT, but after test case, when do iptables verification, some ports turn to be standby, that causes iptables DHCP rules to change. The consequence is there is diff between original and latest iptables, which will fail the test case in teardown phase.
We have to disable oscillation by set mux to manual mode on both TORs.

Enhance the change in #11878,
set mux mode to manual on both TORs to avoid port state change during test.

Type of change

  • Bug fix
  • Testbed and Framework(new/improvement)
  • Test case(new/improvement)

Back port request

  • 201911
  • 202012
  • 202205
  • 202305
  • 202311

Approach

What is the motivation for this PR?

Fix random failure of GCU test_cacl.py on dualtor testbed

How did you do it?

Change mux mode to manual before test case and set it back to auto after test case.

How did you verify/test it?

run generic_config_updater.test_cacl on dualtor testbed.

Any platform specific information?

Supported testbed topology if it's a new test case?

Documentation

…tor testbed (sonic-net#12883)

Description of PR
GCU test_cacl case failed on dualtor testbed randomly.
The failed message:
failed on teardown with "Failed: iptable rules are not suppose to change after test. diff: ['+ -A DHCP -m mark --mark 0x67008 -j DROP', '+ -A DHCP -m mark --mark 0x67024 -j DROP', '+ -A DHCP -m mark --mark 0x67022 -j DROP', '+ -A DHCP -m mark --mark 0x67018 -j DROP', '+ -A DHCP -m mark --mark 0x67014 -j DROP', '+ -A DHCP -m mark --mark 0x67013 -j DROP', '+ -A DHCP -m mark --mark 0x67010 -j DROP', '+ -A DHCP -m mark --mark 0x67009 -j DROP', '+ -A DHCP -m mark --mark 0x67004 -j DROP', '+ -A DHCP -m mark --mark 0x67007 -j DROP', '+ -A DHCP -m mark --mark 0x67006 -j DROP', '+ -A DHCP -m mark --mark 0x67002 -j DROP', '+ -A DHCP -m mark --mark 0x67001 -j DROP', '+ -A DHCP -m mark --mark 0x67005 -j DROP']"

Summary:
Fixes # (issue)
The failed reason is dualtor oscillation feature is enabled by default in 202311/mater/internal branch.
In nightly test environment, it's easy to trigger oscillation between standby and active ports.
In this case, before running test case, some ports are active on DUT, but after test case, when do iptables verification, some ports turn to be standby, that causes iptables DHCP rules to change. The consequence is there is diff between original and latest iptables, which will fail the test case in teardown phase.
We have to disable oscillation by set mux to manual mode on both TORs.

Enhance the change in sonic-net#11878,
set mux mode to manual on both TORs to avoid port state change during test.
@mssonicbld
Copy link
Collaborator Author

Original PR: #12883

@mssonicbld mssonicbld merged commit 8992293 into sonic-net:202311 May 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants