Bug 1949440
| Summary: | Add cluster-level config for libvirtd log level in virt-launcher pod | ||
|---|---|---|---|
| Product: | Container Native Virtualization (CNV) | Reporter: | Rhys Oxenham <roxenham> |
| Component: | Virtualization | Assignee: | Jed Lejosne <jlejosne> |
| Status: | CLOSED NOTABUG | QA Contact: | Israel Pinto <ipinto> |
| Severity: | high | Docs Contact: | |
| Priority: | high | ||
| Version: | 2.6.1 | CC: | cnv-qe-bugs, danken, fdeutsch, kbidarka, lpivarc, stirabos |
| Target Milestone: | --- | ||
| Target Release: | future | ||
| Hardware: | x86_64 | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2021-08-24 17:26:26 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
Currently this ENV_VAR "LIBVIRT_DEBUG_LOGS" exists, we need to add support to expose it via HCO. |
Description of problem: Currently, the virt-launcher pod starts libvirtd with the standard log level (log_level = 3), which is far from verbose. For debug purposes it's possible to exec into the container, update the log level (log_level = 1) and force the restart of the libvirtd service with `pkill libvirtd` which won't affect the running pod (or VM's). This immediately produces debug-level logs and is accessible via `oc logs`, or via the UI. The problem here is that if we want to debug problems with live-migration, it's not easy to quickly update the log level on a new virt-launcher pod at the destination hypervisor before the failure occurs. I'm advocating for the ability to specify the log level via a cluster-level configuration option or map. That way, all virt-launcher pods that are started will have the correct log level as specified by the cluster configuration. Version-Release number of selected component (if applicable): I'm testing this with OCP 4.7 and CNV 2.6.1, but all versions are currently impacted. Additional info: The dirty hack I've been using to enable debug mode in existing virt-launcher pods is as follows- $ oc get pods -A | awk -F ' ' '/virt-launcher/ {print $1, $2;}' | xargs -l1 -- sh -c 'oc exec -i -n $1 $2 -c compute -- sed -i "s/#log_level = .*/log_level = 1/g" /etc/libvirt/libvirtd.conf' -- $ oc get pods -A | awk -F ' ' '/virt-launcher/ {print $1, $2;}' | xargs -l1 -- sh -c 'oc exec -i -n $1 $2 -c compute -- pkill libvirtd' --