Bug 2008522 - "unable to execute QEMU agent command 'guest-get-users'" logs in virt-launcher pod every 10 seconds
Summary: "unable to execute QEMU agent command 'guest-get-users'" logs in virt-launche...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Container Native Virtualization (CNV)
Classification: Red Hat
Component: Virtualization
Version: 2.6.6
Hardware: All
OS: Linux
high
medium
Target Milestone: ---
: 2.6.8
Assignee: Igor Bezukh
QA Contact: Israel Pinto
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-09-28 12:54 UTC by nijin ashok
Modified: 2021-11-17 18:40 UTC (History)
5 users (show)

Fixed In Version: virt-launcher-v2.6.8-2
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-11-17 18:40:02 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github kubevirt kubevirt pull 6530 0 None open [release-0.36] [virt-launcher]: lower the log severity of GA unsupported commands 2021-10-06 11:55:55 UTC
Red Hat Knowledge Base (Solution) 2008522 0 None None None 2021-09-28 13:25:02 UTC
Red Hat Product Errata RHSA-2021:4725 0 None None None 2021-11-17 18:40:41 UTC

Description nijin ashok 2021-09-28 12:54:27 UTC
Description of problem:

The `guest-get-users` command was added in qemu-ga in  v2.10.0 [1] and older versions will show the below error if we send `guest-get-users`.   

~~~
virsh qemu-agent-command nijin-cnv_rhel6-moderate-emu  '{ "execute": "guest-get-users" }'
error: internal error: unable to execute QEMU agent command 'guest-get-users': The command guest-get-users has not been found
~~~

The virt-launcher sends qemu agent commands every 10 seconds and the below error is logged when it fails.

~~~
{"component":"virt-launcher","level":"error","msg":"internal error: unable to execute QEMU agent command 'guest-get-users': The command guest-get-users has not been found","pos":"qemuAgentCheckError:1057","subcomponent":"libvirt","thread":"34","timestamp":"2021-09-28T12:31:55.533000Z"}
~~~

In a large environment, this causes huge log entries.
 

Version-Release number of selected component (if applicable):

CNV 2.6.10

How reproducible:

100%

Steps to Reproduce:
1. Install an RHEL 6 VM and start qemu-ga service.
2. Watch for the logs in the virt-launcher pod.


Actual results:

"unable to execute QEMU agent command 'guest-get-users'" logging every 10 seconds in virt-launcher pod

Expected results:

Don't log the error every 10 seconds if the guest qemu-ga doesn't support the command.

Additional info:


[1] https://github.com/qemu/qemu/commit/161a56a9065feb6fa2f69cec6237a5c4e714b9d3

Comment 1 Igor Bezukh 2021-10-06 11:58:33 UTC
Waiting for the upstream cherrypick PR to get merged.

Meanwhile the changes were verified and now the log will be presented only if the debugLogs label will be set to true in the VM spec.

Example:

apiVersion: kubevirt.io/v1alpha3
kind: VirtualMachine
metadata:
  labels:
    debugLogs: "true"


The log will be in the following format:
{"component":"virt-launcher","level":"info","msg":"Line [{\"error\": {\"class\": \"CommandNotFound\", \"desc\": \"The command guest-get-usersssss has not been found\"}}]","pos":"qemuAgentIOProcessLine:264","subcomponent":"libvirt","thread":"91","timestamp":"2021-10-06T11:42:42.233000Z"}

Comment 2 zhe peng 2021-10-20 09:47:43 UTC
verify with build:CNV-v2.6.8-15

step:
1. create a rhel6 vm and add debugLogs: 'true' in vm yaml file
2. start the vm and check qemu-ga started.
3. check virt-launcher logs

{"component":"virt-launcher","level":"info","msg":"Send command '{\"execute\":\"guest-get-users\"}' for write, seconds = -1","pos":"qemuAgentCommandFull:1103","subcomponent":"libvirt","thread":"31","timestamp":"2021-10-20T09:39:54.850000Z"}
{"component":"virt-launcher","level":"info","msg":"Line [{\"error\": {\"class\": \"CommandNotFound\", \"desc\": \"The command guest-get-users has not been found\", \"data\": {\"name\": \"guest-get-users\"}}}]","pos":"qemuAgentIOProcessLine:264","subcomponent":"libvirt","thread":"78","timestamp":"2021-10-20T09:39:54.851000Z"}

4. remove debugLogs: 'true' and restart vm
check dirt-launcher logs
no guest-get-user error found. 
move to verified.

Comment 8 errata-xmlrpc 2021-11-17 18:40:02 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Moderate: OpenShift Virtualization 2.6.8 Images security and bug fix update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2021:4725


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