-
Notifications
You must be signed in to change notification settings - Fork 267
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
Allow modifying log verbosity in CDI #2882
Conversation
@akalenyu wondering if it'd be useful to have individual verbosity levels for all components as they have in kubevirt, wdyt? At first glance seems overkill for CDI. |
Yeah, I think we can start off just with the global verbosity value, just have to make sure we're |
Yeah I like the idea of having a struct so it's more maintainable, Let's see what others think. |
I think this is fine for infra components but what about worker pods? |
The workloads get their verbosity from the controllers that create them. So the import controller creates pods and grabs the verbosity from the cdi-deployment. For example the import controller https://github.com/kubevirt/containerized-data-importer/blob/main/pkg/controller/import-controller.go#L1191 gets the verbosity from the reconciler field, which is set when the controller is started. |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: mhenriks The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
We should probably discuss if and how far we want to backport this as it could be really helpful with debugging customer issues. |
I am fine with a single verbosity value. I am not sure there is much value in a more granular approach. |
/unhold |
This commit adds a new field in the cdiConfig API to allow specifying a log verbosity level to initialize all loggers. Changes in this field will mean restarting all CDI components to initialize all loggers. Signed-off-by: Alvaro Romero <alromero@redhat.com>
Signed-off-by: Alvaro Romero <alromero@redhat.com>
213f5a4
to
56bd04d
Compare
/test pull-containerized-data-importer-e2e-hpp-latest |
/lgtm |
What this PR does / why we need it:
This PR aims to make the debugging process of CDI easier, allowing changes in log verbosity from the CDI config.
It adds a new field in the
CDIConfig
API to allow specifying a different log verbosity level to re-initialize all loggers. Changes in this field will restart all CDI components to initialize all loggers with the new value.Special notes for your reviewer:
The new API looks like this:
I opted for a simpler API compared to the one used in kubevirt. I think the kubevirt API is overkill for CDI, but I can always change it if preferred.
Release note: