Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix the formatting of antctl trace-packet output #1897

Merged
merged 1 commit into from
Feb 25, 2021

Conversation

jianjuns
Copy link
Contributor

Transform the "/ovstracing API" response to []byte, and change antctl to
output the raw bytes directly for a []byte type response.

Transform the "/ovstracing API" response to []byte, and change antctl to
output the raw bytes directly for a []byte type response.
@codecov-io
Copy link

codecov-io commented Feb 23, 2021

Codecov Report

❗ No coverage uploaded for pull request base (main@c92bdcf). Click here to learn what that means.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #1897   +/-   ##
=======================================
  Coverage        ?   50.67%           
=======================================
  Files           ?      200           
  Lines           ?    17385           
  Branches        ?        0           
=======================================
  Hits            ?     8810           
  Misses          ?     7451           
  Partials        ?     1124           
Flag Coverage Δ
e2e-tests 33.70% <0.00%> (?)
kind-e2e-tests 49.76% <0.00%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

@lzhecheng
Copy link
Contributor

Will you change /ovsflows as well since its response type ovsflows.Response has similar struct with ovstracing.Response? I am wondering the purpose of this PR.

@jianjuns
Copy link
Contributor Author

@lzhecheng : I should mention the reason for this change is because the trace-packet formatting is broken now:

result: "Flow: ip,in_port=2,vlan_tci=0x0000,dl_src=ce:4f:c2:58:8a:be,dl_dst=00:00:00:00:00:00,nw_src=172.100.0.1,nw_dst=0.0.0.0,nw_proto=0,nw_tos=0,nw_ecn=0,nw_ttl=64\n\nbridge("br-int")\n----------------\n 0. in_port=2, priority 200, cookie 0x14000000000000\n load:0x1->NXM_NX_REG0[0..15]\n goto_table:10\n10. ip,in_port=2, priority 200, cookie 0x14000000000000\n goto_table:29\n29. priority 0, cookie 0x14000000000000\n goto_table:30\n30. ip, priority 200, cookie 0x14000000000000\n ct(table=31,zone=65520,nat)\n nat\n -> A clone of the packet is forked to recirculate. The forked pipeline will be resumed at table 31.\n -> Sets the packet to an untracked state, and clears all the conntrack fields.\n\nFinal flow: ip,reg0=0x1,in_port=2,vlan_tci=0x0000,dl_src=ce:4f:c2:58:8a:be,dl_dst=00:00:00:00:00:00,nw_src=172.100.0.1,nw_dst=0.0.0.0,nw_proto=0,nw_tos=0,nw_ecn=0,nw_ttl=64\nMegaflow: recirc_id=0,eth,ip,in_port=2,nw_dst=0.0.0.0/1,nw_frag=no\nDatapath actions: ct(zone=65520,nat),recirc(0x1)\n\n===============================================================================\nrecirc(0x1) - resume conntrack with default ct_state=trk|new (use --ct-next to customize)\nReplacing src/dst IP/ports to simulate NAT:\n Initial flow: \n

/ovsflows is different - it returns an array of flows, but not a single string.

Copy link
Contributor

@lzhecheng lzhecheng left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@tnqn tnqn left a comment

Choose a reason for hiding this comment

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

LGTM

@jianjuns
Copy link
Contributor Author

/test-all

@jianjuns jianjuns merged commit 0b3304c into antrea-io:main Feb 25, 2021
antoninbas pushed a commit to antoninbas/antrea that referenced this pull request Mar 12, 2021
Transform the "/ovstracing API" response to []byte, and change antctl to
output the raw bytes directly for a []byte type response.
antoninbas pushed a commit that referenced this pull request Mar 12, 2021
Transform the "/ovstracing API" response to []byte, and change antctl to
output the raw bytes directly for a []byte type response.
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.

5 participants