[libvirt] [PATCH] remote generator: Increase upper limit on lists of node devices
by Boris Fiuczynski
On a system with 697 SCSI disks each configured with 8 paths the command
virsh nodedev-list fails with
error: Failed to list node devices
error: internal error: Too many node_devices '16816' for limit '16384'
Increasing the upper limit on lists of node devices from 16K to 64K.
Signed-off-by: Boris Fiuczynski <fiuczy(a)linux.vnet.ibm.com>
---
src/remote/remote_protocol.x | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/remote/remote_protocol.x b/src/remote/remote_protocol.x
index 68469a5..cd0a14c 100644
--- a/src/remote/remote_protocol.x
+++ b/src/remote/remote_protocol.x
@@ -86,7 +86,7 @@ const REMOTE_STORAGE_POOL_LIST_MAX = 4096;
const REMOTE_STORAGE_VOL_LIST_MAX = 16384;
/* Upper limit on lists of node devices. */
-const REMOTE_NODE_DEVICE_LIST_MAX = 16384;
+const REMOTE_NODE_DEVICE_LIST_MAX = 65536;
/* Upper limit on lists of node device capabilities. */
const REMOTE_NODE_DEVICE_CAPS_LIST_MAX = 65536;
--
2.5.5
7 years, 9 months
[libvirt] [PATCH v2 0/3] Add callback mech for qemu and nodedev
by John Ferlan
v1: http://www.redhat.com/archives/libvir-list/2017-February/msg00354.html
Changes since v1:
- Rather than calling the enumeration API from node_device_conf, return
the address of the enumeration API to the calling driver and let it
make the callback.
- If the enumeration callback doesn't exist add a failure to the registration
function
- Rather than fail when the registration add callback fails, just splat
a VIR_WARN message. Changed the remove code to use VIR_WARN instead
of VIR_DEBUG too
John Ferlan (3):
nodedev: Add driver callback mechanism to add/remove devices
qemu: Use nodedev callback mechanism to to get a nodedev data
qemu: Add configuration variable to control nodedev enumeration
src/check-aclrules.pl | 3 +-
src/check-driverimpls.pl | 1 +
src/conf/node_device_conf.c | 115 ++++++++++++++++++++++++++++++++++++-
src/conf/node_device_conf.h | 18 ++++++
src/libvirt_private.syms | 3 +
src/node_device/node_device_udev.c | 29 ++++++++++
src/qemu/libvirtd_qemu.aug | 1 +
src/qemu/qemu.conf | 19 ++++++
src/qemu/qemu_conf.c | 53 +++++++++++++++++
src/qemu/qemu_conf.h | 17 ++++++
src/qemu/qemu_driver.c | 46 +++++++++++++++
src/qemu/test_libvirtd_qemu.aug.in | 1 +
12 files changed, 304 insertions(+), 2 deletions(-)
--
2.7.4
7 years, 9 months
[libvirt] [PATCH] libxl: Resolve possible resource leak in dom0 maximum memory setting
by John Ferlan
If either the "if (STRPREFIX(mem_tokens[j], "max:"))" is never entered
or the "if (virStrToLong_ull(mem_tokens[j] + 4, &p, 10, maxmem) < 0)" break
is hit, control goes back to the outer loop processing 'cmd_tokens' and
it's possible that the 'mem_tokens' would be overwritten.
Found by Coverity
Signed-off-by: John Ferlan <jferlan(a)redhat.com>
---
Of course this is what led me down the path of the recently sent virusbmock
patch...
src/libxl/libxl_conf.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/libxl/libxl_conf.c b/src/libxl/libxl_conf.c
index 6ce2e0a..f5b788b 100644
--- a/src/libxl/libxl_conf.c
+++ b/src/libxl/libxl_conf.c
@@ -1622,6 +1622,7 @@ libxlDriverGetDom0MaxmemConf(libxlDriverConfigPtr cfg,
goto cleanup;
}
}
+ virStringListFree(mem_tokens);
}
physmem:
--
2.7.4
7 years, 9 months
[libvirt] [PATCH] tests: Link virusbmock with probes
by John Ferlan
Seeing similar error to commit id '997be5c27' with the inability
to find the libvirt_event_poll_purge_timeout_semaphore symbol
causing a virusbtest failure.
Signed-off-by: John Ferlan <jferlan(a)redhat.com>
---
This is a really strange one... I applied Michal's patches, the error
occurred. I rebuilt cleanly and the error went away. This morning after
apply the top of tree, the error returns. Just changing the Makefile.am
doesn't always "clean" up the error, but after a make clean and rebuild
the error goes away. Perhaps has to do with some build dependency on
the virusbmock that virusbtest has that somehow isn't being recognized
in the Makefile.am... But I'm not sure what magic incantation needs to
be levied at the Makefile.am in order to tell it to do the right thing!
tests/Makefile.am | 1 +
1 file changed, 1 insertion(+)
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 7149a86..32a7282 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -1204,6 +1204,7 @@ virusbmock_la_SOURCES = virusbmock.c
virusbmock_la_CFLAGS = $(AM_CFLAGS)
virusbmock_la_LDFLAGS = $(MOCKLIBS_LDFLAGS)
virusbmock_la_LIBADD = $(MOCKLIBS_LIBS) \
+ $(PROBES_O) \
../src/libvirt_util.la
virnetdevbandwidthmock_la_SOURCES = \
--
2.7.4
7 years, 9 months
[libvirt] [PATCH] Mention the min duration for nodesuspend explicitly
by Nitesh Konkar
Although currently this is documented in virsh man page
and virsh help, the expicit mention in the error message
is helful for tools using the API directly.
Signed-off-by: Nitesh Konkar <nitkon12(a)linux.vnet.ibm.com>
---
src/util/virnodesuspend.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/util/virnodesuspend.c b/src/util/virnodesuspend.c
index 8bb8d93..71b2d4c 100644
--- a/src/util/virnodesuspend.c
+++ b/src/util/virnodesuspend.c
@@ -76,7 +76,9 @@ static int virNodeSuspendSetNodeWakeup(unsigned long long alarmTime)
int ret = -1;
if (alarmTime < MIN_TIME_REQ_FOR_SUSPEND) {
- virReportError(VIR_ERR_INVALID_ARG, "%s", _("Suspend duration is too short"));
+ virReportError(VIR_ERR_INVALID_ARG,
+ _("Suspend duration is too short, must be at least %u seconds"),
+ MIN_TIME_REQ_FOR_SUSPEND);
return -1;
}
--
2.1.0
7 years, 9 months
[libvirt] [PATCH 0/3] storage: Fix FS pool destroy not unmounting its source
by Erik Skultety
The issue lies in how we check whether a FS is already mounted or not, we
compare the pool's source/target with source/target in the mount's binary
output both of which can actually be just symlinks to the same location yet
failing our check on the FS being mounted, thus reporting a strange error that
the pool's source is already mounted.
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1417203
Erik Skultety (3):
storage: Fix reporting an error on an already mounted filesystem
util: Introduce virFileComparePaths
storage: Fix checking whether source filesystem is mounted
src/libvirt_private.syms | 1 +
src/storage/storage_backend_fs.c | 25 ++++++++++++++--------
src/util/virfile.c | 45 ++++++++++++++++++++++++++++++++++++++++
src/util/virfile.h | 2 ++
4 files changed, 64 insertions(+), 9 deletions(-)
--
2.10.2
7 years, 9 months
[libvirt] [PATCH 0/4] Fixes for segmentation faults
by Marc Hartmayer
This patch series fixes some segmentation faults.
Marc Hartmayer (4):
qemu: Check if virQEMUCapsNewCopy(...) has failed
conf: Fix libvirtd free() segfault if virDomainChrSourceDefNew(...)
fails
util: reset the counters to zero
rpc: Fix potentially segfaults
src/conf/domain_conf.c | 2 +-
src/qemu/qemu_capabilities.c | 4 ++++
src/rpc/virnetserverservice.c | 20 +++++++++++---------
src/util/virnetdevip.c | 2 ++
4 files changed, 18 insertions(+), 10 deletions(-)
--
2.5.5
7 years, 9 months
[libvirt] [PATCH] remote generator: handle remoteDomainCreateWithFlags()
by Marc Hartmayer
This commit removes the handcrafted code for
remoteDomainCreateWithFlags() and lets it auto generate.
A little bit of history repeating...
Commit 03d813bbcd7b4a183601055006 removed the auto generation of
remoteDomainCreateWithFlags() because it was thought that the design
flaw in the remote protocol for virDomainCreate is also within the
remote protocol for virDomainCreateWithFlags. As the commit message of
ddaf15d7a3863d54e242f8ff75 mentions this is not the case therefore we
can auto generate the client part.
Even worse there was a typo in remoteDomainCreateWithFlags()
'remote_domain_create_with_flags_args ret;' but in fact it has to be
'remote_domain_create_with_flags_ret ret;'.
Signed-off-by: Marc Hartmayer <mhartmay(a)linux.vnet.ibm.com>
Reviewed-by: Bjoern Walk <bwalk(a)linux.vnet.ibm.com>
Reviewed-by: Boris Fiuczynski <fiuczy(a)linux.vnet.ibm.com>
---
src/remote/remote_driver.c | 29 -----------------------------
src/remote/remote_protocol.x | 2 +-
2 files changed, 1 insertion(+), 30 deletions(-)
diff --git a/src/remote/remote_driver.c b/src/remote/remote_driver.c
index 8880520..7be9f17 100644
--- a/src/remote/remote_driver.c
+++ b/src/remote/remote_driver.c
@@ -2627,35 +2627,6 @@ remoteDomainCreate(virDomainPtr domain)
return rv;
}
-static int
-remoteDomainCreateWithFlags(virDomainPtr dom, unsigned int flags)
-{
- int rv = -1;
- struct private_data *priv = dom->conn->privateData;
- remote_domain_create_with_flags_args args;
- remote_domain_create_with_flags_args ret;
-
- remoteDriverLock(priv);
-
- make_nonnull_domain(&args.dom, dom);
- args.flags = flags;
-
- memset(&ret, 0, sizeof(ret));
- if (call(dom->conn, priv, 0, REMOTE_PROC_DOMAIN_CREATE_WITH_FLAGS,
- (xdrproc_t)xdr_remote_domain_create_with_flags_args, (char *)&args,
- (xdrproc_t)xdr_remote_domain_create_with_flags_ret, (char *)&ret) == -1) {
- goto done;
- }
-
- dom->id = ret.dom.id;
- xdr_free((xdrproc_t) &xdr_remote_domain_create_with_flags_ret, (char *) &ret);
- rv = 0;
-
- done:
- remoteDriverUnlock(priv);
- return rv;
-}
-
static char *
remoteDomainGetSchedulerType(virDomainPtr domain, int *nparams)
{
diff --git a/src/remote/remote_protocol.x b/src/remote/remote_protocol.x
index e8382dc..5b594ea 100644
--- a/src/remote/remote_protocol.x
+++ b/src/remote/remote_protocol.x
@@ -4741,7 +4741,7 @@ enum remote_procedure {
REMOTE_PROC_DOMAIN_EVENT_IO_ERROR_REASON = 195,
/**
- * @generate: server
+ * @generate: both
* @acl: domain:start
*/
REMOTE_PROC_DOMAIN_CREATE_WITH_FLAGS = 196,
--
2.5.5
7 years, 9 months
[libvirt] [PATCH 0/5] Fix couple of memleaks
by Michal Privoznik
*** BLURB HERE ***
Michal Privoznik (5):
tests: Trace re-executing processes with valgrind
virusbmock: Link with libvirt_utils
testUSBList: don't leak @dev
qemuMonitorCPUModelInfoFree: Don't leak model_info->props
xenFoxenFormatXLDisk: Don't leak @target
src/qemu/qemu_monitor.c | 1 +
src/xenconfig/xen_xl.c | 5 +++--
tests/Makefile.am | 6 ++++--
tests/virusbtest.c | 1 +
4 files changed, 9 insertions(+), 4 deletions(-)
--
2.11.0
7 years, 9 months
[libvirt] [PATCH] Fix indentation in datatypes.h
by Nitesh Konkar
Signed-off-by: Nitesh Konkar <nitkon12(a)linux.vnet.ibm.com>
---
src/datatypes.h | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/datatypes.h b/src/datatypes.h
index 5830482..d525835 100644
--- a/src/datatypes.h
+++ b/src/datatypes.h
@@ -696,11 +696,11 @@ virStoragePoolPtr virGetStoragePool(virConnectPtr conn,
void *privateData,
virFreeCallback freeFunc);
virStorageVolPtr virGetStorageVol(virConnectPtr conn,
- const char *pool,
- const char *name,
- const char *key,
- void *privateData,
- virFreeCallback freeFunc);
+ const char *pool,
+ const char *name,
+ const char *key,
+ void *privateData,
+ virFreeCallback freeFunc);
virNodeDevicePtr virGetNodeDevice(virConnectPtr conn,
const char *name);
virSecretPtr virGetSecret(virConnectPtr conn,
--
2.1.0
7 years, 9 months