-
Notifications
You must be signed in to change notification settings - Fork 366
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
Support Traceflow of live traffic #2005
Conversation
I still need to add e2e test, and fix the OVS packet_out error for regular Traceflow (at least in my env). @antoninbas : I plan to add reporting the captured packet headers after this PR. |
c1e780d
to
d74ca64
Compare
Codecov Report
@@ Coverage Diff @@
## main #2005 +/- ##
==========================================
+ Coverage 61.83% 62.91% +1.07%
==========================================
Files 262 262
Lines 19473 19560 +87
==========================================
+ Hits 12042 12307 +265
+ Misses 6176 5983 -193
- Partials 1255 1270 +15
Flags with carried forward coverage won't be shown. Click here to find out more.
|
type icmpType uint8 | ||
type icmpCode uint8 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why the change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We do not define a type for all other fields (IPFlags, TCPFlags, ICMPEchoSequence, IPProtocol, TPPort, etc.), I do not see why we define a type just for these three (and convert to uint8 later).
pkg/apis/ops/v1alpha1/types.go
Outdated
Source Source `json:"source,omitempty"` | ||
Destination *Destination `json:"destination,omitempty"` | ||
Packet *Packet `json:"packet,omitempty"` | ||
// LiveTraffic indicates the Traceflow is to trace the live traffic |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am curious about what your plan is to report header values in the captured packet in the future. Do you have an idea already of how TraceflowStatus
will change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I plan to add a struct called CapturedPacket to TraceflowStatus.
215bc7f
to
b1371d5
Compare
I reverted the Traceflow API change of making Destination and Packet optional. Also added e2e tests for live-traffic Traceflow. But still need to fix inter-node e2e test failures. |
/test-e2e |
cb9e005
to
f40d2d8
Compare
Debugging Kind e2e test failure.. |
64bb112
to
14f1389
Compare
f5f7d38
to
be06e04
Compare
9d38ad8
to
929c9eb
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, just two format issues.
cac9bb6
to
de98c1e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
9f49130
to
5dfa3c8
Compare
/test-all |
/test-all |
Add support of tracing live traffic. Rather than injecting a Traceflow packet, a live traffic Traceflow will trace the real traffic between Pods - the first packet of the first connection that matches the Traceflow spec will be traced. antctl traceflow command is extended to support live traffic Traceflow. This commit also makes a few others changes to Traceflow: add a Timeout parameter to Traceflow Spec and antctl traceflow command to specify the timeout time of a Traceflow; delete OVS flows added for the Traceflow after agent receives the first captured packet of the Traceflow; support all IP protocol.
/test-all |
/test-networkpolicy |
Add support of tracing live traffic. Rather than injecting a Traceflow
packet, a live traffic Traceflow will trace the real traffic between
Pods - the first packet of the first connection that matches the
Traceflow spec will be traced.
antctl traceflow command is extended to support live traffic Traceflow.
This commit also makes a few others changes to Traceflow: change
Destination (live traffic Traceflow does not require Traceflow
Destination to be provided), Packet, and Packet IPHeader in Traceflow
Spec to optional fields; add a Timeout parameter to Traceflow Spec and
antctl traceflow command to specify the timeout time of a Traceflow;
delete OVS flows added for the Traceflow after agent receives the first
captured packet of the Traceflow; support all IP protocols.
Issue: #2030