Bug 1949440 - Add cluster-level config for libvirtd log level in virt-launcher pod
Summary: Add cluster-level config for libvirtd log level in virt-launcher pod
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Container Native Virtualization (CNV)
Classification: Red Hat
Component: Virtualization
Version: 2.6.1
Hardware: x86_64
OS: Linux
high
high
Target Milestone: ---
: future
Assignee: Jed Lejosne
QA Contact: Israel Pinto
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-04-14 09:54 UTC by Rhys Oxenham
Modified: 2021-08-24 17:26 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-08-24 17:26:26 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1945532 1 high CLOSED VM migration halts occasionally 2024-10-01 17:50:02 UTC

Description Rhys Oxenham 2021-04-14 09:54:12 UTC
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' --

Comment 1 Kedar Bidarkar 2021-04-14 12:11:10 UTC
Currently this ENV_VAR "LIBVIRT_DEBUG_LOGS" exists, we need to add support to expose it via HCO.


Note You need to log in before you can comment on or make changes to this bug.