Bug 2117475
| Summary: | Can't set thread_pool_min/thread_pool_max by setIOThreadParams() | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 9 | Reporter: | lcheng |
| Component: | libvirt-python | Assignee: | Michal Privoznik <mprivozn> |
| Status: | CLOSED ERRATA | QA Contact: | lcheng |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 9.1 | CC: | jdenemar, lmen, pkrempa, virt-maint |
| Target Milestone: | rc | Keywords: | Triaged |
| Target Release: | --- | Flags: | pm-rhel:
mirror+
|
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | libvirt-python-8.5.0-2.el9 | Doc Type: | If docs needed, set a value |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2022-11-15 10:09:35 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
|
Description
lcheng
2022-08-11 06:10:48 UTC
This bug is fixed in libvirt-python v8.6.0 by:
commit b943a5bd18b4cc765719c0dbc628a077c3db4d52
Author: Michal Privoznik <mprivozn>
Date: Thu Jul 7 16:04:10 2022 +0200
Add VIR_DOMAIN_IOTHREAD_THREAD_POOL_{MIN,MAX} macros
The python version of virDomainSetIOThreadParams
(setIOThreadParams()), expects two arguments on input: the thread
ID and a dictionary which is then translated into our typed
parameters. During this translation we use a helper array which
holds type for each typed parameter supported
(virPyDomainSetIOThreadParams[]). Otherwise we guess what the
correct type is. Now, when introducing
VIR_DOMAIN_IOTHREAD_THREAD_POOL_{MIN,MAX} typed params into
libvirt I forgot to update the array. Do that now.
Signed-off-by: Michal Privoznik <mprivozn>
diff --git a/libvirt-override.c b/libvirt-override.c
index cba67d9..2a2a7dd 100644
--- a/libvirt-override.c
+++ b/libvirt-override.c
@@ -1695,6 +1695,10 @@ static virPyTypedParamsHint virPyDomainSetIOThreadParams[] = {
{ VIR_DOMAIN_IOTHREAD_POLL_MAX_NS, VIR_TYPED_PARAM_ULLONG },
{ VIR_DOMAIN_IOTHREAD_POLL_GROW, VIR_TYPED_PARAM_UINT },
{ VIR_DOMAIN_IOTHREAD_POLL_SHRINK, VIR_TYPED_PARAM_UINT },
+# if LIBVIR_CHECK_VERSION(8, 5, 0)
+ { VIR_DOMAIN_IOTHREAD_THREAD_POOL_MIN, VIR_TYPED_PARAM_INT },
+ { VIR_DOMAIN_IOTHREAD_THREAD_POOL_MAX, VIR_TYPED_PARAM_INT },
+# endif /* LIBVIR_CHECK_VERSION(8, 5, 0) */
};
v8.5.0-2-gb943a5b
Verified on python3-libvirt-8.5.0-2.el9.x86_64. 1. Set thread_pool_min/thread_pool_max. # python Python 3.9.13 (main, Jul 25 2022, 00:00:00) [GCC 11.3.1 20220421 (Red Hat 11.3.1-2)] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import libvirt >>> conn = libvirt.open() >>> dom = conn.lookupByName('vm1') >>> dom.setIOThreadParams(300, {'thread_pool_min': 6}, 0) 0 >>> dom.setIOThreadParams(300, {'thread_pool_max': 15}, 0) 0 2. Check thread_pool_min/thread_pool_max in xml. # virsh dumpxml vm1 ... <iothreads>1</iothreads> <iothreadids> <iothread id='300' thread_pool_min='6' thread_pool_max='15'/> </iothreadids> 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 (libvirt-python bug fix and enhancement update), 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://access.redhat.com/errata/RHBA-2022:8007 |