Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1325080 - Virtlogd doesn't release client resource after guest restore from a saved file.
Virtlogd doesn't release client resource after guest restore from a saved file.
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libvirt (Show other bugs)
7.3
x86_64 Linux
medium Severity medium
: rc
: ---
Assigned To: Peter Krempa
Virtualization Bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2016-04-08 03:24 EDT by Fangge Jin
Modified: 2016-11-03 14:41 EDT (History)
6 users (show)

See Also:
Fixed In Version: libvirt-2.0.0-1.el7
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-11-03 14:41:40 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
virtlogd log (121.74 KB, text/plain)
2016-04-08 03:24 EDT, Fangge Jin
no flags Details


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2016:2577 normal SHIPPED_LIVE Moderate: libvirt security, bug fix, and enhancement update 2016-11-03 08:07:06 EDT

  None (edit)
Description Fangge Jin 2016-04-08 03:24:18 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:
Comment 2 Peter Krempa 2016-06-08 02:14:19 EDT
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.
Comment 4 yafu 2016-07-05 06:36:20 EDT
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
Comment 6 errata-xmlrpc 2016-11-03 14:41:40 EDT
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

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