Skip to content

[arp] Ignore intermittent failure of "ip neigh flush all"#820

Merged
liat-grozovik merged 1 commit intosonic-net:masterfrom
wangxin:ip-neigh-flush-pr
Mar 13, 2019
Merged

[arp] Ignore intermittent failure of "ip neigh flush all"#820
liat-grozovik merged 1 commit intosonic-net:masterfrom
wangxin:ip-neigh-flush-pr

Conversation

@wangxin
Copy link
Collaborator

@wangxin wangxin commented Mar 6, 2019

In ARP testing, the script needs to run "ip neigh flush all" couple of
times to clean up ARP table. Occasionally flushing ARP table may fail
with error "*** Flush not complete bailing out after 10 rounds" on ptf32
or ptf64 topology.

The reason is that BGP peers are configured on these topologies although
the PTF container does not have BGP running. From time to time, DUT will
try to contact the BGP peers. ARP requests are firstly sent out. This
will create some INCOMPLETE entries in ARP table for the BGP peers. If
"ip neigh flush all" is executed at the same moment, the command may
fail with "*** Flush not complete bailing out after 10 rounds".

The fix is to simply ignore the error of "ip neigh flush all". Purpose
of the "ip neigh flush all" command is to cleanup ARP entries generated
by previous testing. It doesn't matter when there are ARP entries
generated by other activities not flushed.

Meanwhile, I changed the command to "ip -stats neigh flush all" to
have more detailed output for debug in case of failure.

Description of PR

Summary:
Fixes # (issue)
In ARP testing, the script needs to run "ip neigh flush all" couple of
times to clean up ARP table. Occasionally flushing ARP table may fail
with error "*** Flush not complete bailing out after 10 rounds" on ptf32
or ptf64 topology.

The reason is that BGP peers are configured on these topologies although
the PTF container does not have BGP running. From time to time, DUT will
try to contact the BGP peers. ARP requests are firstly sent out. This
will create some INCOMPLETE entries in ARP table for the BGP peers. If
"ip neigh flush all" is executed at the same moment, the command may
fail with "*** Flush not complete bailing out after 10 rounds".

The fix is to simply ignore the error of "ip neigh flush all". Purpose
of the "ip neigh flush all" command is to cleanup ARP entries generated
by previous testing. It doesn't matter when there are ARP entries
generated by other activities not flushed.

Meanwhile, I changed the command to "ip -stats neigh flush all" to
have more detailed output for debug in case of failure.

Type of change

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

Approach

How did you do it?

  • Add "ignore_errors: yes" for "ip neigh flush all" command.
  • Replace the command with "ip -stats neigh flush all" to have more detailed output for debugging in case of failure.

How did you verify/test it?

Tested on Mellanox platform.

Any platform specific information?

No

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

Documentation

In ARP testing, the script needs to run "ip neigh flush all" couple of
times to clean up ARP table. Occasionally flushing ARP table may fail
with error "*** Flush not complete bailing out after 10 rounds" on ptf32
or ptf64 topology.

The reason is that BGP peers are configured on these topologies although
the PTF container does not have BGP running. From time to time, DUT will
try to contact the BGP peers. ARP requests are firstly sent out. This
will create some INCOMPLETE entries in ARP table for the BGP peers. If
"ip neigh flush all" is executed at the same moment, the command may
fail with "*** Flush not complete bailing out after 10 rounds".

The fix is to simply ignore the error of "ip neigh flush all". Purpose
of the "ip neigh flush all" command is to cleanup ARP entries generated
by previous testing. It doesn't matter when there are ARP entries
generated by other activities not flushed.

Meanwhile, I changed the command to "ip -stats neigh flush all" to
have more detailed output for debug in case of failure.

Signed-off-by: Xin Wang <[email protected]>
@liat-grozovik liat-grozovik merged commit 3cbc0c9 into sonic-net:master Mar 13, 2019
@wangxin wangxin deleted the ip-neigh-flush-pr branch March 18, 2019 05:21
yxieca pushed a commit that referenced this pull request Mar 18, 2019
In ARP testing, the script needs to run "ip neigh flush all" couple of
times to clean up ARP table. Occasionally flushing ARP table may fail
with error "*** Flush not complete bailing out after 10 rounds" on ptf32
or ptf64 topology.

The reason is that BGP peers are configured on these topologies although
the PTF container does not have BGP running. From time to time, DUT will
try to contact the BGP peers. ARP requests are firstly sent out. This
will create some INCOMPLETE entries in ARP table for the BGP peers. If
"ip neigh flush all" is executed at the same moment, the command may
fail with "*** Flush not complete bailing out after 10 rounds".

The fix is to simply ignore the error of "ip neigh flush all". Purpose
of the "ip neigh flush all" command is to cleanup ARP entries generated
by previous testing. It doesn't matter when there are ARP entries
generated by other activities not flushed.

Meanwhile, I changed the command to "ip -stats neigh flush all" to
have more detailed output for debug in case of failure.

Signed-off-by: Xin Wang <[email protected]>
deerao02 pushed a commit to deerao02/sonic-mgmt that referenced this pull request Dec 18, 2025
…t#820)

Add cache to get_ports_map.
Call transceiver presence once for all ports together.
kazinator-arista pushed a commit to kazinator-arista/sonic-mgmt that referenced this pull request Mar 4, 2026
…onic-net#7316)

- [pyext] Fix pyext/py2 library (sonic-net#820)
- Added --purge of base docker image packages before installing new ones. (sonic-net#819) <--- branch point

Signed-off-by: Danny Allen <[email protected]>
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.

3 participants