+++ This bug was initially created as a clone of Bug #2174446 +++ Description of problem: When a management APP is using agent command passhthrough the logs are spammed with: Domain id=7 is tainted: custom-ga-command over and over again. Version-Release number of selected component (if applicable): introduced in libvirt 7.1 How reproducible: always Steps to Reproduce: 1. Start VM 2. repeatedly invoke command such as: $ virsh qemu-agent-command ha '{"execute":"guest-get-vcpus"}' 3. observe logs being spammed Actual results: Expected results: Additional info:
Verify this bug with: libvirt-8.0.0-19.module+el8.8.0+18370+e5872f90.x86_64 1. prepare a guest with guest agent # virsh domtime vm1 Time: 1678521142 2. check the dominfo # virsh dominfo vm1 Id: 2 Name: vm1 UUID: ba63a682-90de-4816-a527-25d2ed542311 OS Type: hvm State: running CPU(s): 2 CPU time: 2.5s Max memory: 3145728 KiB Used memory: 3145728 KiB Persistent: yes Autostart: disable Managed save: no Security model: selinux Security DOI: 0 Security label: system_u:system_r:svirt_t:s0:c339,c702 (enforcing) 3. check the some info about guest using qemu-agent-command # virsh qemu-agent-command vm1 '{"execute":"guest-get-fsinfo"}' {"return":[{"name":"vda1","total-bytes":1063256064, 4. check the dominfo again # virsh dominfo vm1 Id: 2 Name: vm1 UUID: ba63a682-90de-4816-a527-25d2ed542311 OS Type: hvm State: running CPU(s): 2 CPU time: 32.7s Max memory: 3145728 KiB Used memory: 3145728 KiB Persistent: yes Autostart: disable Managed save: no Security model: selinux Security DOI: 0 Security label: system_u:system_r:svirt_t:s0:c339,c702 (enforcing) Messages: tainted: custom guest agent control commands issued 5. check the log 1327:2023-03-16 07:49:38.592+0000: 55730: warning : qemuDomainObjTaintMsg:6401 : Domain id=2 name='vm1' uuid=ba63a682-90de-4816-a527-25d2ed542311 is tainted: custom-ga-command 1329:2023-03-16 07:49:38.592+0000: 55730: debug : qemuDomainLogAppendMessage:6766 : Append log message (vm='vm1' message='2023-03-16 07:49:38.592+0000: Domain id=2 is tainted: custom-ga-command 6. repeat step 2 for 100 times # for i in {1..100}; do virsh qemu-agent-command vm1 '{"execute":"guest-get-fsinfo"}'; done .... 7. check the log again # grep -ni tainted /var/log/libvirt/libvirtd.log 1327:2023-03-16 07:49:38.592+0000: 55730: warning : qemuDomainObjTaintMsg:6401 : Domain id=2 name='vm1' uuid=ba63a682-90de-4816-a527-25d2ed542311 is tainted: custom-ga-command 1329:2023-03-16 07:49:38.592+0000: 55730: debug : qemuDomainLogAppendMessage:6766 : Append log message (vm='vm1' message='2023-03-16 07:49:38.592+0000: Domain id=2 is tainted: custom-ga-command (The tainted message is printed when invoking guest-agent-command for the first time. And no new logs about tainted messages printed for the later invoking, logs are not spammed)
*** Bug 2176898 has been marked as a duplicate of this bug. ***
Tested this bug with: libvirt-8.0.0-20.module+el8.9.0+18894+a91bbb94.x86_64 The testing steps are the same with those in Comment #6, testing passed
Verify this bug with: libvirt-8.0.0-21.module+el8.9.0+19166+e262ca96.x86_64 The verification steps are the same with those in Comment #6. As the result matches with the expected result, mark the bug as verified.