-
Notifications
You must be signed in to change notification settings - Fork 210
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
feat: Retina dataplane debug CLI #740
base: main
Are you sure you want to change the base?
Conversation
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 you add in the description the usage and how the output looks like?
fmt.Println("eBPF map availability:") | ||
for _, mt := range eBPFMapList { | ||
err = features.HaveMapType(mt) | ||
if err != nil && !errors.Is(err, ebpf.ErrNotSupported) { | ||
return errors.Wrapf(err, "failed to check for map type %s", mt.String()) | ||
} | ||
fmt.Printf("%s: %s\n", mt.String(), isSupported(err)) | ||
} | ||
|
||
fmt.Println("--------------------------------------------------") | ||
fmt.Println("eBPF program types availability:") | ||
for _, pt := range eBPFProgramList { | ||
err = features.HaveProgramType(pt) | ||
if err != nil && !errors.Is(err, ebpf.ErrNotSupported) { | ||
return errors.Wrapf(err, "failed to check for program type %s", pt.String()) | ||
} | ||
fmt.Printf("%s: %s\n", pt.String(), isSupported(err)) | ||
} |
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.
IMO, it's not important to list all map/prog types. We can just list all maps and programs, and that would be enough information. For specific maps (like conntrack), we may want to print entries, but listing by types is not that helpful.
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.
this is more so for users to check which maps and programs can be initialize on their host, but yes i do plan to have a command that will list out maps/programs running
func init() { | ||
Cmd.AddCommand(featuresCmd) | ||
Cmd.AddCommand(qdiscCmd) | ||
} |
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 add a status
command, showcasing the important one-liners:
- socket setup
- agent running (maybe)
- maps
- programs
- flow rate (?)
- plugins
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.
you can already get flow rate by exec hubble status
on the agent so it might be overkill?
an additional scenario might be scraping ourselves on effectively automate this task in our own tsg's |
This PR will be closed in 7 days due to inactivity. |
Pull request closed due to inactivity. |
Description
This PR introduces the skeleton for the dataplane debug CLI, as well as several commands to debug
conntrack
Related Issue
If this pull request is related to any issue, please mention it here. Additionally, make sure that the issue is assigned to you before submitting this pull request.
Checklist
git commit -S -s ...
). See this documentation on signing commits.Screenshots (if applicable) or Testing Completed
Please add any relevant screenshots or GIFs to showcase the changes made.
Additional Notes
Add any additional notes or context about the pull request here.
Please refer to the CONTRIBUTING.md file for more information on how to contribute to this project.