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

logs: simplify the bpfman-agent logs #336

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Billy99
Copy link
Contributor

@Billy99 Billy99 commented Nov 1, 2024

As part of a security review which required extend logging behavior, investigated improving the logs. Moved the logs from using context, which prints a lot if useless info, to just using regular logs. Also changed the logging default from debug to info, and changed the level of some of the existing logs.

As part of a security review which required extend logging behaviour,
investigated improving the logs. Moved the logs from using context,
which prints a lot if useless info, to just using regular logs.

Signed-off-by: Billy McFall <[email protected]>
@Billy99
Copy link
Contributor Author

Billy99 commented Nov 1, 2024

Here is the current logs, from a KIND cluster at boot, and running make deploy-xdp and make deploy-kprobe:

Original Logs

$ kubectl logs -n bpfman bpfman-daemon-254wh -c bpfman-agent -f
{"level":"info","ts":"2024-11-01T20:51:43Z","logger":"setup","msg":"Waiting for active connection to bpfman"}
{"level":"info","ts":"2024-11-01T20:51:43Z","logger":"setup","msg":"starting Bpfman-Agent"}
{"level":"info","ts":"2024-11-01T20:51:43Z","logger":"controller-runtime.metrics","msg":"Starting metrics server"}
{"level":"info","ts":"2024-11-01T20:51:43Z","msg":"starting server","name":"pprof","addr":"[::]:6060"}
{"level":"info","ts":"2024-11-01T20:51:43Z","logger":"controller-runtime.metrics","msg":"Serving metrics server","bindAddress":"127.0.0.1:8174","secure":false}
{"level":"info","ts":"2024-11-01T20:51:43Z","msg":"starting server","name":"health probe","addr":"[::]:8175"}
{"level":"info","ts":"2024-11-01T20:51:43Z","msg":"Starting EventSource","controller":"tcxprogram","controllerGroup":"bpfman.io","controllerKind":"TcxProgram","source":"kind source: *v1alpha1.TcxProgram"}
{"level":"info","ts":"2024-11-01T20:51:43Z","msg":"Starting EventSource","controller":"xdpprogram","controllerGroup":"bpfman.io","controllerKind":"XdpProgram","source":"kind source: *v1alpha1.XdpProgram"}
{"level":"info","ts":"2024-11-01T20:51:43Z","msg":"Starting EventSource","controller":"tcxprogram","controllerGroup":"bpfman.io","controllerKind":"TcxProgram","source":"kind source: *v1alpha1.BpfProgram"}
{"level":"info","ts":"2024-11-01T20:51:43Z","msg":"Starting EventSource","controller":"tcxprogram","controllerGroup":"bpfman.io","controllerKind":"TcxProgram","source":"kind source: *v1.Node"}
{"level":"info","ts":"2024-11-01T20:51:43Z","msg":"Starting EventSource","controller":"xdpprogram","controllerGroup":"bpfman.io","controllerKind":"XdpProgram","source":"kind source: *v1alpha1.BpfProgram"}
{"level":"info","ts":"2024-11-01T20:51:43Z","msg":"Starting Controller","controller":"tcxprogram","controllerGroup":"bpfman.io","controllerKind":"TcxProgram"}
{"level":"info","ts":"2024-11-01T20:51:43Z","msg":"Starting EventSource","controller":"xdpprogram","controllerGroup":"bpfman.io","controllerKind":"XdpProgram","source":"kind source: *v1.Node"}
{"level":"info","ts":"2024-11-01T20:51:43Z","msg":"Starting Controller","controller":"xdpprogram","controllerGroup":"bpfman.io","controllerKind":"XdpProgram"}
{"level":"info","ts":"2024-11-01T20:51:43Z","msg":"Starting EventSource","controller":"tcprogram","controllerGroup":"bpfman.io","controllerKind":"TcProgram","source":"kind source: *v1alpha1.TcProgram"}
{"level":"info","ts":"2024-11-01T20:51:43Z","msg":"Starting EventSource","controller":"kprobeprogram","controllerGroup":"bpfman.io","controllerKind":"KprobeProgram","source":"kind source: *v1alpha1.KprobeProgram"}
{"level":"info","ts":"2024-11-01T20:51:43Z","msg":"Starting EventSource","controller":"tcprogram","controllerGroup":"bpfman.io","controllerKind":"TcProgram","source":"kind source: *v1alpha1.BpfProgram"}
{"level":"info","ts":"2024-11-01T20:51:43Z","msg":"Starting EventSource","controller":"tcprogram","controllerGroup":"bpfman.io","controllerKind":"TcProgram","source":"kind source: *v1.Node"}
{"level":"info","ts":"2024-11-01T20:51:43Z","msg":"Starting Controller","controller":"tcprogram","controllerGroup":"bpfman.io","controllerKind":"TcProgram"}
{"level":"info","ts":"2024-11-01T20:51:43Z","msg":"Starting EventSource","controller":"kprobeprogram","controllerGroup":"bpfman.io","controllerKind":"KprobeProgram","source":"kind source: *v1alpha1.BpfProgram"}
{"level":"info","ts":"2024-11-01T20:51:43Z","msg":"Starting EventSource","controller":"kprobeprogram","controllerGroup":"bpfman.io","controllerKind":"KprobeProgram","source":"kind source: *v1.Node"}
{"level":"info","ts":"2024-11-01T20:51:43Z","msg":"Starting Controller","controller":"kprobeprogram","controllerGroup":"bpfman.io","controllerKind":"KprobeProgram"}
{"level":"info","ts":"2024-11-01T20:51:43Z","msg":"Starting EventSource","controller":"uprobeprogram","controllerGroup":"bpfman.io","controllerKind":"UprobeProgram","source":"kind source: *v1alpha1.UprobeProgram"}
{"level":"info","ts":"2024-11-01T20:51:43Z","msg":"Starting EventSource","controller":"uprobeprogram","controllerGroup":"bpfman.io","controllerKind":"UprobeProgram","source":"kind source: *v1alpha1.BpfProgram"}
{"level":"info","ts":"2024-11-01T20:51:43Z","msg":"Starting EventSource","controller":"uprobeprogram","controllerGroup":"bpfman.io","controllerKind":"UprobeProgram","source":"kind source: *v1.Node"}
{"level":"info","ts":"2024-11-01T20:51:43Z","msg":"Starting EventSource","controller":"uprobeprogram","controllerGroup":"bpfman.io","controllerKind":"UprobeProgram","source":"kind source: *v1.Pod"}
{"level":"info","ts":"2024-11-01T20:51:43Z","msg":"Starting Controller","controller":"uprobeprogram","controllerGroup":"bpfman.io","controllerKind":"UprobeProgram"}
{"level":"info","ts":"2024-11-01T20:51:43Z","msg":"Starting EventSource","controller":"tracepointprogram","controllerGroup":"bpfman.io","controllerKind":"TracepointProgram","source":"kind source: *v1alpha1.TracepointProgram"}
{"level":"info","ts":"2024-11-01T20:51:43Z","msg":"Starting EventSource","controller":"tracepointprogram","controllerGroup":"bpfman.io","controllerKind":"TracepointProgram","source":"kind source: *v1alpha1.BpfProgram"}
{"level":"info","ts":"2024-11-01T20:51:43Z","msg":"Starting EventSource","controller":"tracepointprogram","controllerGroup":"bpfman.io","controllerKind":"TracepointProgram","source":"kind source: *v1.Node"}
{"level":"info","ts":"2024-11-01T20:51:43Z","msg":"Starting Controller","controller":"tracepointprogram","controllerGroup":"bpfman.io","controllerKind":"TracepointProgram"}
{"level":"info","ts":"2024-11-01T20:51:43Z","msg":"Starting EventSource","controller":"fentryprogram","controllerGroup":"bpfman.io","controllerKind":"FentryProgram","source":"kind source: *v1alpha1.FentryProgram"}
{"level":"info","ts":"2024-11-01T20:51:43Z","msg":"Starting EventSource","controller":"fexitprogram","controllerGroup":"bpfman.io","controllerKind":"FexitProgram","source":"kind source: *v1alpha1.FexitProgram"}
{"level":"info","ts":"2024-11-01T20:51:43Z","msg":"Starting EventSource","controller":"fexitprogram","controllerGroup":"bpfman.io","controllerKind":"FexitProgram","source":"kind source: *v1alpha1.BpfProgram"}
{"level":"info","ts":"2024-11-01T20:51:43Z","msg":"Starting EventSource","controller":"bpfapplication","controllerGroup":"bpfman.io","controllerKind":"BpfApplication","source":"kind source: *v1alpha1.BpfApplication"}
{"level":"info","ts":"2024-11-01T20:51:43Z","msg":"Starting EventSource","controller":"bpfapplication","controllerGroup":"bpfman.io","controllerKind":"BpfApplication","source":"kind source: *v1alpha1.BpfProgram"}
{"level":"info","ts":"2024-11-01T20:51:43Z","msg":"Starting EventSource","controller":"bpfapplication","controllerGroup":"bpfman.io","controllerKind":"BpfApplication","source":"kind source: *v1.Node"}
{"level":"info","ts":"2024-11-01T20:51:43Z","msg":"Starting EventSource","controller":"fexitprogram","controllerGroup":"bpfman.io","controllerKind":"FexitProgram","source":"kind source: *v1.Node"}
{"level":"info","ts":"2024-11-01T20:51:43Z","msg":"Starting EventSource","controller":"fentryprogram","controllerGroup":"bpfman.io","controllerKind":"FentryProgram","source":"kind source: *v1alpha1.BpfProgram"}
{"level":"info","ts":"2024-11-01T20:51:43Z","msg":"Starting EventSource","controller":"bpfapplication","controllerGroup":"bpfman.io","controllerKind":"BpfApplication","source":"kind source: *v1.Pod"}
{"level":"info","ts":"2024-11-01T20:51:43Z","msg":"Starting Controller","controller":"fexitprogram","controllerGroup":"bpfman.io","controllerKind":"FexitProgram"}
{"level":"info","ts":"2024-11-01T20:51:43Z","msg":"Starting EventSource","controller":"fentryprogram","controllerGroup":"bpfman.io","controllerKind":"FentryProgram","source":"kind source: *v1.Node"}
{"level":"info","ts":"2024-11-01T20:51:43Z","msg":"Starting Controller","controller":"fentryprogram","controllerGroup":"bpfman.io","controllerKind":"FentryProgram"}
{"level":"info","ts":"2024-11-01T20:51:43Z","msg":"Starting Controller","controller":"bpfapplication","controllerGroup":"bpfman.io","controllerKind":"BpfApplication"}
{"level":"info","ts":"2024-11-01T20:51:43Z","msg":"Starting workers","controller":"uprobeprogram","controllerGroup":"bpfman.io","controllerKind":"UprobeProgram","worker count":1}
{"level":"info","ts":"2024-11-01T20:51:43Z","msg":"Starting workers","controller":"xdpprogram","controllerGroup":"bpfman.io","controllerKind":"XdpProgram","worker count":1}
{"level":"info","ts":"2024-11-01T20:51:43Z","msg":"Starting workers","controller":"tcxprogram","controllerGroup":"bpfman.io","controllerKind":"TcxProgram","worker count":1}
{"level":"info","ts":"2024-11-01T20:51:43Z","msg":"Reconcile Uprobe: Enter","controller":"uprobeprogram","controllerGroup":"bpfman.io","controllerKind":"UprobeProgram","UprobeProgram":{"name":"coredns-5d78c9869d-p9kdl","namespace":"kube-system"},"namespace":"kube-system","name":"coredns-5d78c9869d-p9kdl","reconcileID":"887a920f-52cc-4b2f-a488-08f16d29dec2","ReconcileKey":{"name":"coredns-5d78c9869d-p9kdl","namespace":"kube-system"}}
{"level":"info","ts":"2024-11-01T20:51:43Z","msg":"Reconcile TCX: Enter","controller":"tcxprogram","controllerGroup":"bpfman.io","controllerKind":"TcxProgram","TcxProgram":{"name":"bpfman-deployment-control-plane"},"namespace":"","name":"bpfman-deployment-control-plane","reconcileID":"683c3c21-1e6d-45d5-af94-578eee1442f3","ReconcileKey":{"name":"bpfman-deployment-control-plane"}}
{"level":"info","ts":"2024-11-01T20:51:43Z","msg":"Starting workers","controller":"tracepointprogram","controllerGroup":"bpfman.io","controllerKind":"TracepointProgram","worker count":1}
{"level":"info","ts":"2024-11-01T20:51:43Z","msg":"Reconcile Tracepoint: Enter","controller":"tracepointprogram","controllerGroup":"bpfman.io","controllerKind":"TracepointProgram","TracepointProgram":{"name":"bpfman-deployment-control-plane"},"namespace":"","name":"bpfman-deployment-control-plane","reconcileID":"79bb3c58-5c45-4654-ba5e-ea9a9a1f230d","ReconcileKey":{"name":"bpfman-deployment-control-plane"}}
{"level":"info","ts":"2024-11-01T20:51:43Z","msg":"Reconcile XDP: Enter","controller":"xdpprogram","controllerGroup":"bpfman.io","controllerKind":"XdpProgram","XdpProgram":{"name":"bpfman-deployment-control-plane"},"namespace":"","name":"bpfman-deployment-control-plane","reconcileID":"cf907c76-4afc-4c51-b92a-677d9b0553f0","ReconcileKey":{"name":"bpfman-deployment-control-plane"}}
{"level":"info","ts":"2024-11-01T20:51:43Z","logger":"uprobe","msg":"UprobeProgramController found no Uprobe Programs"}
{"level":"info","ts":"2024-11-01T20:51:43Z","msg":"Starting workers","controller":"fentryprogram","controllerGroup":"bpfman.io","controllerKind":"FentryProgram","worker count":1}
{"level":"info","ts":"2024-11-01T20:51:43Z","logger":"tracept","msg":"TracepointProgramController found no Tracepoint Programs"}
{"level":"info","ts":"2024-11-01T20:51:43Z","msg":"Starting workers","controller":"kprobeprogram","controllerGroup":"bpfman.io","controllerKind":"KprobeProgram","worker count":1}
{"level":"info","ts":"2024-11-01T20:51:43Z","logger":"xdp","msg":"XdpProgramController found no XDP Programs"}
{"level":"info","ts":"2024-11-01T20:51:43Z","msg":"Reconcile Uprobe: Enter","controller":"uprobeprogram","controllerGroup":"bpfman.io","controllerKind":"UprobeProgram","UprobeProgram":{"name":"coredns-5d78c9869d-sshdf","namespace":"kube-system"},"namespace":"kube-system","name":"coredns-5d78c9869d-sshdf","reconcileID":"43d6743c-c379-4fd8-9875-a4a8670eb9ac","ReconcileKey":{"name":"coredns-5d78c9869d-sshdf","namespace":"kube-system"}}
{"level":"info","ts":"2024-11-01T20:51:43Z","msg":"Starting workers","controller":"tcprogram","controllerGroup":"bpfman.io","controllerKind":"TcProgram","worker count":1}
{"level":"info","ts":"2024-11-01T20:51:43Z","msg":"Reconcile Fentry: Enter","controller":"fentryprogram","controllerGroup":"bpfman.io","controllerKind":"FentryProgram","FentryProgram":{"name":"bpfman-deployment-control-plane"},"namespace":"","name":"bpfman-deployment-control-plane","reconcileID":"72ad2e45-ad6a-4ffa-b66d-19e1a027a02b","ReconcileKey":{"name":"bpfman-deployment-control-plane"}}
{"level":"info","ts":"2024-11-01T20:51:43Z","logger":"uprobe","msg":"UprobeProgramController found no Uprobe Programs"}
{"level":"info","ts":"2024-11-01T20:51:43Z","msg":"Reconcile Kprobe: Enter","controller":"kprobeprogram","controllerGroup":"bpfman.io","controllerKind":"KprobeProgram","KprobeProgram":{"name":"bpfman-deployment-control-plane"},"namespace":"","name":"bpfman-deployment-control-plane","reconcileID":"91885d65-55c9-4385-a130-61623c537b26","ReconcileKey":{"name":"bpfman-deployment-control-plane"}}
{"level":"info","ts":"2024-11-01T20:51:43Z","logger":"fentry","msg":"FentryProgramController found no Fentry Programs"}
{"level":"info","ts":"2024-11-01T20:51:43Z","logger":"tcx","msg":"TcxProgramController found no TCX Programs"}
{"level":"info","ts":"2024-11-01T20:51:43Z","logger":"kprobe","msg":"KprobeProgramController found no Kprobe Programs"}
{"level":"info","ts":"2024-11-01T20:51:43Z","msg":"Reconcile TC: Enter","controller":"tcprogram","controllerGroup":"bpfman.io","controllerKind":"TcProgram","TcProgram":{"name":"bpfman-deployment-control-plane"},"namespace":"","name":"bpfman-deployment-control-plane","reconcileID":"0e7eeedf-6ec7-4905-bf1a-658456d966e9","ReconcileKey":{"name":"bpfman-deployment-control-plane"}}
{"level":"info","ts":"2024-11-01T20:51:43Z","msg":"Starting workers","controller":"bpfapplication","controllerGroup":"bpfman.io","controllerKind":"BpfApplication","worker count":1}
{"level":"info","ts":"2024-11-01T20:51:43Z","msg":"Reconcile Uprobe: Enter","controller":"uprobeprogram","controllerGroup":"bpfman.io","controllerKind":"UprobeProgram","UprobeProgram":{"name":"kube-apiserver-bpfman-deployment-control-plane","namespace":"kube-system"},"namespace":"kube-system","name":"kube-apiserver-bpfman-deployment-control-plane","reconcileID":"6a0d982c-e4be-4892-a3da-4bb0a5b8738d","ReconcileKey":{"name":"kube-apiserver-bpfman-deployment-control-plane","namespace":"kube-system"}}
{"level":"info","ts":"2024-11-01T20:51:43Z","msg":"Starting workers","controller":"fexitprogram","controllerGroup":"bpfman.io","controllerKind":"FexitProgram","worker count":1}
{"level":"info","ts":"2024-11-01T20:51:43Z","logger":"tc","msg":"TcProgramController found no TC Programs"}
{"level":"info","ts":"2024-11-01T20:51:43Z","logger":"uprobe","msg":"UprobeProgramController found no Uprobe Programs"}
{"level":"info","ts":"2024-11-01T20:51:43Z","msg":"Reconcile Application: Enter","controller":"bpfapplication","controllerGroup":"bpfman.io","controllerKind":"BpfApplication","BpfApplication":{"name":"bpfman-deployment-control-plane"},"namespace":"","name":"bpfman-deployment-control-plane","reconcileID":"b8b588b2-245a-429b-847e-3ccf4d5fac3e","ReconcileKey":{"name":"bpfman-deployment-control-plane"}}
{"level":"info","ts":"2024-11-01T20:51:43Z","msg":"Reconcile Fexit: Enter","controller":"fexitprogram","controllerGroup":"bpfman.io","controllerKind":"FexitProgram","FexitProgram":{"name":"bpfman-deployment-control-plane"},"namespace":"","name":"bpfman-deployment-control-plane","reconcileID":"5fdf7118-2e1a-4c3d-b168-3b2ae5571270","ReconcileKey":{"name":"bpfman-deployment-control-plane"}}
{"level":"info","ts":"2024-11-01T20:51:43Z","msg":"Reconcile Uprobe: Enter","controller":"uprobeprogram","controllerGroup":"bpfman.io","controllerKind":"UprobeProgram","UprobeProgram":{"name":"kube-controller-manager-bpfman-deployment-control-plane","namespace":"kube-system"},"namespace":"kube-system","name":"kube-controller-manager-bpfman-deployment-control-plane","reconcileID":"22b5a1d8-5406-4635-a4a7-d96f0cb2755c","ReconcileKey":{"name":"kube-controller-manager-bpfman-deployment-control-plane","namespace":"kube-system"}}
{"level":"info","ts":"2024-11-01T20:51:43Z","logger":"application","msg":"BpfApplicationController found no application Programs"}
{"level":"info","ts":"2024-11-01T20:51:43Z","logger":"uprobe","msg":"UprobeProgramController found no Uprobe Programs"}
{"level":"info","ts":"2024-11-01T20:51:43Z","msg":"Reconcile Application: Enter","controller":"bpfapplication","controllerGroup":"bpfman.io","controllerKind":"BpfApplication","BpfApplication":{"name":"coredns-5d78c9869d-p9kdl","namespace":"kube-system"},"namespace":"kube-system","name":"coredns-5d78c9869d-p9kdl","reconcileID":"a66c8915-21ee-4fe1-9a8b-ff261a605d2a","ReconcileKey":{"name":"coredns-5d78c9869d-p9kdl","namespace":"kube-system"}}
{"level":"info","ts":"2024-11-01T20:51:43Z","logger":"application","msg":"BpfApplicationController found no application Programs"}
{"level":"info","ts":"2024-11-01T20:51:43Z","msg":"Reconcile Uprobe: Enter","controller":"uprobeprogram","controllerGroup":"bpfman.io","controllerKind":"UprobeProgram","UprobeProgram":{"name":"bpfman-operator-7f67bc7c57-nm5c5","namespace":"bpfman"},"namespace":"bpfman","name":"bpfman-operator-7f67bc7c57-nm5c5","reconcileID":"9c41cbfa-0778-4913-b3e2-5e1ce71ba60e","ReconcileKey":{"name":"bpfman-operator-7f67bc7c57-nm5c5","namespace":"bpfman"}}
{"level":"info","ts":"2024-11-01T20:51:43Z","logger":"fexit","msg":"FexitProgramController found no Fexit Programs"}
{"level":"info","ts":"2024-11-01T20:51:43Z","msg":"Reconcile Application: Enter","controller":"bpfapplication","controllerGroup":"bpfman.io","controllerKind":"BpfApplication","BpfApplication":{"name":"coredns-5d78c9869d-sshdf","namespace":"kube-system"},"namespace":"kube-system","name":"coredns-5d78c9869d-sshdf","reconcileID":"6763886d-a484-4d64-8abc-d07671d90804","ReconcileKey":{"name":"coredns-5d78c9869d-sshdf","namespace":"kube-system"}}
{"level":"info","ts":"2024-11-01T20:51:43Z","logger":"uprobe","msg":"UprobeProgramController found no Uprobe Programs"}
{"level":"info","ts":"2024-11-01T20:51:43Z","logger":"application","msg":"BpfApplicationController found no application Programs"}
{"level":"info","ts":"2024-11-01T20:51:43Z","msg":"Reconcile Uprobe: Enter","controller":"uprobeprogram","controllerGroup":"bpfman.io","controllerKind":"UprobeProgram","UprobeProgram":{"name":"etcd-bpfman-deployment-control-plane","namespace":"kube-system"},"namespace":"kube-system","name":"etcd-bpfman-deployment-control-plane","reconcileID":"d2c678a4-3158-48a3-aed0-86bf832d4388","ReconcileKey":{"name":"etcd-bpfman-deployment-control-plane","namespace":"kube-system"}}
{"level":"info","ts":"2024-11-01T20:51:43Z","logger":"uprobe","msg":"UprobeProgramController found no Uprobe Programs"}
{"level":"info","ts":"2024-11-01T20:51:43Z","msg":"Reconcile Application: Enter","controller":"bpfapplication","controllerGroup":"bpfman.io","controllerKind":"BpfApplication","BpfApplication":{"name":"kube-apiserver-bpfman-deployment-control-plane","namespace":"kube-system"},"namespace":"kube-system","name":"kube-apiserver-bpfman-deployment-control-plane","reconcileID":"fe7b0f50-ec68-4f88-95ce-68d63947e04e","ReconcileKey":{"name":"kube-apiserver-bpfman-deployment-control-plane","namespace":"kube-system"}}
{"level":"info","ts":"2024-11-01T20:51:43Z","logger":"application","msg":"BpfApplicationController found no application Programs"}
{"level":"info","ts":"2024-11-01T20:51:43Z","msg":"Reconcile Application: Enter","controller":"bpfapplication","controllerGroup":"bpfman.io","controllerKind":"BpfApplication","BpfApplication":{"name":"kube-controller-manager-bpfman-deployment-control-plane","namespace":"kube-system"},"namespace":"kube-system","name":"kube-controller-manager-bpfman-deployment-control-plane","reconcileID":"88789cb1-52cc-4b8f-ad1c-d6a633ec9a66","ReconcileKey":{"name":"kube-controller-manager-bpfman-deployment-control-plane","namespace":"kube-system"}}
{"level":"info","ts":"2024-11-01T20:51:43Z","msg":"Reconcile Uprobe: Enter","controller":"uprobeprogram","controllerGroup":"bpfman.io","controllerKind":"UprobeProgram","UprobeProgram":{"name":"kindnet-ms6dg","namespace":"kube-system"},"namespace":"kube-system","name":"kindnet-ms6dg","reconcileID":"ce077896-a321-4011-b90e-415a6f5ee53b","ReconcileKey":{"name":"kindnet-ms6dg","namespace":"kube-system"}}
{"level":"info","ts":"2024-11-01T20:51:43Z","logger":"application","msg":"BpfApplicationController found no application Programs"}
{"level":"info","ts":"2024-11-01T20:51:43Z","logger":"uprobe","msg":"UprobeProgramController found no Uprobe Programs"}
{"level":"info","ts":"2024-11-01T20:51:43Z","msg":"Reconcile Application: Enter","controller":"bpfapplication","controllerGroup":"bpfman.io","controllerKind":"BpfApplication","BpfApplication":{"name":"kube-proxy-pc5l9","namespace":"kube-system"},"namespace":"kube-system","name":"kube-proxy-pc5l9","reconcileID":"1b28db5a-2d79-4176-af71-ca10f5735964","ReconcileKey":{"name":"kube-proxy-pc5l9","namespace":"kube-system"}}
{"level":"info","ts":"2024-11-01T20:51:43Z","logger":"application","msg":"BpfApplicationController found no application Programs"}
{"level":"info","ts":"2024-11-01T20:51:43Z","msg":"Reconcile Uprobe: Enter","controller":"uprobeprogram","controllerGroup":"bpfman.io","controllerKind":"UprobeProgram","UprobeProgram":{"name":"kube-proxy-pc5l9","namespace":"kube-system"},"namespace":"kube-system","name":"kube-proxy-pc5l9","reconcileID":"f8adf3fd-efc9-4042-950d-82477083237b","ReconcileKey":{"name":"kube-proxy-pc5l9","namespace":"kube-system"}}
{"level":"info","ts":"2024-11-01T20:51:43Z","logger":"uprobe","msg":"UprobeProgramController found no Uprobe Programs"}
{"level":"info","ts":"2024-11-01T20:51:43Z","msg":"Reconcile Application: Enter","controller":"bpfapplication","controllerGroup":"bpfman.io","controllerKind":"BpfApplication","BpfApplication":{"name":"kube-scheduler-bpfman-deployment-control-plane","namespace":"kube-system"},"namespace":"kube-system","name":"kube-scheduler-bpfman-deployment-control-plane","reconcileID":"dba9cb64-c230-497b-9383-b025b8292950","ReconcileKey":{"name":"kube-scheduler-bpfman-deployment-control-plane","namespace":"kube-system"}}
{"level":"info","ts":"2024-11-01T20:51:43Z","logger":"application","msg":"BpfApplicationController found no application Programs"}
{"level":"info","ts":"2024-11-01T20:51:43Z","msg":"Reconcile Uprobe: Enter","controller":"uprobeprogram","controllerGroup":"bpfman.io","controllerKind":"UprobeProgram","UprobeProgram":{"name":"kube-scheduler-bpfman-deployment-control-plane","namespace":"kube-system"},"namespace":"kube-system","name":"kube-scheduler-bpfman-deployment-control-plane","reconcileID":"eece34b4-5e53-476c-bbbf-9bf3f7111ada","ReconcileKey":{"name":"kube-scheduler-bpfman-deployment-control-plane","namespace":"kube-system"}}
{"level":"info","ts":"2024-11-01T20:51:43Z","msg":"Reconcile Application: Enter","controller":"bpfapplication","controllerGroup":"bpfman.io","controllerKind":"BpfApplication","BpfApplication":{"name":"local-path-provisioner-6bc4bddd6b-g6bfg","namespace":"local-path-storage"},"namespace":"local-path-storage","name":"local-path-provisioner-6bc4bddd6b-g6bfg","reconcileID":"bd23139f-b561-4ad0-9c6d-2bcab5518407","ReconcileKey":{"name":"local-path-provisioner-6bc4bddd6b-g6bfg","namespace":"local-path-storage"}}
{"level":"info","ts":"2024-11-01T20:51:43Z","logger":"uprobe","msg":"UprobeProgramController found no Uprobe Programs"}
{"level":"info","ts":"2024-11-01T20:51:43Z","logger":"application","msg":"BpfApplicationController found no application Programs"}
{"level":"info","ts":"2024-11-01T20:51:43Z","msg":"Reconcile Uprobe: Enter","controller":"uprobeprogram","controllerGroup":"bpfman.io","controllerKind":"UprobeProgram","UprobeProgram":{"name":"local-path-provisioner-6bc4bddd6b-g6bfg","namespace":"local-path-storage"},"namespace":"local-path-storage","name":"local-path-provisioner-6bc4bddd6b-g6bfg","reconcileID":"d845755f-6373-4ad1-8791-a72036f89ccd","ReconcileKey":{"name":"local-path-provisioner-6bc4bddd6b-g6bfg","namespace":"local-path-storage"}}
{"level":"info","ts":"2024-11-01T20:51:43Z","msg":"Reconcile Application: Enter","controller":"bpfapplication","controllerGroup":"bpfman.io","controllerKind":"BpfApplication","BpfApplication":{"name":"bpfman-operator-7f67bc7c57-nm5c5","namespace":"bpfman"},"namespace":"bpfman","name":"bpfman-operator-7f67bc7c57-nm5c5","reconcileID":"6525a762-7d75-4024-96db-9c7caaebb114","ReconcileKey":{"name":"bpfman-operator-7f67bc7c57-nm5c5","namespace":"bpfman"}}
{"level":"info","ts":"2024-11-01T20:51:43Z","logger":"uprobe","msg":"UprobeProgramController found no Uprobe Programs"}
{"level":"info","ts":"2024-11-01T20:51:43Z","logger":"application","msg":"BpfApplicationController found no application Programs"}
{"level":"info","ts":"2024-11-01T20:51:43Z","msg":"Reconcile Uprobe: Enter","controller":"uprobeprogram","controllerGroup":"bpfman.io","controllerKind":"UprobeProgram","UprobeProgram":{"name":"bpfman-deployment-control-plane"},"namespace":"","name":"bpfman-deployment-control-plane","reconcileID":"5b8d955e-355f-46fa-80be-e24f502d0f01","ReconcileKey":{"name":"bpfman-deployment-control-plane"}}
{"level":"info","ts":"2024-11-01T20:51:43Z","msg":"Reconcile Application: Enter","controller":"bpfapplication","controllerGroup":"bpfman.io","controllerKind":"BpfApplication","BpfApplication":{"name":"etcd-bpfman-deployment-control-plane","namespace":"kube-system"},"namespace":"kube-system","name":"etcd-bpfman-deployment-control-plane","reconcileID":"a06659b4-2fe3-4151-9db0-daf42a642cf9","ReconcileKey":{"name":"etcd-bpfman-deployment-control-plane","namespace":"kube-system"}}
{"level":"info","ts":"2024-11-01T20:51:43Z","logger":"uprobe","msg":"UprobeProgramController found no Uprobe Programs"}
{"level":"info","ts":"2024-11-01T20:51:43Z","logger":"application","msg":"BpfApplicationController found no application Programs"}
{"level":"info","ts":"2024-11-01T20:51:43Z","msg":"Reconcile Application: Enter","controller":"bpfapplication","controllerGroup":"bpfman.io","controllerKind":"BpfApplication","BpfApplication":{"name":"kindnet-ms6dg","namespace":"kube-system"},"namespace":"kube-system","name":"kindnet-ms6dg","reconcileID":"94aa6fed-acc6-469f-a6ae-9833c30946ae","ReconcileKey":{"name":"kindnet-ms6dg","namespace":"kube-system"}}
{"level":"info","ts":"2024-11-01T20:51:43Z","logger":"application","msg":"BpfApplicationController found no application Programs"}
{"level":"info","ts":"2024-11-01T20:51:46Z","msg":"Reconcile Application: Enter","controller":"bpfapplication","controllerGroup":"bpfman.io","controllerKind":"BpfApplication","BpfApplication":{"name":"bpfman-daemon-254wh","namespace":"bpfman"},"namespace":"bpfman","name":"bpfman-daemon-254wh","reconcileID":"728ec68d-1738-4996-84e0-3ec1351a0e67","ReconcileKey":{"name":"bpfman-daemon-254wh","namespace":"bpfman"}}
{"level":"info","ts":"2024-11-01T20:51:46Z","msg":"Reconcile Uprobe: Enter","controller":"uprobeprogram","controllerGroup":"bpfman.io","controllerKind":"UprobeProgram","UprobeProgram":{"name":"bpfman-daemon-254wh","namespace":"bpfman"},"namespace":"bpfman","name":"bpfman-daemon-254wh","reconcileID":"4bf35259-67d2-4010-9542-0e14c539d1f1","ReconcileKey":{"name":"bpfman-daemon-254wh","namespace":"bpfman"}}
{"level":"info","ts":"2024-11-01T20:51:46Z","logger":"application","msg":"BpfApplicationController found no application Programs"}
{"level":"info","ts":"2024-11-01T20:51:46Z","logger":"uprobe","msg":"UprobeProgramController found no Uprobe Programs"}
{"level":"info","ts":"2024-11-01T20:57:55Z","msg":"Reconcile XDP: Enter","controller":"xdpprogram","controllerGroup":"bpfman.io","controllerKind":"XdpProgram","XdpProgram":{"name":"go-xdp-counter-example"},"namespace":"","name":"go-xdp-counter-example","reconcileID":"4fb1b834-06a8-4ac4-8f26-c9d3bea316b1","ReconcileKey":{"name":"go-xdp-counter-example"}}
{"level":"info","ts":"2024-11-01T20:57:55Z","logger":"xdp","msg":"Creating bpfProgram","Name":"go-xdp-counter-example-94628b8e","Owner":"go-xdp-counter-example"}
{"level":"info","ts":"2024-11-01T20:57:55Z","msg":"Reconcile XDP: Enter","controller":"xdpprogram","controllerGroup":"bpfman.io","controllerKind":"XdpProgram","XdpProgram":{"name":"go-xdp-counter-example"},"namespace":"","name":"go-xdp-counter-example","reconcileID":"83eb351e-6edd-463b-88b9-4a757ef4fd11","ReconcileKey":{"name":"go-xdp-counter-example"}}
{"level":"info","ts":"2024-11-01T20:57:55Z","logger":"xdp","msg":"Calling bpfman to load program on node","bpfProgram name":"go-xdp-counter-example-94628b8e"}
{"level":"info","ts":"2024-11-01T20:58:02Z","msg":"Reconcile Kprobe: Enter","controller":"kprobeprogram","controllerGroup":"bpfman.io","controllerKind":"KprobeProgram","KprobeProgram":{"name":"go-kprobe-counter-example"},"namespace":"","name":"go-kprobe-counter-example","reconcileID":"74955ee8-5d0a-4ccd-9ff5-329f3e029417","ReconcileKey":{"name":"go-kprobe-counter-example"}}
{"level":"info","ts":"2024-11-01T20:58:02Z","logger":"xdp","msg":"Updating bpfProgram Object","Id":9503,"bpfProgram":"go-xdp-counter-example-94628b8e"}
{"level":"info","ts":"2024-11-01T20:58:02Z","msg":"Reconcile XDP: Enter","controller":"xdpprogram","controllerGroup":"bpfman.io","controllerKind":"XdpProgram","XdpProgram":{"name":"go-xdp-counter-example"},"namespace":"","name":"go-xdp-counter-example","reconcileID":"f3751352-9cf6-4df9-88d5-22d2c9c17fe9","ReconcileKey":{"name":"go-xdp-counter-example"}}
{"level":"info","ts":"2024-11-01T20:58:02Z","msg":"Reconcile XDP: Enter","controller":"xdpprogram","controllerGroup":"bpfman.io","controllerKind":"XdpProgram","XdpProgram":{"name":"go-xdp-counter-example"},"namespace":"","name":"go-xdp-counter-example","reconcileID":"51a70fc1-6c9e-4083-bbb1-3d422e2fd855","ReconcileKey":{"name":"go-xdp-counter-example"}}
{"level":"info","ts":"2024-11-01T20:58:02Z","logger":"xdp","msg":"Finished reconciling","program name":"go-xdp-counter-example"}
{"level":"info","ts":"2024-11-01T20:58:11Z","msg":"Reconcile Application: Enter","controller":"bpfapplication","controllerGroup":"bpfman.io","controllerKind":"BpfApplication","BpfApplication":{"name":"go-xdp-counter-ds-n87h5","namespace":"go-xdp-counter"},"namespace":"go-xdp-counter","name":"go-xdp-counter-ds-n87h5","reconcileID":"5937ab73-aafb-4db0-81ed-191db999ba2c","ReconcileKey":{"name":"go-xdp-counter-ds-n87h5","namespace":"go-xdp-counter"}}
{"level":"info","ts":"2024-11-01T20:58:11Z","msg":"Reconcile Uprobe: Enter","controller":"uprobeprogram","controllerGroup":"bpfman.io","controllerKind":"UprobeProgram","UprobeProgram":{"name":"go-xdp-counter-ds-n87h5","namespace":"go-xdp-counter"},"namespace":"go-xdp-counter","name":"go-xdp-counter-ds-n87h5","reconcileID":"975795a1-c559-41ab-810e-3d2d9a69186c","ReconcileKey":{"name":"go-xdp-counter-ds-n87h5","namespace":"go-xdp-counter"}}
{"level":"info","ts":"2024-11-01T20:58:11Z","logger":"uprobe","msg":"UprobeProgramController found no Uprobe Programs"}
{"level":"info","ts":"2024-11-01T20:58:11Z","logger":"application","msg":"BpfApplicationController found no application Programs"}
{"level":"info","ts":"2024-11-01T20:58:12Z","logger":"kprobe","msg":"Creating bpfProgram","Name":"go-kprobe-counter-example-e8c675f7","Owner":"go-kprobe-counter-example"}
{"level":"info","ts":"2024-11-01T20:58:12Z","msg":"Reconcile Kprobe: Enter","controller":"kprobeprogram","controllerGroup":"bpfman.io","controllerKind":"KprobeProgram","KprobeProgram":{"name":"go-kprobe-counter-example"},"namespace":"","name":"go-kprobe-counter-example","reconcileID":"d26b8da6-349b-4655-9994-d3bde5385628","ReconcileKey":{"name":"go-kprobe-counter-example"}}
{"level":"info","ts":"2024-11-01T20:58:12Z","logger":"kprobe","msg":"Calling bpfman to load program on node","bpfProgram name":"go-kprobe-counter-example-e8c675f7"}
{"level":"info","ts":"2024-11-01T20:58:20Z","logger":"kprobe","msg":"Updating bpfProgram Object","Id":9512,"bpfProgram":"go-kprobe-counter-example-e8c675f7"}
{"level":"info","ts":"2024-11-01T20:58:20Z","msg":"Reconcile Kprobe: Enter","controller":"kprobeprogram","controllerGroup":"bpfman.io","controllerKind":"KprobeProgram","KprobeProgram":{"name":"go-kprobe-counter-example"},"namespace":"","name":"go-kprobe-counter-example","reconcileID":"d27efa2f-53e5-4dd9-a943-833449cc581d","ReconcileKey":{"name":"go-kprobe-counter-example"}}
{"level":"info","ts":"2024-11-01T20:58:20Z","msg":"Reconcile Kprobe: Enter","controller":"kprobeprogram","controllerGroup":"bpfman.io","controllerKind":"KprobeProgram","KprobeProgram":{"name":"go-kprobe-counter-example"},"namespace":"","name":"go-kprobe-counter-example","reconcileID":"623d52cb-4f21-4dd4-abe3-3e334c08ac35","ReconcileKey":{"name":"go-kprobe-counter-example"}}
{"level":"info","ts":"2024-11-01T20:58:20Z","logger":"kprobe","msg":"Finished reconciling","program name":"go-kprobe-counter-example"}
{"level":"info","ts":"2024-11-01T20:58:24Z","msg":"Reconcile Uprobe: Enter","controller":"uprobeprogram","controllerGroup":"bpfman.io","controllerKind":"UprobeProgram","UprobeProgram":{"name":"go-kprobe-counter-ds-ldls9","namespace":"go-kprobe-counter"},"namespace":"go-kprobe-counter","name":"go-kprobe-counter-ds-ldls9","reconcileID":"f69ff3df-cbeb-4c2d-a1e2-aa0a02b8ca35","ReconcileKey":{"name":"go-kprobe-counter-ds-ldls9","namespace":"go-kprobe-counter"}}
{"level":"info","ts":"2024-11-01T20:58:24Z","logger":"uprobe","msg":"UprobeProgramController found no Uprobe Programs"}
{"level":"info","ts":"2024-11-01T20:58:24Z","msg":"Reconcile Application: Enter","controller":"bpfapplication","controllerGroup":"bpfman.io","controllerKind":"BpfApplication","BpfApplication":{"name":"go-kprobe-counter-ds-ldls9","namespace":"go-kprobe-counter"},"namespace":"go-kprobe-counter","name":"go-kprobe-counter-ds-ldls9","reconcileID":"523e4191-e25f-4201-862a-de3fc989a6f9","ReconcileKey":{"name":"go-kprobe-counter-ds-ldls9","namespace":"go-kprobe-counter"}}
{"level":"info","ts":"2024-11-01T20:58:24Z","logger":"application","msg":"BpfApplicationController found no application Programs"}

