-
Notifications
You must be signed in to change notification settings - Fork 367
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
Add Traceflow Octant-Plugin #841
Conversation
Thanks for your PR. The following commands are available:
These commands can only be run by members of the vmware-tanzu organization. |
Actually, this patch only relies on traceflow CRD definition patch and has no dependency with the other two traceflow implementation patches. I will update this part. |
cmd/traceflow-plugin/main.go
Outdated
} | ||
|
||
switch actionName { | ||
case addTfAction: |
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 need to update this part of logic.
- Add the field name and so that we can trace several times without deleting the previous CRD.
- Support more protocol and our previous hard code is just for function verification.
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 need to update this part of logic.
- Add the field name and so that we can trace several times without deleting the previous CRD.
- Support more protocol and our previous hard code is just for function verification.
For the first point, what if the user inputs duplicate traceflow name? As I have not found a good way to inform users like pop-ups, now I just replace the old traceflow with the new one.
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.
Yiwei's point makes sense to me. @gran-vmv Do you think we need this extra field? Or maybe we could keep the previous logic by constructing the name by source and destination, then if a duplicate one already exists, we can always delete and recreate a new one?
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.
Yiwei's point makes sense to me. @gran-vmv Do you think we need this extra field? Or maybe we could keep the previous logic by constructing the name by source and destination, then if a duplicate one already exists, we can always delete and recreate a new one?
I think we can use hash code. Add a random string at the end of each traceflow name.
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.
Can we use timestamp for this?
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.
@ZhangYW18 Please also check when Pod name contains dot "."
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.
Updated traceflow name to "srcPod-dstPod-YYYYMMDD-HHMMSS".
Regex check for strings is also added.
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 have added some comments, please take a look.
We can check in this one after #838.
In this way, we will use the latest octant which has fixed graphviz performance issues. And since we can also fix the position of source graph and destination graph now, traceflow-plugin can be changed to auto refresh graphviz.
Have updated the description. |
8e8f736
to
0090edd
Compare
Thanks for your PR. The following commands are available:
These commands can only be run by members of the vmware-tanzu organization. |
0090edd
to
4d1ac6b
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.
Please remove commit "Implemented Antrea traceflow controller and agent" from this PR since there is no dependency.
And fix the failed checks except starting with "jenkins-".
f204e91
to
833e4fd
Compare
The change to move octant-plugins to separate folder has been checked in. Please move traceflow octant-plugin to the same folder. This patch should have no dependencies with other commit now. |
833e4fd
to
8fafe48
Compare
0d518f0
to
968a6d5
Compare
aafb8ca
to
6b986af
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.
I still prefer a single plugin, but if that means too big a design change, we can make the change later.
Besides this, the PR looks good to me. Just have some minor comments.
34ff6c0
to
3277bca
Compare
} | ||
|
||
// This is antrea-traceflow-plugin. | ||
// The plugin needs to run with octant version v0.10.2 or later. |
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.
Let's remove this line since we will run it with 0.13.1
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.
Removed.
component.NewFormFieldHidden("action", showGraphAction), | ||
}} | ||
genGraph := component.Action{ | ||
Name: "Generate Trace Graph", |
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.
Since we can support automatically refreshment for the latest traceflow, do you think it is better that we change this to " Generate Historical Trace Graph"?
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.
historical?
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.
Since we can support automatically refreshment for the latest traceflow, do you think it is better that we change this to " Generate Historical Trace Graph"?
“LatestTfName” will change to not only the name of the most recently created traceflow, but also the name of the most recently shown traceflow. If so, we have to modify this part of logic.
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.
Do you mean "past"/"previous" instead of "historical"?
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 don't think we need to change this part of logic. It is just that "Start New Trace" will actually create a CRD and generate its trace graph. "Generate Historical Trace Graph" will generate the trace graph for any traceflow CRD given its name whether it is the latest one or not. BTW, do yo think maybe "lastTfName" can represent better than "latestTfName"? And we will always show graphviz for "lastTfName".
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 don't think we need to change this part of logic. It is just that "Start New Trace" will actually create a CRD and generate its trace graph. "Generate Historical Trace Graph" will generate the trace graph for any traceflow CRD given its name whether it is the latest one or not. BTW, do yo think maybe "lastTfName" can represent better than "latestTfName"? And we will always show graphviz for "lastTfName".
"Latest" implies the most recently created one. As far as I'm concerned, we do need to change the name.
3f4fa46
to
5a4b477
Compare
@@ -0,0 +1,404 @@ | |||
package main |
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.
Copyright.
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.
Header added.
Could we not use the pink color, and perhaps less colors overall, then it would look more serious.. |
@ZhangYW18 Minor comments for copyright. The change looks good to me overall. |
Will both of them be released in release package? I'm a little concerned about the number of bits given each one will have multiple platform versions |
@tnqn I am thinking only include antrea-octant-plugin for now. Since we plan to merge this antrea-traceflow-plugin to antrea-octant-plugin later and traceflow is disabled by default right now, we can provide the antrea-octant-plugin with both features later, maybe 0.9? What do you think? |
Sounds good to me, thanks |
/skip-all |
Per discussions offline with @tnqn @antoninbas @McCodeman, merge this PR to be included in 0.8.0. We should continue to add some user documentation (and maybe some demo recording/screenshots in the documents). |
Add a Traceflow octant-plugin for Antrea.
Collaborate with @mengdie-song .
Some sample Traceflow graphs:
Some screenshots of the plugin:
Note:
This PR depends on below PR, the commit is included. If reviewers have any comments on Traceflow CRD, please go to below link:
#660 Traceflow CRD