RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1325080 - Virtlogd doesn't release client resource after guest restore from a saved file.
Summary: Virtlogd doesn't release client resource after guest restore from a saved file.
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libvirt
Version: 7.3
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Peter Krempa
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-04-08 07:24 UTC by Fangge Jin
Modified: 2016-11-03 18:41 UTC (History)
6 users (show)

Fixed In Version: libvirt-2.0.0-1.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-11-03 18:41:40 UTC
Target Upstream Version:
Embargoed:


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


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2016:2577 0 normal SHIPPED_LIVE Moderate: libvirt security, bug fix, and enhancement update 2016-11-03 12:07:06 UTC

Description Fangge Jin 2016-04-08 07:24:18 UTC
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 06:14:19 UTC
Fixed upstream:

commit f392654b5e3e0e2f6b27a48f252a1cba99fa1276
Author: Peter Krempa <pkrempa>
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 10:36:20 UTC
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 18:41:40 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, 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.