Bug 806752

Summary: virsh list --all has inactive guests number limit less than 1024
Product: Red Hat Enterprise Linux 7 Reporter: weizhang <weizhan>
Component: libvirtAssignee: Osier Yang <jyang>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 7.0CC: acathrow, dallan, dyuan, gsun, honzhang, mzhan, rwu
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-10-30 06:46:48 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description weizhang 2012-03-26 07:18:05 UTC
Description of problem:
I have 1025 shutdown guest and when I want to list them all there is an error
# virsh list --all
error: Failed to list inactive domains
error: too many remote undefineds: 1025 > 1024
error: Reconnected to the hypervisor

For running guests, virsh list --all can work well
# virsh list --all |wc -l
1028

Version-Release number of selected component (if applicable):
libvirt-0.9.10-6.el6.x86_64
qemu-kvm-0.12.1.2-2.262.el6.x86_64
kernel-2.6.32-250.el6.x86_64

How reproducible:
100%

Steps to Reproduce:
1. Define 1025 guests
2. run # virsh list --all
3.
  
Actual results:
Report error 
Failed to list inactive domains
error: too many remote undefineds: 1025 > 1024
error: Reconnected to the hypervisor

Expected results:
Should not have this limitation because 1024+ guests have already supported

Additional info:

Comment 6 Dave Allan 2012-10-29 14:39:17 UTC
Osier, I believe this has been fixed; can you comment with the commit id and close CURRENTRELEASE?

Comment 7 Osier Yang 2012-10-30 06:46:48 UTC
(In reply to comment #6)
> Osier, I believe this has been fixed; can you comment with the commit id and
> close CURRENTRELEASE?

commit eb635de1fed3257c5c62b552d1ec981c9545c1d7
Author: Michal Privoznik <mprivozn>
Date:   Fri Apr 27 14:49:48 2012 +0200

    rpc: Size up RPC limits
    
    Since we are allocating RPC buffer dynamically, we can increase limits
    for max. size of RPC message and RPC string. This is needed to cover
    some corner cases where libvirt is run on such huge machines that their
    capabilities XML is 4 times bigger than our current limit. This leaves
    users with inability to even connect.

commit a2c304f6872f15c13c1cd642b74008009f7e115b
Author: Michal Privoznik <mprivozn>
Date:   Thu Apr 26 17:21:24 2012 +0200

    rpc: Switch to dynamically allocated message buffer
    
    Currently, we are allocating buffer for RPC messages statically.
    This is not such pain when RPC limits are small. However, if we want
    ever to increase those limits, we need to allocate buffer dynamically,
    based on RPC message len (= the first 4 bytes). Therefore we will
    decrease our mem usage in most cases and still be flexible enough in
    corner cases.