After Change

$ kubectl logs -n bpfman bpfman-daemon-rzj7p -c bpfman-agent -f
{"level":"info","ts":"2024-11-01T20:03:50Z","logger":"setup","msg":"Waiting for active connection to bpfman"}
{"level":"info","ts":"2024-11-01T20:03:50Z","logger":"setup","msg":"starting Bpfman-Agent"}
{"level":"info","ts":"2024-11-01T20:03:50Z","logger":"controller-runtime.metrics","msg":"Starting metrics server"}
{"level":"info","ts":"2024-11-01T20:03:50Z","msg":"starting server","name":"pprof","addr":"[::]:6060"}
{"level":"info","ts":"2024-11-01T20:03:50Z","msg":"starting server","name":"health probe","addr":"[::]:8175"}
{"level":"info","ts":"2024-11-01T20:03:50Z","logger":"controller-runtime.metrics","msg":"Serving metrics server","bindAddress":"127.0.0.1:8174","secure":false}
{"level":"info","ts":"2024-11-01T20:03:50Z","msg":"Starting EventSource","controller":"xdpprogram","controllerGroup":"bpfman.io","controllerKind":"XdpProgram","source":"kind source: *v1alpha1.XdpProgram"}
{"level":"info","ts":"2024-11-01T20:03:50Z","msg":"Starting EventSource","controller":"xdpprogram","controllerGroup":"bpfman.io","controllerKind":"XdpProgram","source":"kind source: *v1alpha1.BpfProgram"}
{"level":"info","ts":"2024-11-01T20:03:50Z","msg":"Starting EventSource","controller":"xdpprogram","controllerGroup":"bpfman.io","controllerKind":"XdpProgram","source":"kind source: *v1.Node"}
{"level":"info","ts":"2024-11-01T20:03:50Z","msg":"Starting Controller","controller":"xdpprogram","controllerGroup":"bpfman.io","controllerKind":"XdpProgram"}
{"level":"info","ts":"2024-11-01T20:03:50Z","msg":"Starting EventSource","controller":"tracepointprogram","controllerGroup":"bpfman.io","controllerKind":"TracepointProgram","source":"kind source: *v1alpha1.TracepointProgram"}
{"level":"info","ts":"2024-11-01T20:03:50Z","msg":"Starting EventSource","controller":"kprobeprogram","controllerGroup":"bpfman.io","controllerKind":"KprobeProgram","source":"kind source: *v1alpha1.KprobeProgram"}
{"level":"info","ts":"2024-11-01T20:03:50Z","msg":"Starting EventSource","controller":"tracepointprogram","controllerGroup":"bpfman.io","controllerKind":"TracepointProgram","source":"kind source: *v1alpha1.BpfProgram"}
{"level":"info","ts":"2024-11-01T20:03:50Z","msg":"Starting EventSource","controller":"kprobeprogram","controllerGroup":"bpfman.io","controllerKind":"KprobeProgram","source":"kind source: *v1alpha1.BpfProgram"}
{"level":"info","ts":"2024-11-01T20:03:50Z","msg":"Starting EventSource","controller":"tracepointprogram","controllerGroup":"bpfman.io","controllerKind":"TracepointProgram","source":"kind source: *v1.Node"}
{"level":"info","ts":"2024-11-01T20:03:50Z","msg":"Starting Controller","controller":"tracepointprogram","controllerGroup":"bpfman.io","controllerKind":"TracepointProgram"}
{"level":"info","ts":"2024-11-01T20:03:50Z","msg":"Starting EventSource","controller":"kprobeprogram","controllerGroup":"bpfman.io","controllerKind":"KprobeProgram","source":"kind source: *v1.Node"}
{"level":"info","ts":"2024-11-01T20:03:50Z","msg":"Starting Controller","controller":"kprobeprogram","controllerGroup":"bpfman.io","controllerKind":"KprobeProgram"}
{"level":"info","ts":"2024-11-01T20:03:50Z","msg":"Starting EventSource","controller":"tcxprogram","controllerGroup":"bpfman.io","controllerKind":"TcxProgram","source":"kind source: *v1alpha1.TcxProgram"}
{"level":"info","ts":"2024-11-01T20:03:50Z","msg":"Starting EventSource","controller":"tcxprogram","controllerGroup":"bpfman.io","controllerKind":"TcxProgram","source":"kind source: *v1alpha1.BpfProgram"}
{"level":"info","ts":"2024-11-01T20:03:50Z","msg":"Starting EventSource","controller":"tcxprogram","controllerGroup":"bpfman.io","controllerKind":"TcxProgram","source":"kind source: *v1.Node"}
{"level":"info","ts":"2024-11-01T20:03:50Z","msg":"Starting Controller","controller":"tcxprogram","controllerGroup":"bpfman.io","controllerKind":"TcxProgram"}
{"level":"info","ts":"2024-11-01T20:03:50Z","msg":"Starting EventSource","controller":"uprobeprogram","controllerGroup":"bpfman.io","controllerKind":"UprobeProgram","source":"kind source: *v1alpha1.UprobeProgram"}
{"level":"info","ts":"2024-11-01T20:03:50Z","msg":"Starting EventSource","controller":"uprobeprogram","controllerGroup":"bpfman.io","controllerKind":"UprobeProgram","source":"kind source: *v1alpha1.BpfProgram"}
{"level":"info","ts":"2024-11-01T20:03:50Z","msg":"Starting EventSource","controller":"uprobeprogram","controllerGroup":"bpfman.io","controllerKind":"UprobeProgram","source":"kind source: *v1.Node"}
{"level":"info","ts":"2024-11-01T20:03:50Z","msg":"Starting EventSource","controller":"uprobeprogram","controllerGroup":"bpfman.io","controllerKind":"UprobeProgram","source":"kind source: *v1.Pod"}
{"level":"info","ts":"2024-11-01T20:03:50Z","msg":"Starting Controller","controller":"uprobeprogram","controllerGroup":"bpfman.io","controllerKind":"UprobeProgram"}
{"level":"info","ts":"2024-11-01T20:03:50Z","msg":"Starting EventSource","controller":"bpfapplication","controllerGroup":"bpfman.io","controllerKind":"BpfApplication","source":"kind source: *v1alpha1.BpfApplication"}
{"level":"info","ts":"2024-11-01T20:03:50Z","msg":"Starting EventSource","controller":"bpfapplication","controllerGroup":"bpfman.io","controllerKind":"BpfApplication","source":"kind source: *v1alpha1.BpfProgram"}
{"level":"info","ts":"2024-11-01T20:03:50Z","msg":"Starting EventSource","controller":"tcprogram","controllerGroup":"bpfman.io","controllerKind":"TcProgram","source":"kind source: *v1alpha1.TcProgram"}
{"level":"info","ts":"2024-11-01T20:03:50Z","msg":"Starting EventSource","controller":"bpfapplication","controllerGroup":"bpfman.io","controllerKind":"BpfApplication","source":"kind source: *v1.Node"}
{"level":"info","ts":"2024-11-01T20:03:50Z","msg":"Starting EventSource","controller":"tcprogram","controllerGroup":"bpfman.io","controllerKind":"TcProgram","source":"kind source: *v1alpha1.BpfProgram"}
{"level":"info","ts":"2024-11-01T20:03:50Z","msg":"Starting EventSource","controller":"tcprogram","controllerGroup":"bpfman.io","controllerKind":"TcProgram","source":"kind source: *v1.Node"}
{"level":"info","ts":"2024-11-01T20:03:50Z","msg":"Starting EventSource","controller":"bpfapplication","controllerGroup":"bpfman.io","controllerKind":"BpfApplication","source":"kind source: *v1.Pod"}
{"level":"info","ts":"2024-11-01T20:03:50Z","msg":"Starting Controller","controller":"tcprogram","controllerGroup":"bpfman.io","controllerKind":"TcProgram"}
{"level":"info","ts":"2024-11-01T20:03:50Z","msg":"Starting Controller","controller":"bpfapplication","controllerGroup":"bpfman.io","controllerKind":"BpfApplication"}
{"level":"info","ts":"2024-11-01T20:03:50Z","msg":"Starting EventSource","controller":"fexitprogram","controllerGroup":"bpfman.io","controllerKind":"FexitProgram","source":"kind source: *v1alpha1.FexitProgram"}
{"level":"info","ts":"2024-11-01T20:03:50Z","msg":"Starting EventSource","controller":"fexitprogram","controllerGroup":"bpfman.io","controllerKind":"FexitProgram","source":"kind source: *v1alpha1.BpfProgram"}
{"level":"info","ts":"2024-11-01T20:03:50Z","msg":"Starting EventSource","controller":"fexitprogram","controllerGroup":"bpfman.io","controllerKind":"FexitProgram","source":"kind source: *v1.Node"}
{"level":"info","ts":"2024-11-01T20:03:50Z","msg":"Starting Controller","controller":"fexitprogram","controllerGroup":"bpfman.io","controllerKind":"FexitProgram"}
{"level":"info","ts":"2024-11-01T20:03:50Z","msg":"Starting EventSource","controller":"fentryprogram","controllerGroup":"bpfman.io","controllerKind":"FentryProgram","source":"kind source: *v1alpha1.FentryProgram"}
{"level":"info","ts":"2024-11-01T20:03:50Z","msg":"Starting EventSource","controller":"fentryprogram","controllerGroup":"bpfman.io","controllerKind":"FentryProgram","source":"kind source: *v1alpha1.BpfProgram"}
{"level":"info","ts":"2024-11-01T20:03:50Z","msg":"Starting EventSource","controller":"fentryprogram","controllerGroup":"bpfman.io","controllerKind":"FentryProgram","source":"kind source: *v1.Node"}
{"level":"info","ts":"2024-11-01T20:03:50Z","msg":"Starting Controller","controller":"fentryprogram","controllerGroup":"bpfman.io","controllerKind":"FentryProgram"}
{"level":"info","ts":"2024-11-01T20:03:50Z","msg":"Starting workers","controller":"tcxprogram","controllerGroup":"bpfman.io","controllerKind":"TcxProgram","worker count":1}
{"level":"info","ts":"2024-11-01T20:03:50Z","msg":"Starting workers","controller":"tracepointprogram","controllerGroup":"bpfman.io","controllerKind":"TracepointProgram","worker count":1}
{"level":"info","ts":"2024-11-01T20:03:50Z","msg":"Starting workers","controller":"kprobeprogram","controllerGroup":"bpfman.io","controllerKind":"KprobeProgram","worker count":1}
{"level":"info","ts":"2024-11-01T20:03:50Z","msg":"Starting workers","controller":"xdpprogram","controllerGroup":"bpfman.io","controllerKind":"XdpProgram","worker count":1}
{"level":"info","ts":"2024-11-01T20:03:50Z","logger":"tcx","msg":"bpfman-agent enter: tcx","Name":"bpfman-deployment-control-plane"}
{"level":"info","ts":"2024-11-01T20:03:50Z","msg":"Starting workers","controller":"fentryprogram","controllerGroup":"bpfman.io","controllerKind":"FentryProgram","worker count":1}
{"level":"info","ts":"2024-11-01T20:03:50Z","msg":"Starting workers","controller":"uprobeprogram","controllerGroup":"bpfman.io","controllerKind":"UprobeProgram","worker count":1}
{"level":"info","ts":"2024-11-01T20:03:50Z","msg":"Starting workers","controller":"bpfapplication","controllerGroup":"bpfman.io","controllerKind":"BpfApplication","worker count":1}
{"level":"info","ts":"2024-11-01T20:03:50Z","msg":"Starting workers","controller":"tcprogram","controllerGroup":"bpfman.io","controllerKind":"TcProgram","worker count":1}
{"level":"info","ts":"2024-11-01T20:03:50Z","logger":"kprobe","msg":"bpfman-agent enter: kprobe","Name":"bpfman-deployment-control-plane"}
{"level":"info","ts":"2024-11-01T20:03:50Z","msg":"Starting workers","controller":"fexitprogram","controllerGroup":"bpfman.io","controllerKind":"FexitProgram","worker count":1}
{"level":"info","ts":"2024-11-01T20:03:50Z","logger":"xdp","msg":"bpfman-agent enter: XDP","Name":"bpfman-deployment-control-plane"}
{"level":"info","ts":"2024-11-01T20:03:50Z","logger":"kprobe","msg":"KprobeProgramController found no Kprobe Programs"}
{"level":"info","ts":"2024-11-01T20:03:50Z","logger":"xdp","msg":"XdpProgramController found no XDP Programs"}
{"level":"info","ts":"2024-11-01T20:03:50Z","logger":"tcx","msg":"TcxProgramController found no TCX Programs"}
{"level":"info","ts":"2024-11-01T20:03:50Z","logger":"tracept","msg":"bpfman-agent enter: tracepoint","Name":"bpfman-deployment-control-plane"}
{"level":"info","ts":"2024-11-01T20:03:50Z","logger":"application","msg":"bpfman-agent enter: application","Name":"bpfman-deployment-control-plane"}
{"level":"info","ts":"2024-11-01T20:03:50Z","logger":"uprobe","msg":"bpfman-agent enter: uprobe","Name":"bpfman-deployment-control-plane"}
{"level":"info","ts":"2024-11-01T20:03:50Z","logger":"tracept","msg":"TracepointProgramController found no Tracepoint Programs"}
{"level":"info","ts":"2024-11-01T20:03:50Z","logger":"fentry","msg":"bpfman-agent enter: fentry","Name":"bpfman-deployment-control-plane"}
{"level":"info","ts":"2024-11-01T20:03:50Z","logger":"application","msg":"BpfApplicationController found no application Programs"}
{"level":"info","ts":"2024-11-01T20:03:50Z","logger":"fexit","msg":"bpfman-agent enter: fexit","Name":"bpfman-deployment-control-plane"}
{"level":"info","ts":"2024-11-01T20:03:50Z","logger":"tc","msg":"bpfman-agent enter: TC","Name":"bpfman-deployment-control-plane","MarshalLog":{"name":"bpfman-deployment-control-plane"},"String":"/bpfman-deployment-control-plane","Namespace":"","NamespacedName":{"name":"bpfman-deployment-control-plane"}}
{"level":"info","ts":"2024-11-01T20:03:50Z","logger":"fexit","msg":"FexitProgramController found no Fexit Programs"}
{"level":"info","ts":"2024-11-01T20:03:50Z","logger":"fentry","msg":"FentryProgramController found no Fentry Programs"}
{"level":"info","ts":"2024-11-01T20:03:50Z","logger":"tc","msg":"TcProgramController found no TC Programs"}
{"level":"info","ts":"2024-11-01T20:03:50Z","logger":"uprobe","msg":"UprobeProgramController found no Uprobe Programs"}
{"level":"info","ts":"2024-11-01T20:03:50Z","logger":"application","msg":"bpfman-agent enter: application","Name":"bpfman-operator-7d7559856-mnqdc"}
{"level":"info","ts":"2024-11-01T20:03:50Z","logger":"uprobe","msg":"bpfman-agent enter: uprobe","Name":"coredns-5d78c9869d-b4sgf"}
{"level":"info","ts":"2024-11-01T20:03:50Z","logger":"application","msg":"BpfApplicationController found no application Programs"}
{"level":"info","ts":"2024-11-01T20:03:50Z","logger":"uprobe","msg":"UprobeProgramController found no Uprobe Programs"}
{"level":"info","ts":"2024-11-01T20:03:50Z","logger":"application","msg":"bpfman-agent enter: application","Name":"etcd-bpfman-deployment-control-plane"}
{"level":"info","ts":"2024-11-01T20:03:50Z","logger":"application","msg":"BpfApplicationController found no application Programs"}
{"level":"info","ts":"2024-11-01T20:03:50Z","logger":"uprobe","msg":"bpfman-agent enter: uprobe","Name":"coredns-5d78c9869d-qxnwm"}
{"level":"info","ts":"2024-11-01T20:03:50Z","logger":"uprobe","msg":"UprobeProgramController found no Uprobe Programs"}
{"level":"info","ts":"2024-11-01T20:03:50Z","logger":"uprobe","msg":"bpfman-agent enter: uprobe","Name":"kindnet-qlrmg"}
{"level":"info","ts":"2024-11-01T20:03:50Z","logger":"application","msg":"bpfman-agent enter: application","Name":"kube-scheduler-bpfman-deployment-control-plane"}
{"level":"info","ts":"2024-11-01T20:03:50Z","logger":"uprobe","msg":"UprobeProgramController found no Uprobe Programs"}
{"level":"info","ts":"2024-11-01T20:03:50Z","logger":"application","msg":"BpfApplicationController found no application Programs"}
{"level":"info","ts":"2024-11-01T20:03:50Z","logger":"uprobe","msg":"bpfman-agent enter: uprobe","Name":"kube-apiserver-bpfman-deployment-control-plane"}
{"level":"info","ts":"2024-11-01T20:03:50Z","logger":"uprobe","msg":"UprobeProgramController found no Uprobe Programs"}
{"level":"info","ts":"2024-11-01T20:03:50Z","logger":"application","msg":"bpfman-agent enter: application","Name":"kindnet-qlrmg"}
{"level":"info","ts":"2024-11-01T20:03:50Z","logger":"uprobe","msg":"bpfman-agent enter: uprobe","Name":"kube-controller-manager-bpfman-deployment-control-plane"}
{"level":"info","ts":"2024-11-01T20:03:50Z","logger":"uprobe","msg":"UprobeProgramController found no Uprobe Programs"}
{"level":"info","ts":"2024-11-01T20:03:50Z","logger":"application","msg":"BpfApplicationController found no application Programs"}
{"level":"info","ts":"2024-11-01T20:03:50Z","logger":"uprobe","msg":"bpfman-agent enter: uprobe","Name":"kube-proxy-4nk55"}
{"level":"info","ts":"2024-11-01T20:03:50Z","logger":"uprobe","msg":"UprobeProgramController found no Uprobe Programs"}
{"level":"info","ts":"2024-11-01T20:03:50Z","logger":"application","msg":"bpfman-agent enter: application","Name":"kube-apiserver-bpfman-deployment-control-plane"}
{"level":"info","ts":"2024-11-01T20:03:50Z","logger":"application","msg":"BpfApplicationController found no application Programs"}
{"level":"info","ts":"2024-11-01T20:03:50Z","logger":"uprobe","msg":"bpfman-agent enter: uprobe","Name":"local-path-provisioner-6bc4bddd6b-2g4pl"}
{"level":"info","ts":"2024-11-01T20:03:50Z","logger":"uprobe","msg":"UprobeProgramController found no Uprobe Programs"}
{"level":"info","ts":"2024-11-01T20:03:50Z","logger":"application","msg":"bpfman-agent enter: application","Name":"kube-controller-manager-bpfman-deployment-control-plane"}
{"level":"info","ts":"2024-11-01T20:03:50Z","logger":"uprobe","msg":"bpfman-agent enter: uprobe","Name":"etcd-bpfman-deployment-control-plane"}
{"level":"info","ts":"2024-11-01T20:03:50Z","logger":"application","msg":"BpfApplicationController found no application Programs"}
{"level":"info","ts":"2024-11-01T20:03:50Z","logger":"uprobe","msg":"UprobeProgramController found no Uprobe Programs"}
{"level":"info","ts":"2024-11-01T20:03:50Z","logger":"uprobe","msg":"bpfman-agent enter: uprobe","Name":"kube-scheduler-bpfman-deployment-control-plane"}
{"level":"info","ts":"2024-11-01T20:03:50Z","logger":"application","msg":"bpfman-agent enter: application","Name":"kube-proxy-4nk55"}
{"level":"info","ts":"2024-11-01T20:03:50Z","logger":"uprobe","msg":"UprobeProgramController found no Uprobe Programs"}
{"level":"info","ts":"2024-11-01T20:03:50Z","logger":"application","msg":"BpfApplicationController found no application Programs"}
{"level":"info","ts":"2024-11-01T20:03:50Z","logger":"uprobe","msg":"bpfman-agent enter: uprobe","Name":"bpfman-operator-7d7559856-mnqdc"}
{"level":"info","ts":"2024-11-01T20:03:50Z","logger":"uprobe","msg":"UprobeProgramController found no Uprobe Programs"}
{"level":"info","ts":"2024-11-01T20:03:50Z","logger":"application","msg":"bpfman-agent enter: application","Name":"local-path-provisioner-6bc4bddd6b-2g4pl"}
{"level":"info","ts":"2024-11-01T20:03:50Z","logger":"application","msg":"BpfApplicationController found no application Programs"}
{"level":"info","ts":"2024-11-01T20:03:50Z","logger":"application","msg":"bpfman-agent enter: application","Name":"coredns-5d78c9869d-b4sgf"}
{"level":"info","ts":"2024-11-01T20:03:50Z","logger":"application","msg":"BpfApplicationController found no application Programs"}
{"level":"info","ts":"2024-11-01T20:03:50Z","logger":"application","msg":"bpfman-agent enter: application","Name":"coredns-5d78c9869d-qxnwm"}
{"level":"info","ts":"2024-11-01T20:03:50Z","logger":"application","msg":"BpfApplicationController found no application Programs"}
{"level":"info","ts":"2024-11-01T20:03:52Z","logger":"application","msg":"bpfman-agent enter: application","Name":"bpfman-daemon-rzj7p"}
{"level":"info","ts":"2024-11-01T20:03:52Z","logger":"application","msg":"BpfApplicationController found no application Programs"}
{"level":"info","ts":"2024-11-01T20:03:52Z","logger":"uprobe","msg":"bpfman-agent enter: uprobe","Name":"bpfman-daemon-rzj7p"}
{"level":"info","ts":"2024-11-01T20:03:52Z","logger":"uprobe","msg":"UprobeProgramController found no Uprobe Programs"}
{"level":"info","ts":"2024-11-01T20:07:52Z","logger":"xdp","msg":"bpfman-agent enter: XDP","Name":"go-xdp-counter-example"}
{"level":"info","ts":"2024-11-01T20:07:52Z","logger":"xdp","msg":"Calling KubeAPI to create BpfProgram","Name":"go-xdp-counter-example-71180748","Owner":"go-xdp-counter-example"}
{"level":"info","ts":"2024-11-01T20:07:52Z","logger":"xdp","msg":"bpfman-agent enter: XDP","Name":"go-xdp-counter-example"}
{"level":"info","ts":"2024-11-01T20:07:52Z","logger":"xdp","msg":"Calling bpfman to load eBPF Program on node","Name":"go-xdp-counter-example-71180748"}
{"level":"info","ts":"2024-11-01T20:07:58Z","logger":"kprobe","msg":"bpfman-agent enter: kprobe","Name":"go-kprobe-counter-example"}
{"level":"info","ts":"2024-11-01T20:08:01Z","logger":"xdp","msg":"Calling KubeAPI to update BpfProgram Object","Id":9297,"Name":"go-xdp-counter-example-71180748"}
{"level":"info","ts":"2024-11-01T20:08:01Z","logger":"xdp","msg":"bpfman-agent enter: XDP","Name":"go-xdp-counter-example"}
{"level":"info","ts":"2024-11-01T20:08:01Z","logger":"xdp","msg":"Calling KubeAPI to update BpfProgram condition","Name":"go-xdp-counter-example-71180748","condition":"Loaded"}
{"level":"info","ts":"2024-11-01T20:08:01Z","logger":"xdp","msg":"bpfman-agent enter: XDP","Name":"go-xdp-counter-example"}
{"level":"info","ts":"2024-11-01T20:08:01Z","logger":"xdp","msg":"Finished reconciling","Name":"go-xdp-counter-example"}
{"level":"info","ts":"2024-11-01T20:08:01Z","logger":"xdp","msg":"bpfman-agent enter: XDP","Name":"go-xdp-counter-example"}
{"level":"info","ts":"2024-11-01T20:08:01Z","logger":"xdp","msg":"Finished reconciling","Name":"go-xdp-counter-example"}
{"level":"info","ts":"2024-11-01T20:08:06Z","logger":"uprobe","msg":"bpfman-agent enter: uprobe","Name":"go-xdp-counter-ds-fxhdg"}
{"level":"info","ts":"2024-11-01T20:08:06Z","logger":"application","msg":"bpfman-agent enter: application","Name":"go-xdp-counter-ds-fxhdg"}
{"level":"info","ts":"2024-11-01T20:08:06Z","logger":"uprobe","msg":"UprobeProgramController found no Uprobe Programs"}
{"level":"info","ts":"2024-11-01T20:08:06Z","logger":"application","msg":"BpfApplicationController found no application Programs"}
{"level":"info","ts":"2024-11-01T20:08:08Z","logger":"kprobe","msg":"Calling KubeAPI to create BpfProgram","Name":"go-kprobe-counter-example-08012658","Owner":"go-kprobe-counter-example"}
{"level":"info","ts":"2024-11-01T20:08:08Z","logger":"kprobe","msg":"bpfman-agent enter: kprobe","Name":"go-kprobe-counter-example"}
{"level":"info","ts":"2024-11-01T20:08:08Z","logger":"kprobe","msg":"Calling bpfman to load eBPF Program on node","Name":"go-kprobe-counter-example-08012658"}
{"level":"info","ts":"2024-11-01T20:08:14Z","logger":"kprobe","msg":"Calling KubeAPI to update BpfProgram Object","Id":9306,"Name":"go-kprobe-counter-example-08012658"}
{"level":"info","ts":"2024-11-01T20:08:14Z","logger":"kprobe","msg":"bpfman-agent enter: kprobe","Name":"go-kprobe-counter-example"}
{"level":"info","ts":"2024-11-01T20:08:14Z","logger":"kprobe","msg":"Calling KubeAPI to update BpfProgram condition","Name":"go-kprobe-counter-example-08012658","condition":"Loaded"}
{"level":"info","ts":"2024-11-01T20:08:14Z","logger":"kprobe","msg":"bpfman-agent enter: kprobe","Name":"go-kprobe-counter-example"}
{"level":"info","ts":"2024-11-01T20:08:14Z","logger":"kprobe","msg":"Finished reconciling","Name":"go-kprobe-counter-example"}
{"level":"info","ts":"2024-11-01T20:08:23Z","logger":"application","msg":"bpfman-agent enter: application","Name":"go-kprobe-counter-ds-w2xbn"}
{"level":"info","ts":"2024-11-01T20:08:23Z","logger":"application","msg":"BpfApplicationController found no application Programs"}
{"level":"info","ts":"2024-11-01T20:08:23Z","logger":"uprobe","msg":"bpfman-agent enter: uprobe","Name":"go-kprobe-counter-ds-w2xbn"}
{"level":"info","ts":"2024-11-01T20:08:23Z","logger":"uprobe","msg":"UprobeProgramController found no Uprobe Programs"}

