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 1357776 - Service is not re-enabled when increasing max_clients limit after it has been reached.
Summary: Service is not re-enabled when increasing max_clients limit after it has been...
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: Erik Skultety
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-07-19 06:56 UTC by Fangge Jin
Modified: 2016-11-03 18:50 UTC (History)
5 users (show)

Fixed In Version: libvirt-2.0.0-5.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-11-03 18:50:32 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


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-07-19 06:56:35 UTC
Description of problem:
When max_clients limit has been reached, increase max_clients by "srv-clients-set --max-clients" at run time, then try to connect new virsh client to libvirtd, but it failed.

Version-Release number of selected component (if applicable):
libvirt-2.0.0-2.el7.x86_64

How reproducible:
100%

Steps to Reproduce:
1.Set max_clients limit in libvirtd.conf
max_clients = 2
max_anonymous_clients = 2

2. Restart libvirtd sevice

3. 
# virt-admin srv-clients-info libvirtd 
nclients_max        : 2
nclients            : 0
nclients_unauth_max : 2
nclients_unauth     : 0

4.Open two terminals, connect a virsh client in each terminal:
# virsh -c qemu:///system

5.
# virt-admin srv-clients-info libvirtd 
nclients_max        : 2
nclients            : 2
nclients_unauth_max : 2
nclients_unauth     : 0

6. Increase max_clients limit:
# virt-admin srv-clients-set libvirtd --max-clients 5

# virt-admin srv-clients-info libvirtd 
nclients_max        : 5
nclients            : 2
nclients_unauth_max : 5
nclients_unauth     : 0

7.Connect a new virsh client to libvirtd:
# virsh -c qemu:///system
(hangs)

8.Quit an existing virsh client which is connected in step 4:
virsh # quit

9. Check the virsh client in step7, it's connected successfully
# virsh -c qemu:///system
Welcome to virsh, the virtualization interactive terminal.

Type:  'help' for help with commands
       'quit' to quit

virsh # 


Actual results:
In step 7, virsh client didn't connect to libvirtd successfully.

Expected results:
New virsh client can connect to libvirtd successfully after increasing max_clients limit at run time.

Comment 2 Erik Skultety 2016-08-02 13:33:14 UTC
Fixed upstream by:

commit e9ce8a7d24a94f0be19705ae0e63aaa054c39e88
Author:     Erik Skultety <eskultet>
AuthorDate: Wed Jul 20 12:10:29 2016 +0200
Commit:     Erik Skultety <eskultet>
CommitDate: Tue Aug 2 14:51:13 2016 +0200

    admin: rpc: virnetserver: Fix updating of the client limits
    
    Commit 2737aaaf changed our policy for accepting new clients in a way, that
    instead of accepting new clients only to disconnect them immediately, since
    that would overcommit the limit, we temporarily disable polling for the
    dedicated file descriptor, so any new connection will queue on the socket.
    Commit 8b1f0469 then added the possibility to change the limits during runtime
    but it didn't re-enable polling for the previously disabled file descriptor,
    thus any new connection would still continue to queue on the socket. This patch
    forces an update of the services each time the limits were changed in some way.
    
    Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1357776
    
    Signed-off-by: Erik Skultety <eskultet>

Comment 5 yafu 2016-08-15 10:39:52 UTC
Reproduced with libvirt-2.0.0-2.el7.x86_64.
Test steps are as comment 0.


Verified pass with libvirt-2.0.0-5.el7.x86_64.
Test steps:
1.Set max_clients limit in libvirtd.conf
max_clients = 2
max_anonymous_clients = 2

2. Restart libvirtd sevice

3. #virt-admin srv-clients-info libvirtd 
nclients_max        : 2
nclients            : 0
nclients_unauth_max : 2
nclients_unauth     : 0

4.Open two terminals, connect a virsh client in each terminal:
# virsh -c qemu:///system

5.# virt-admin srv-clients-info libvirtd 
nclients_max        : 2
nclients            : 2
nclients_unauth_max : 2
nclients_unauth     : 0

6. Increase max_clients limit:
# virt-admin srv-clients-set libvirtd --max-clients 5

7# virt-admin srv-clients-info libvirtd 
nclients_max        : 5
nclients            : 2
nclients_unauth_max : 5
nclients_unauth     : 0

8.Connect 3 new virsh client to libvirtd, all connect correctly:
# virsh -c qemu:///system


9.Connect another new virsh client to libvirtd:
#virsh -c qemu:///system
(hangs)

Comment 7 errata-xmlrpc 2016-11-03 18:50:32 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.