-
Notifications
You must be signed in to change notification settings - Fork 6
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
koordetector: make koordetector run and compatible with different kernels #34
base: main
Are you sure you want to change the base?
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
…nels Signed-off-by: songtao98 <[email protected]>
cf7cf34
to
8f239d9
Compare
Codecov ReportPatch and project coverage have no change.
Additional details and impacted files@@ Coverage Diff @@
## main #34 +/- ##
=======================================
Coverage 33.70% 33.70%
=======================================
Files 1 1
Lines 89 89
=======================================
Hits 30 30
Misses 58 58
Partials 1 1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
statesInformerConf := statesinformer.NewDefaultConfig() | ||
|
||
statesInformer := statesinformer.NewStatesInformer(statesInformerConf, kubeClient, nodeName) | ||
statesInformer := statesinformer.NewStatesInformer(config.StatesInformerConf, kubeClient, nodeName) |
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.
now we can consider import statesinformer pkg from koordlet directly?
context *framework.Context | ||
} | ||
|
||
func NewMetricAdvisor(cfg *framework.Config, statesInformer statesinformer.StatesInformer) MetricAdvisor { |
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.
use the MetricAdvisor from koordlet?
Ⅰ. Describe what this PR does
This PR completes codes for koordetector to run with Dockerfile. The functionality of CPU schedule latency eBPF program is now available by this commit.
An eBPF CO-RE way is used to develop CSL collector. For developers' intention, you can follow belowing process to develop a eBPF program under koordetector's architecture:
.c
file. (e.g.pkg/koordetector/util/ebpf/cpu_schedule_latency/csl.bpf.c
)"github.com/cilium/ebpf"
package and provide a go util(e.g.pkg/koordetector/util/cpu_schedule_latency/cpu_schedule_latency.go
).go generate
to compile and generate.o
file for your eBPF program. Files inpkg/koordetector/util/ebpf/headers
can be used for that./sys/kernel/btf/vmlinux
) file to re-location kernel information such astask_struct
structure. If this fails (e.g. kernel < 5.2 does not has vmlinux in /sys/kernel/btf/vmlinux), the CSL collector will use vmlinux files inpkg/koordetector/util/ebpf/core
.For now, I added supporting vmlinux file of kernel
vmlinux-4.19.91-27.4.al7.x86_64
in this PR. Vmlinux files for other kernels can be find in BTFhub, Anolis coolbpf or generate by pahole.Ⅱ. Does this pull request fix one issue?
Ⅲ. Describe how to verify it
Ⅳ. Special notes for reviews
V. Checklist
make test