@Billy99
Copy link
Contributor Author

Billy99 commented Nov 1, 2024

I'm still struggling with uprobe and application, because both subscribe to pod changes, so there are two logs every pod update, like:

{"level":"info","ts":"2024-11-01T20:03:50Z","logger":"uprobe","msg":"bpfman-agent enter: uprobe","Name":"coredns-5d78c9869d-qxnwm"}
{"level":"info","ts":"2024-11-01T20:03:50Z","logger":"uprobe","msg":"UprobeProgramController found no Uprobe Programs"}

Recently was reviewing an OpenShift cluster logs, which had a lot more pods than my KIND cluster, and the logs were just filled with these type logs. However, if something does change, we need to know.

@anfredette
Copy link
Contributor

Is it possible to tell that we were called because of a pod change, and then make the log debug if it is? If something does change, though, we'd like to know, so it would be good if there's some trace of it when things are changing.

@anfredette
Copy link
Contributor

Should we also make the "*Controller found no * Programs" log debug in all cases?

Copy link

codecov bot commented Nov 2, 2024

Codecov Report

Attention: Patch coverage is 45.71429% with 38 lines in your changes missing coverage. Please review.

Project coverage is 27.60%. Comparing base (68f13ae) to head (5a16ecb).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
controllers/bpfman-agent/common.go 18.91% 30 Missing ⚠️
controllers/bpfman-agent/application-program.go 22.22% 7 Missing ⚠️
controllers/bpfman-operator/common.go 75.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #336      +/-   ##
==========================================
- Coverage   27.64%   27.60%   -0.04%     
==========================================
  Files          87       87              
  Lines        7499     7495       -4     
