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' --
Currently this ENV_VAR "LIBVIRT_DEBUG_LOGS" exists, we need to add support to expose it via HCO.