You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If multiple tests are executed in parallel (e.g. via pytest-xdist) and
more than one test queries the iptables rules on the same host
simultaneously, the following error will occur:
E AssertionError: Unexpected exit code 4 for
CommandResult(command='iptables -t filter -S', exit_status=4,
stdout='', stderr='Another app is currently holding the xtables
lock. Perhaps you want to use the -w option?')
Iptables has an internal lock to prevent multiple simultaneous
invocations. This change implements that suggestion and adds "-w 90" to
the iptables command so that we will wait up to 90 seconds to obtain the
lock.
Unfortunatelly centos 6 is still maintained but doesn't have support for
iptables with "-w" argument. So we have handle this by trying iptables
with "-w 90", if it fail we retry without this option ("w argument
support" is then cached at host level).
Co-Authored-By James E. Blair <[email protected]>
0 commit comments