From nobody Sat May 4 06:58:07 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1495801770043643.7629095631598; Fri, 26 May 2017 05:29:30 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 6785CC04D2BB; Fri, 26 May 2017 12:29:28 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 17E257DFDE; Fri, 26 May 2017 12:29:28 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 35DF74BB7F; Fri, 26 May 2017 12:29:27 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id v4QCTPK3013663 for ; Fri, 26 May 2017 08:29:25 -0400 Received: by smtp.corp.redhat.com (Postfix) id E87F47BCC1; Fri, 26 May 2017 12:29:25 +0000 (UTC) Received: from moo.home.annexia.org (unknown [10.36.118.65]) by smtp.corp.redhat.com (Postfix) with ESMTP id CE06E17D89; Fri, 26 May 2017 12:29:22 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 6785CC04D2BB Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=libvir-list-bounces@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 6785CC04D2BB From: "Richard W.M. Jones" To: libvir-list@redhat.com Date: Fri, 26 May 2017 13:29:20 +0100 Message-Id: <20170526122920.32003-1-rjones@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-loop: libvir-list@redhat.com Cc: pkrempa@redhat.com Subject: [libvirt] [PATCH] rpc: Allow up to 256K records to be returned from virConnectGetAllDomainStats. X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Fri, 26 May 2017 12:29:29 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" In commit 89a706681cb3a4aa003d920db3163b809cfbc9ca, the returned array of stats is limited to REMOTE_DOMAIN_LIST_MAX entries (4096). As well as being far too low -- this breaks if a single guest is added with 320 disks -- it also seems as if use of REMOTE_DOMAIN_LIST_MAX was a mistake, and it should be using REMOTE_CONNECT_GET_ALL_DOMAIN_STATS_MAX instead. However REMOTE_CONNECT_GET_ALL_DOMAIN_STATS_MAX is also too low (also 4096), so this patch also increases the limit to something more sensible, allowing us to cope with lots of stats from lots of domains in future. (This limit could be increased further quite easily since each stats record takes about 32 bytes, and the maximum message size is currently 32 MB, so we could increase the limit by another factor of 4 without touching the maximum message size). I tested this using a guest with 320, 500 and 1000 disks with no issues. Signed-off-by: Richard W.M. Jones Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=3D1440683 --- src/remote/remote_protocol.x | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/remote/remote_protocol.x b/src/remote/remote_protocol.x index 25e62a181..142508713 100644 --- a/src/remote/remote_protocol.x +++ b/src/remote/remote_protocol.x @@ -233,7 +233,7 @@ const REMOTE_DOMAIN_FSFREEZE_MOUNTPOINTS_MAX =3D 256; const REMOTE_NETWORK_DHCP_LEASES_MAX =3D 65536; =20 /* Upper limit on count of parameters returned via bulk stats API */ -const REMOTE_CONNECT_GET_ALL_DOMAIN_STATS_MAX =3D 4096; +const REMOTE_CONNECT_GET_ALL_DOMAIN_STATS_MAX =3D 262144; =20 /* Upper limit of message size for tunable event. */ const REMOTE_DOMAIN_EVENT_TUNABLE_MAX =3D 2048; @@ -3264,7 +3264,7 @@ struct remote_domain_event_callback_agent_lifecycle_m= sg { }; =20 struct remote_connect_get_all_domain_stats_ret { - remote_domain_stats_record retStats; + remote_domain_stats_record retStats; }; =20 struct remote_domain_fsinfo { --=20 2.13.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list