==========================================
- Hits         2073     2069       -4     
  Misses       5226     5226              
  Partials      200      200              
Flag Coverage Δ
unittests 27.60% <45.71%> (-0.04%) ⬇️

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Billy99
Copy link
Contributor Author

Billy99 commented Nov 4, 2024

Is it possible to tell that we were called because of a pod change, and then make the log debug if it is? If something does change, though, we'd like to know, so it would be good if there's some trace of it when things are changing.

Not that I could find. I found a couple of discussions on the topic, but the answer was always that you shouldn't care why you were called, just reconcile to the desired state.

@Billy99 Billy99 marked this pull request as ready for review November 5, 2024 18:58
@Billy99
Copy link
Contributor Author

Billy99 commented Nov 5, 2024

I found a way to determine if Reconcile() is being called because of a pod update or other. I am leaving it out, but if others think we should move the logs to Debug() for pod updates, let me know.

	pod := &v1.Pod{}
	err := r.Get(ctx, req.NamespacedName, pod)
	if err != nil {
		r.Logger.Info("bpfman-agent enter but NOT pod: uprobe", "Name", req.Name)
	} else {
		r.Logger.Info("bpfman-agent enter but IS pod: uprobe", "Name", req.Name)
	}

r.Logger = log.FromContext(ctx)
r.Logger = ctrl.Log.WithName("tc")

r.Logger.Info("bpfman-operator enter: TC", "Name", req.NamespacedName)
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we have this log for all program types?

Copy link
Contributor

@anfredette anfredette left a comment

Choose a reason for hiding this comment

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

Looks good other than one question.

@@ -73,7 +72,7 @@ func (r *BpfmanConfigReconciler) SetupWithManager(mgr ctrl.Manager) error {
}

func (r *BpfmanConfigReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error) {
r.Logger = log.FromContext(ctx)
r.Logger = ctrl.Log.WithName("configMap")
Copy link
Contributor

Choose a reason for hiding this comment

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

all reconciller object has Logger

type ReconcilerCommon struct {
	client.Client
	Scheme *runtime.Scheme
	Logger logr.Logger
}

so we just need to initialize in the operator and agent main and use it here and all places below ?

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.

3 participants