Skip to content

Bring in changes in preparation for Bullseye#4037

Merged
lguohan merged 4 commits intosonic-net:masterfrom
saiarcot895:bullseye-changes
Aug 14, 2021
Merged

Bring in changes in preparation for Bullseye#4037
lguohan merged 4 commits intosonic-net:masterfrom
saiarcot895:bullseye-changes

Conversation

@saiarcot895
Copy link
Copy Markdown
Contributor

Description of PR

  1. Make Python 3 changes in interface_facts.py.
  2. Force tcpdump to use Linux cooked v1 format when listening on any interface.,
  3. Update ip route syntax for Bullseye.

Type of change

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

Back port request

  • 201911

…interface

On Bullseye, tcpdump defaults to writing pcap files in Linux cooked v2
format. Scapy, however, doesn't support reading Linux cooked v2. So
force tcpdump to use the older format.

Signed-off-by: Saikrishna Arcot <[email protected]>
@saiarcot895 saiarcot895 requested a review from a team as a code owner August 13, 2021 05:48
@saiarcot895 saiarcot895 requested a review from lguohan August 13, 2021 05:49
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wonder if you could add example like above. it seems the kernel changed the format.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It could be worth it to also consider using the JSON output instead of trying to parse text. That might make it more resilient to formatting/output changes.

Copy link
Copy Markdown
Contributor

@lguohan lguohan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

In Bullseye, ip route includes the next hop ID in the output if it's
set/available. Add a regex to handle that.

Signed-off-by: Saikrishna Arcot <[email protected]>
In some cases, depending on the order in which dictionary items get
processed, some data that belongs to a single-level key can end up not
actually being copied into `data` (the formatted dictionary that's then
used by other test scripts). This was actually happening with the
VLAN_INTERFACE table where `proxy_arp` was present in sonic-cfggen, but
was silently being dropped here.

Fix this issue, and fix a test script that would get broken because
there are non-IP addresses present now.

This was seen with Python 3, where there is a different order in which
dictionary items ended up getting processed.

Signed-off-by: Saikrishna Arcot <[email protected]>
@lguohan lguohan merged commit 5e27bf6 into sonic-net:master Aug 14, 2021
@saiarcot895 saiarcot895 deleted the bullseye-changes branch August 16, 2021 16:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants