Bug 858162 - improve virsh error msg when client reach max connection limit
improve virsh error msg when client reach max connection limit
Status: CLOSED WONTFIX
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libvirt (Show other bugs)
6.4
x86_64 Linux
medium Severity medium
: rc
: ---
Assigned To: Gunannan Ren
Virtualization Bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-09-18 04:10 EDT by zhpeng
Modified: 2013-09-08 20:03 EDT (History)
9 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-09-18 09:54:34 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)

  None (edit)
Description zhpeng 2012-09-18 04:10:51 EDT
Description
Error msg is not clear when client reach max connection limit.

Version
libvirt-0.10.1-2.el6.x86_64

How reproducible:
100%

Steps:
1. modify libvirtd.conf, restart libvirtd
max_clients = 2

2. open 2 more terminal and connect libvirtd.
# virsh -c qemu+ssh://10.66.7.230/system
root@10.66.7.230's password:
...
virsh -c qemu+ssh://10.66.7.230/system
root@10.66.7.230's password:
...

3.make the third connection:
# virsh -c qemu:///system
error: Cannot recv data: Connection reset by peer
error: failed to connect to the hypervisor
# virsh  -c qemu+ssh://10.66.7.230/system
root@10.66.7.230's password:
error: End of file while reading data: : Input/output error
error: failed to connect to the hypervisor

So, virsh client got 2 kinds of error msg, actually libvirtd.log have a clear msg:

2012-09-18 07:05:49.265+0000: 30920: error : virNetServerAddClient:273 : Too many active clients (2), dropping connection from 127.0.0.1;0

So i think we should improve virsh client error msg, these error are very confused and dehumanization.


Actual result
Failed with not clear msg

Expect result
Show user why connection failed.

Additional info
Comment 2 Dave Allan 2012-09-18 08:54:45 EDT
I agree that this message could be better, simply reporting "Too many active clients" to the requesting client would be a great improvement.
Comment 3 Daniel Berrange 2012-09-18 08:56:52 EDT
> I agree that this message could be better, simply reporting "Too many active
> clients" to the requesting client would be a great improvement.

A nice idea, but not possible. The whole point of this limit is to immediately drop any client connections *without* consuming resources to perform I/O with them. As such the server can't & won't send any error message back to the client.
Comment 4 Dave Allan 2012-09-18 09:10:22 EDT
(In reply to comment #3)
> > I agree that this message could be better, simply reporting "Too many active
> > clients" to the requesting client would be a great improvement.
> 
> A nice idea, but not possible. The whole point of this limit is to
> immediately drop any client connections *without* consuming resources to
> perform I/O with them. As such the server can't & won't send any error
> message back to the client.

Oh, ugh, so the client's just getting TCP connection refused or similar?
Comment 5 Daniel Berrange 2012-09-18 09:14:59 EDT
No, it gets end-of-file from the server
Comment 6 Dave Allan 2012-09-18 09:54:34 EDT
Ok, given that the design doesn't expect huge numbers of connections, I'm willing to accept this behavior.

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