Red Hat Bugzilla – Bug 1325080
Virtlogd doesn't release client resource after guest restore from a saved file.
Last modified: 2016-11-03 14:41:40 EDT
Created attachment 1145034 [details] virtlogd log Description of problem: Virtlogd doesn't release client resource after guest restores from a saved file. Version-Release number of selected component: libvirt-1.3.3-1.el7.x86_64 How reproducible: 100% Steps to Reproduce: 0. Start a guest # virsh start gluster 1. #tailf /var/log/libvirt/virtlogd.log |grep nclients 2. # virsh save gluster /tmp/gluster.save 3. Check virtlogd.log 2016-04-08 07:19:41.508+0000: 4958: debug : virNetServerCheckLimits:730 : Considering re-enabling services: nclients=0 nclients_max=1024 nclients_unauth=0 nclients_unauth_max=1024 4. # virsh restore /tmp/gluster.save Domain restored from /tmp/gluster.save 5. Check virtlogd.log No new "Considering re-enabling services" log output 6. Do save again: # virsh save gluster /tmp/gluster.save Domain gluster saved to /tmp/gluster.save 7. Check virtlogd.log, client is released 2016-04-08 07:20:12.446+0000: 4958: debug : virNetServerCheckLimits:730 : Considering re-enabling services: nclients=1 nclients_max=1024 nclients_unauth=0 nclients_unauth_max=1024 2016-04-08 07:20:12.446+0000: 4958: debug : virNetServerCheckLimits:730 : Considering re-enabling services: nclients=0 nclients_max=1024 nclients_unauth=0 nclients_unauth_max=1024 8.If I set max_clients=1 in virtlogd.conf, at the second time, "virsh save" will hang. Actual results: As step4&5 shown, client is not released. But it's released in next save as shown in step 6. Expected results: Client can be released when guest restores. Additional info:
Fixed upstream: commit f392654b5e3e0e2f6b27a48f252a1cba99fa1276 Author: Peter Krempa <pkrempa@redhat.com> Date: Fri Jun 3 15:18:48 2016 +0200 qemu: driver: Unset log file watcher after restoring a VM save file qemuProcessStart does not unset the infrastructure that retrieves errors from the qemu log file in case of migration. As this wasn't handled properly in qemuDomainSaveImageStartVM we kept the logging context/fd open for the lifetime of the VM rather than closing it after it's not needed.
Reproduce with libvirt-1.3.3-1.el7.x86_64. steps as comment 0 Verify pass with libvirt-2.0.0-1.el7.x86_64. steps: 1.start a guest: #virsh start rhel7.3 2.Open another terminal to check the virtlogd.log: #tailf /var/log/libvirt/virtlogd.log | grep -i nclient 3.#virsh save rhel7.3 /tmp/save 4.Check the virtlogd.log,the client resouce was released: 2016-07-05 10:01:26.622+0000: 21943: debug : virNetServerCheckLimits:759 : Considering re-enabling services: nclients=0 nclients_max=1024 nclients_unauth=0 nclients_unauth_max=1024 5.#virsh restore /tmp/save 6.Check the virtlogd.log,the client resource was released: 2016-07-05 10:01:51.261+0000: 21943: debug : virNetServerCheckLimits:759 : Considering re-enabling services: nclients=0 nclients_max=1024 nclients_unauth=0 nclients_unauth_max=1024
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, 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://rhn.redhat.com/errata/RHSA-2016-2577.html