Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1357776 - Service is not re-enabled when increasing max_clients limit after it has been reached.
Service is not re-enabled when increasing max_clients limit after it has been...
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: Erik Skultety
Virtualization Bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2016-07-19 02:56 EDT by Fangge Jin
Modified: 2016-11-03 14:50 EDT (History)
5 users (show)

See Also:
Fixed In Version: libvirt-2.0.0-5.el7
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-11-03 14:50:32 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)


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-07-19 02:56:35 EDT
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 09:33:14 EDT
Fixed upstream by:

commit e9ce8a7d24a94f0be19705ae0e63aaa054c39e88
Author:     Erik Skultety <eskultet@redhat.com>
AuthorDate: Wed Jul 20 12:10:29 2016 +0200
Commit:     Erik Skultety <eskultet@redhat.com>
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@redhat.com>
Comment 5 yafu 2016-08-15 06:39:52 EDT
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 14:50:32 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.