[libvirt] [PATCH RESEND] qemu: Add support for overriding max threads per process limit
by Jim Fehlig
Some VM configurations may result in a large number of threads created by
the associated qemu process which can exceed the system default limit. The
maximum number of threads allowed per process is controlled by the pids
cgroup controller and is set to 16k when creating VMs with systemd's
machined service. The maximum number of threads per process is recorded
in the pids.max file under the machine's pids controller cgroup hierarchy,
e.g.
$cgrp-mnt/pids/machine.slice/machine-qemu\\x2d1\\x2dtest.scope/pids.max
Maximum threads per process is controlled with the TasksMax property of
the systemd scope for the machine. This patch adds an option to qemu.conf
which can be used to override the maximum number of threads allowed per
qemu process. If the value of option is greater than zero, it will be set
in the TasksMax property of the machine's scope after creating the machine.
Signed-off-by: Jim Fehlig <jfehlig(a)suse.com>
---
Rebase and resend of
https://www.redhat.com/archives/libvir-list/2019-June/msg00185.html
src/lxc/lxc_cgroup.c | 1 +
src/qemu/libvirtd_qemu.aug | 1 +
src/qemu/qemu.conf | 10 ++++++++++
src/qemu/qemu_cgroup.c | 1 +
src/qemu/qemu_conf.c | 2 ++
src/qemu/qemu_conf.h | 1 +
src/qemu/test_libvirtd_qemu.aug.in | 1 +
src/util/vircgroup.c | 6 +++++-
src/util/vircgroup.h | 1 +
src/util/virsystemd.c | 24 +++++++++++++++++++++++-
src/util/virsystemd.h | 3 ++-
tests/virsystemdtest.c | 12 ++++++------
12 files changed, 54 insertions(+), 9 deletions(-)
diff --git a/src/lxc/lxc_cgroup.c b/src/lxc/lxc_cgroup.c
index d93a19d684..76014f3bfd 100644
--- a/src/lxc/lxc_cgroup.c
+++ b/src/lxc/lxc_cgroup.c
@@ -455,6 +455,7 @@ virCgroupPtr virLXCCgroupCreate(virDomainDefPtr def,
nnicindexes, nicindexes,
def->resource->partition,
-1,
+ 0,
&cgroup) < 0)
goto cleanup;
diff --git a/src/qemu/libvirtd_qemu.aug b/src/qemu/libvirtd_qemu.aug
index eea9094d39..2a99a0c55f 100644
--- a/src/qemu/libvirtd_qemu.aug
+++ b/src/qemu/libvirtd_qemu.aug
@@ -95,6 +95,7 @@ module Libvirtd_qemu =
| limits_entry "max_core"
| bool_entry "dump_guest_core"
| str_entry "stdio_handler"
+ | int_entry "max_threads_per_process"
let device_entry = bool_entry "mac_filter"
| bool_entry "relaxed_acs_check"
diff --git a/src/qemu/qemu.conf b/src/qemu/qemu.conf
index fd2ed9dc21..8cabeccacb 100644
--- a/src/qemu/qemu.conf
+++ b/src/qemu/qemu.conf
@@ -613,6 +613,16 @@
#max_processes = 0
#max_files = 0
+# If max_threads_per_process is set to a positive integer, libvirt
+# will use it to set the maximum number of threads that can be
+# created by a qemu process. Some VM configurations can result in
+# qemu processes with tens of thousands of threads. systemd-based
+# systems typically limit the number of threads per process to
+# 16k. max_threads_per_process can be used to override default
+# limits in the host OS.
+#
+#max_threads_per_process = 0
+
# If max_core is set to a non-zero integer, then QEMU will be
# permitted to create core dumps when it crashes, provided its
# RAM size is smaller than the limit set.
diff --git a/src/qemu/qemu_cgroup.c b/src/qemu/qemu_cgroup.c
index 19ca60905a..ecd96efb0a 100644
--- a/src/qemu/qemu_cgroup.c
+++ b/src/qemu/qemu_cgroup.c
@@ -929,6 +929,7 @@ qemuInitCgroup(virDomainObjPtr vm,
nnicindexes, nicindexes,
vm->def->resource->partition,
cfg->cgroupControllers,
+ cfg->maxThreadsPerProc,
&priv->cgroup) < 0) {
if (virCgroupNewIgnoreError())
goto done;
diff --git a/src/qemu/qemu_conf.c b/src/qemu/qemu_conf.c
index e0195dac29..71d0464c0d 100644
--- a/src/qemu/qemu_conf.c
+++ b/src/qemu/qemu_conf.c
@@ -670,6 +670,8 @@ virQEMUDriverConfigLoadProcessEntry(virQEMUDriverConfigPtr cfg,
return -1;
if (virConfGetValueUInt(conf, "max_files", &cfg->maxFiles) < 0)
return -1;
+ if (virConfGetValueUInt(conf, "max_threads_per_process", &cfg->maxThreadsPerProc) < 0)
+ return -1;
if (virConfGetValueType(conf, "max_core") == VIR_CONF_STRING) {
if (virConfGetValueString(conf, "max_core", &corestr) < 0)
diff --git a/src/qemu/qemu_conf.h b/src/qemu/qemu_conf.h
index 2229b76e89..d8e3bfe87c 100644
--- a/src/qemu/qemu_conf.h
+++ b/src/qemu/qemu_conf.h
@@ -162,6 +162,7 @@ struct _virQEMUDriverConfig {
unsigned int maxProcesses;
unsigned int maxFiles;
+ unsigned int maxThreadsPerProc;
unsigned long long maxCore;
bool dumpGuestCore;
diff --git a/src/qemu/test_libvirtd_qemu.aug.in b/src/qemu/test_libvirtd_qemu.aug.in
index 388ba24b8b..b3b44d42d9 100644
--- a/src/qemu/test_libvirtd_qemu.aug.in
+++ b/src/qemu/test_libvirtd_qemu.aug.in
@@ -76,6 +76,7 @@ module Test_libvirtd_qemu =
{ "set_process_name" = "1" }
{ "max_processes" = "0" }
{ "max_files" = "0" }
+{ "max_threads_per_process" = "0" }
{ "max_core" = "unlimited" }
{ "dump_guest_core" = "1" }
{ "mac_filter" = "1" }
diff --git a/src/util/vircgroup.c b/src/util/vircgroup.c
index f7afc2964d..9daf62795e 100644
--- a/src/util/vircgroup.c
+++ b/src/util/vircgroup.c
@@ -1118,6 +1118,7 @@ virCgroupNewMachineSystemd(const char *name,
int *nicindexes,
const char *partition,
int controllers,
+ unsigned int maxthreads,
virCgroupPtr *group)
{
int rv;
@@ -1134,7 +1135,8 @@ virCgroupNewMachineSystemd(const char *name,
isContainer,
nnicindexes,
nicindexes,
- partition)) < 0)
+ partition,
+ maxthreads)) < 0)
return rv;
if (controllers != -1)
@@ -1246,6 +1248,7 @@ virCgroupNewMachine(const char *name,
int *nicindexes,
const char *partition,
int controllers,
+ unsigned int maxthreads,
virCgroupPtr *group)
{
int rv;
@@ -1262,6 +1265,7 @@ virCgroupNewMachine(const char *name,
nicindexes,
partition,
controllers,
+ maxthreads,
group)) == 0)
return 0;
diff --git a/src/util/vircgroup.h b/src/util/vircgroup.h
index 2f68fdb685..3eefe78787 100644
--- a/src/util/vircgroup.h
+++ b/src/util/vircgroup.h
@@ -98,6 +98,7 @@ int virCgroupNewMachine(const char *name,
int *nicindexes,
const char *partition,
int controllers,
+ unsigned int maxthreads,
virCgroupPtr *group)
ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2)
ATTRIBUTE_NONNULL(3);
diff --git a/src/util/virsystemd.c b/src/util/virsystemd.c
index f6c5adc5ef..1cb8874403 100644
--- a/src/util/virsystemd.c
+++ b/src/util/virsystemd.c
@@ -252,12 +252,14 @@ int virSystemdCreateMachine(const char *name,
bool iscontainer,
size_t nnicindexes,
int *nicindexes,
- const char *partition)
+ const char *partition,
+ unsigned int maxthreads)
{
int ret;
DBusConnection *conn;
char *creatorname = NULL;
char *slicename = NULL;
+ char *scopename = NULL;
static int hasCreateWithNetwork = 1;
if ((ret = virSystemdHasMachined()) < 0)
@@ -403,11 +405,31 @@ int virSystemdCreateMachine(const char *name,
goto cleanup;
}
+ if (maxthreads > 0) {
+ if (!(scopename = virSystemdMakeScopeName(name, drivername, false)))
+ goto cleanup;
+
+ if (virDBusCallMethod(conn,
+ NULL,
+ NULL,
+ "org.freedesktop.systemd1",
+ "/org/freedesktop/systemd1",
+ "org.freedesktop.systemd1.Manager",
+ "SetUnitProperties",
+ "sba(sv)",
+ scopename,
+ true,
+ 1,
+ "TasksMax", "t", (uint64_t)maxthreads) < 0)
+ goto cleanup;
+ }
+
ret = 0;
cleanup:
VIR_FREE(creatorname);
VIR_FREE(slicename);
+ VIR_FREE(scopename);
return ret;
}
diff --git a/src/util/virsystemd.h b/src/util/virsystemd.h
index 5d56c78835..96626f8fff 100644
--- a/src/util/virsystemd.h
+++ b/src/util/virsystemd.h
@@ -50,7 +50,8 @@ int virSystemdCreateMachine(const char *name,
bool iscontainer,
size_t nnicindexes,
int *nicindexes,
- const char *partition);
+ const char *partition,
+ unsigned int maxthreads);
int virSystemdTerminateMachine(const char *name);
diff --git a/tests/virsystemdtest.c b/tests/virsystemdtest.c
index 7aaa8f97fa..340b038095 100644
--- a/tests/virsystemdtest.c
+++ b/tests/virsystemdtest.c
@@ -175,7 +175,7 @@ static int testCreateContainer(const void *opaque ATTRIBUTE_UNUSED)
123,
true,
0, NULL,
- "highpriority.slice") < 0) {
+ "highpriority.slice", 0) < 0) {
fprintf(stderr, "%s", "Failed to create LXC machine\n");
return -1;
}
@@ -208,7 +208,7 @@ static int testCreateMachine(const void *opaque ATTRIBUTE_UNUSED)
123,
false,
0, NULL,
- NULL) < 0) {
+ NULL, 0) < 0) {
fprintf(stderr, "%s", "Failed to create KVM machine\n");
return -1;
}
@@ -245,7 +245,7 @@ static int testCreateNoSystemd(const void *opaque ATTRIBUTE_UNUSED)
123,
false,
0, NULL,
- NULL)) == 0) {
+ NULL, 0)) == 0) {
unsetenv("FAIL_NO_SERVICE");
fprintf(stderr, "%s", "Unexpected create machine success\n");
return -1;
@@ -279,7 +279,7 @@ static int testCreateSystemdNotRunning(const void *opaque ATTRIBUTE_UNUSED)
123,
false,
0, NULL,
- NULL)) == 0) {
+ NULL, 0)) == 0) {
unsetenv("FAIL_NOT_REGISTERED");
fprintf(stderr, "%s", "Unexpected create machine success\n");
return -1;
@@ -313,7 +313,7 @@ static int testCreateBadSystemd(const void *opaque ATTRIBUTE_UNUSED)
123,
false,
0, NULL,
- NULL)) == 0) {
+ NULL, 0)) == 0) {
unsetenv("FAIL_BAD_SERVICE");
fprintf(stderr, "%s", "Unexpected create machine success\n");
return -1;
@@ -348,7 +348,7 @@ static int testCreateNetwork(const void *opaque ATTRIBUTE_UNUSED)
123,
true,
nnicindexes, nicindexes,
- "highpriority.slice") < 0) {
+ "highpriority.slice", 0) < 0) {
fprintf(stderr, "%s", "Failed to create LXC machine\n");
return -1;
}
--
2.22.0
5 years, 5 months
[libvirt] [PATCH 0/3] cgroups v2 fixes
by Pavel Hrdina
Pavel Hrdina (3):
vircgroup: fix cgroups v2 controllers detection
vircgroupv2: store enabled controllers
vircgroupv2: remove ATTRIBUTE_UNUSED for used attribute
src/util/vircgroup.c | 2 +-
src/util/vircgroupbackend.h | 3 ++-
src/util/vircgroupv1.c | 3 ++-
src/util/vircgroupv2.c | 36 ++++++++++++++++++++++++------------
4 files changed, 29 insertions(+), 15 deletions(-)
--
2.21.0
5 years, 5 months
[libvirt] [PATCH v9 00/13] Checkpoint APIs (incremental backup saga)
by Eric Blake
This is a subset of v9 of incremental backup, fixing most of the
review comments that Peter gave on v8.5. The qemu portions in
patch 11 and 12 could probably still use some cleanups to address
feedback in v8 and v8.5; and I also intend to post a followup
series for the backup APIs on Monday to form the full backup-v9
tag.
Here's a comparison of these patches to v8.5:
- rebase on top of master, and on top of my series '[0/8] more
snapshot improvements':
https://www.redhat.com/archives/libvir-list/2019-July/msg00224.html
- add interlock error between snapshots and checkpoints: until we
finish the design of how those two will interact, it's easier to
ensure we don't let the user get into a weird state that we will
then be stuck with supporting down the road
- avoid some technical debt; Peter pointed out several places to
improve, and I've done a lot of those (there's probably still more
that can be done, but at least 1-10 feel more polished)
- Rework the notion of a current checkpoint. We are stuck with a
domain having a single current snapshot, and my implementation for
qemu happens to use a single current checkpoint, but Peter pointed
out that other hypervisors might have multiple current snapshots.
As such, I deleted the API virDomainSnapshotCurrent (which could
only report just one) and instead replaced it with new filter
flags for virDomainListAllSnapshots
- With a current checkpoint being exposed in the XML, there were lots
of simplifications to virsh (no longer possible to change which
checkpoint is current by abuse of redefine)
- With current checkpoint in the public XML, there is no longer a need
for a PARSE_INTERNAL or FORMAT_INTERNAL flag
- Add testsuite coverage of the test_driver checkpoint implementation
(which in turn allowed me to fine-tune several of the other patches
based on what it turned up) (see patch 10)
- Fix several typos/grammars/copy-paste leftovers
- defer virDomainCheckpointIsCurrent to a later patch (see patch 13);
we may decide we don't need the API and that parsing XML frrom
virDomainCheckpointGetXMLDesc is sufficient
001/13:[0068] [FC] 'backup: Document new XML for checkpoints'
002/13:[0186] [FC] 'backup: Introduce virDomainCheckpoint APIs'
003/13:[0021] [FC] 'backup: Document nuances between different state capture APIs'
004/13:[0099] [FC] 'backup: Parse and output checkpoint XML'
005/13:[0070] [FC] 'backup: Allow for lists of checkpoint objects'
006/13:[----] [--] 'backup: Add new domain:checkpoint access control'
007/13:[0072] [FC] 'backup: Implement checkpoint APIs for remote driver'
008/13:[0527] [FC] 'backup: Implement virsh support for checkpoints'
009/13:[0097] [FC] 'backup: test: Implement metadata tracking for checkpoint APIs'
010/13:[down] 'backup: Add virsh-checkpoints test'
011/13:[0132] [FC] 'backup: qemu: Implement metadata tracking for checkpoint APIs'
012/13:[----] [-C] 'backup: Wire up qemu checkpoint commands over QMP'
013/13:[down] 'backup: Add virDomainCheckpointIsCurrent API'
Eric Blake (13):
backup: Document new XML for checkpoints
backup: Introduce virDomainCheckpoint APIs
backup: Document nuances between different state capture APIs
backup: Parse and output checkpoint XML
backup: Allow for lists of checkpoint objects
backup: Add new domain:checkpoint access control
backup: Implement checkpoint APIs for remote driver
backup: Implement virsh support for checkpoints
backup: test: Implement metadata tracking for checkpoint APIs
backup: Add virsh-checkpoints test
backup: qemu: Implement metadata tracking for checkpoint APIs
backup: Wire up qemu checkpoint commands over QMP
backup: Add virDomainCheckpointIsCurrent API
include/libvirt/libvirt-domain-checkpoint.h | 147 ++
include/libvirt/libvirt-domain.h | 6 +
include/libvirt/libvirt.h | 5 +-
src/access/viraccessperm.h | 6 +
src/conf/checkpoint_conf.h | 93 ++
src/conf/domain_conf.h | 2 +
src/conf/virconftypes.h | 9 +
src/conf/virdomaincheckpointobjlist.h | 74 +
src/conf/virdomainmomentobjlist.h | 5 +-
src/conf/virdomainobjlist.h | 7 +-
src/driver-hypervisor.h | 43 +
src/qemu/qemu_block.h | 3 +
src/qemu/qemu_conf.h | 2 +
src/qemu/qemu_domain.h | 15 +
tools/virsh-checkpoint.h | 26 +
tools/virsh-completer.h | 4 +
tools/virsh-util.h | 3 +
tools/virsh.h | 1 +
docs/Makefile.am | 3 +
docs/apibuild.py | 2 +
docs/docs.html.in | 9 +-
docs/domainstatecapture.html.in | 314 +++++
docs/format.html.in | 1 +
docs/formatcheckpoint.html.in | 220 +++
docs/formatsnapshot.html.in | 6 +-
docs/index.html.in | 3 +-
docs/schemas/domaincheckpoint.rng | 95 ++
libvirt.spec.in | 2 +
mingw-libvirt.spec.in | 4 +
po/POTFILES | 3 +
src/Makefile.am | 2 +
src/access/viraccessperm.c | 3 +-
src/conf/Makefile.inc.am | 4 +
src/conf/checkpoint_conf.c | 630 +++++++++
src/conf/domain_conf.c | 6 +
src/conf/virdomaincheckpointobjlist.c | 232 ++++
src/conf/virdomainmomentobjlist.c | 2 +-
src/conf/virdomainobjlist.c | 11 +
src/libvirt-domain-checkpoint.c | 624 +++++++++
src/libvirt-domain.c | 19 +-
src/libvirt_private.syms | 26 +
src/libvirt_public.syms | 17 +
src/qemu/qemu_block.c | 12 +
src/qemu/qemu_conf.c | 5 +
src/qemu/qemu_domain.c | 182 +++
src/qemu/qemu_driver.c | 787 +++++++++++
src/remote/remote_daemon_dispatch.c | 20 +
src/remote/remote_driver.c | 25 +-
src/remote/remote_protocol.x | 139 +-
src/remote_protocol-structs | 77 ++
src/rpc/gendispatch.pl | 32 +-
src/test/test_driver.c | 415 ++++++
tests/Makefile.am | 12 +-
tests/qemudomaincheckpointxml2xmlin/empty.xml | 1 +
.../qemudomaincheckpointxml2xmlin/sample.xml | 7 +
tests/qemudomaincheckpointxml2xmlin/size.xml | 4 +
.../qemudomaincheckpointxml2xmlout/empty.xml | 8 +
.../internal-active-invalid.xml | 53 +
.../internal-inactive-invalid.xml | 53 +
.../redefine.xml | 64 +
.../qemudomaincheckpointxml2xmlout/sample.xml | 13 +
tests/qemudomaincheckpointxml2xmlout/size.xml | 12 +
tests/qemudomaincheckpointxml2xmltest.c | 213 +++
tests/virschematest.c | 2 +
tests/virsh-checkpoint | 181 +++
tests/virsh-snapshot | 12 +-
tools/Makefile.am | 1 +
tools/virsh-checkpoint.c | 1215 +++++++++++++++++
tools/virsh-completer.c | 51 +
tools/virsh-domain-monitor.c | 23 +
tools/virsh-domain.c | 7 +
tools/virsh-util.c | 11 +
tools/virsh.c | 2 +
tools/virsh.pod | 221 ++-
74 files changed, 6508 insertions(+), 41 deletions(-)
create mode 100644 include/libvirt/libvirt-domain-checkpoint.h
create mode 100644 src/conf/checkpoint_conf.h
create mode 100644 src/conf/virdomaincheckpointobjlist.h
create mode 100644 tools/virsh-checkpoint.h
create mode 100644 docs/domainstatecapture.html.in
create mode 100644 docs/formatcheckpoint.html.in
create mode 100644 docs/schemas/domaincheckpoint.rng
create mode 100644 src/conf/checkpoint_conf.c
create mode 100644 src/conf/virdomaincheckpointobjlist.c
create mode 100644 src/libvirt-domain-checkpoint.c
create mode 100644 tests/qemudomaincheckpointxml2xmlin/empty.xml
create mode 100644 tests/qemudomaincheckpointxml2xmlin/sample.xml
create mode 100644 tests/qemudomaincheckpointxml2xmlin/size.xml
create mode 100644 tests/qemudomaincheckpointxml2xmlout/empty.xml
create mode 100644 tests/qemudomaincheckpointxml2xmlout/internal-active-invalid.xml
create mode 100644 tests/qemudomaincheckpointxml2xmlout/internal-inactive-invalid.xml
create mode 100644 tests/qemudomaincheckpointxml2xmlout/redefine.xml
create mode 100644 tests/qemudomaincheckpointxml2xmlout/sample.xml
create mode 100644 tests/qemudomaincheckpointxml2xmlout/size.xml
create mode 100644 tests/qemudomaincheckpointxml2xmltest.c
create mode 100755 tests/virsh-checkpoint
create mode 100644 tools/virsh-checkpoint.c
--
2.20.1
5 years, 5 months
[libvirt] [PATCH 0/4] Couple of recent things from Coverity
by John Ferlan
Some patches from recent changes for things Coverity has complained about
John Ferlan (4):
qemu: Remove unnecessary check in qemuMonitorJSONGetJobInfoOne
test: Return early in testQueryJobs
util: Avoid possible error in virCommandMassClose
tests: Avoid possible error in testExecRestart
src/qemu/qemu_monitor_json.c | 3 ---
src/util/vircommand.c | 2 +-
tests/qemumonitorjsontest.c | 3 +++
tests/virnetdaemontest.c | 9 +++++----
4 files changed, 9 insertions(+), 8 deletions(-)
--
2.20.1
5 years, 5 months
[libvirt] [dockerfiles PATCH 0/4] Add libosinfo Dockerfiles
by Fabiano Fidêncio
This patch series aims to add libosinfo Dockerfiles to this project, so
those containers can be used by libosinfo projects' gitlab CI.
Please, take a look at each patch for more context of what has been done.
Fabiano Fidêncio (4):
refresh: Fix typo: ingores -> ignored
refresh: Learn how to deal with the project's name
refresh: Add libosinfo project
Add Dockerfiles for libosinfo project
buildenv-libosinfo-centos-7.Dockerfile | 44 +++++++++++++
...bosinfo-debian-10-cross-aarch64.Dockerfile | 65 +++++++++++++++++++
...ibosinfo-debian-10-cross-armv6l.Dockerfile | 65 +++++++++++++++++++
...ibosinfo-debian-10-cross-armv7l.Dockerfile | 65 +++++++++++++++++++
...-libosinfo-debian-10-cross-i686.Dockerfile | 65 +++++++++++++++++++
...-libosinfo-debian-10-cross-mips.Dockerfile | 65 +++++++++++++++++++
...osinfo-debian-10-cross-mips64el.Dockerfile | 65 +++++++++++++++++++
...ibosinfo-debian-10-cross-mipsel.Dockerfile | 65 +++++++++++++++++++
...bosinfo-debian-10-cross-ppc64le.Dockerfile | 65 +++++++++++++++++++
...libosinfo-debian-10-cross-s390x.Dockerfile | 65 +++++++++++++++++++
buildenv-libosinfo-debian-10.Dockerfile | 51 +++++++++++++++
...ibosinfo-debian-9-cross-aarch64.Dockerfile | 65 +++++++++++++++++++
...libosinfo-debian-9-cross-armv6l.Dockerfile | 65 +++++++++++++++++++
...libosinfo-debian-9-cross-armv7l.Dockerfile | 65 +++++++++++++++++++
...v-libosinfo-debian-9-cross-mips.Dockerfile | 65 +++++++++++++++++++
...bosinfo-debian-9-cross-mips64el.Dockerfile | 65 +++++++++++++++++++
...libosinfo-debian-9-cross-mipsel.Dockerfile | 65 +++++++++++++++++++
...ibosinfo-debian-9-cross-ppc64le.Dockerfile | 65 +++++++++++++++++++
...-libosinfo-debian-9-cross-s390x.Dockerfile | 65 +++++++++++++++++++
buildenv-libosinfo-debian-9.Dockerfile | 51 +++++++++++++++
...osinfo-debian-sid-cross-aarch64.Dockerfile | 65 +++++++++++++++++++
...bosinfo-debian-sid-cross-armv6l.Dockerfile | 65 +++++++++++++++++++
...bosinfo-debian-sid-cross-armv7l.Dockerfile | 65 +++++++++++++++++++
...libosinfo-debian-sid-cross-i686.Dockerfile | 65 +++++++++++++++++++
...libosinfo-debian-sid-cross-mips.Dockerfile | 65 +++++++++++++++++++
...sinfo-debian-sid-cross-mips64el.Dockerfile | 65 +++++++++++++++++++
...bosinfo-debian-sid-cross-mipsel.Dockerfile | 65 +++++++++++++++++++
...osinfo-debian-sid-cross-ppc64le.Dockerfile | 65 +++++++++++++++++++
...ibosinfo-debian-sid-cross-s390x.Dockerfile | 65 +++++++++++++++++++
buildenv-libosinfo-debian-sid.Dockerfile | 51 +++++++++++++++
buildenv-libosinfo-fedora-29.Dockerfile | 50 ++++++++++++++
buildenv-libosinfo-fedora-30.Dockerfile | 50 ++++++++++++++
buildenv-libosinfo-fedora-rawhide.Dockerfile | 64 ++++++++++++++++++
buildenv-libosinfo-ubuntu-16.Dockerfile | 51 +++++++++++++++
buildenv-libosinfo-ubuntu-18.Dockerfile | 51 +++++++++++++++
...le => buildenv-libvirt-centos-7.Dockerfile | 0
...libvirt-debian-10-cross-aarch64.Dockerfile | 0
...-libvirt-debian-10-cross-armv6l.Dockerfile | 0
...-libvirt-debian-10-cross-armv7l.Dockerfile | 0
...nv-libvirt-debian-10-cross-i686.Dockerfile | 0
...nv-libvirt-debian-10-cross-mips.Dockerfile | 0
...ibvirt-debian-10-cross-mips64el.Dockerfile | 0
...-libvirt-debian-10-cross-mipsel.Dockerfile | 0
...libvirt-debian-10-cross-ppc64le.Dockerfile | 0
...v-libvirt-debian-10-cross-s390x.Dockerfile | 0
...e => buildenv-libvirt-debian-10.Dockerfile | 0
...-libvirt-debian-9-cross-aarch64.Dockerfile | 0
...v-libvirt-debian-9-cross-armv6l.Dockerfile | 0
...v-libvirt-debian-9-cross-armv7l.Dockerfile | 0
...env-libvirt-debian-9-cross-mips.Dockerfile | 0
...libvirt-debian-9-cross-mips64el.Dockerfile | 0
...v-libvirt-debian-9-cross-mipsel.Dockerfile | 0
...-libvirt-debian-9-cross-ppc64le.Dockerfile | 0
...nv-libvirt-debian-9-cross-s390x.Dockerfile | 0
...le => buildenv-libvirt-debian-9.Dockerfile | 0
...ibvirt-debian-sid-cross-aarch64.Dockerfile | 0
...libvirt-debian-sid-cross-armv6l.Dockerfile | 0
...libvirt-debian-sid-cross-armv7l.Dockerfile | 0
...v-libvirt-debian-sid-cross-i686.Dockerfile | 0
...v-libvirt-debian-sid-cross-mips.Dockerfile | 0
...bvirt-debian-sid-cross-mips64el.Dockerfile | 0
...libvirt-debian-sid-cross-mipsel.Dockerfile | 0
...ibvirt-debian-sid-cross-ppc64le.Dockerfile | 0
...-libvirt-debian-sid-cross-s390x.Dockerfile | 0
... => buildenv-libvirt-debian-sid.Dockerfile | 0
...e => buildenv-libvirt-fedora-29.Dockerfile | 0
...e => buildenv-libvirt-fedora-30.Dockerfile | 0
...buildenv-libvirt-fedora-rawhide.Dockerfile | 0
...e => buildenv-libvirt-ubuntu-16.Dockerfile | 0
...e => buildenv-libvirt-ubuntu-18.Dockerfile | 0
refresh | 60 +++++++++++++----
71 files changed, 2201 insertions(+), 12 deletions(-)
create mode 100644 buildenv-libosinfo-centos-7.Dockerfile
create mode 100644 buildenv-libosinfo-debian-10-cross-aarch64.Dockerfile
create mode 100644 buildenv-libosinfo-debian-10-cross-armv6l.Dockerfile
create mode 100644 buildenv-libosinfo-debian-10-cross-armv7l.Dockerfile
create mode 100644 buildenv-libosinfo-debian-10-cross-i686.Dockerfile
create mode 100644 buildenv-libosinfo-debian-10-cross-mips.Dockerfile
create mode 100644 buildenv-libosinfo-debian-10-cross-mips64el.Dockerfile
create mode 100644 buildenv-libosinfo-debian-10-cross-mipsel.Dockerfile
create mode 100644 buildenv-libosinfo-debian-10-cross-ppc64le.Dockerfile
create mode 100644 buildenv-libosinfo-debian-10-cross-s390x.Dockerfile
create mode 100644 buildenv-libosinfo-debian-10.Dockerfile
create mode 100644 buildenv-libosinfo-debian-9-cross-aarch64.Dockerfile
create mode 100644 buildenv-libosinfo-debian-9-cross-armv6l.Dockerfile
create mode 100644 buildenv-libosinfo-debian-9-cross-armv7l.Dockerfile
create mode 100644 buildenv-libosinfo-debian-9-cross-mips.Dockerfile
create mode 100644 buildenv-libosinfo-debian-9-cross-mips64el.Dockerfile
create mode 100644 buildenv-libosinfo-debian-9-cross-mipsel.Dockerfile
create mode 100644 buildenv-libosinfo-debian-9-cross-ppc64le.Dockerfile
create mode 100644 buildenv-libosinfo-debian-9-cross-s390x.Dockerfile
create mode 100644 buildenv-libosinfo-debian-9.Dockerfile
create mode 100644 buildenv-libosinfo-debian-sid-cross-aarch64.Dockerfile
create mode 100644 buildenv-libosinfo-debian-sid-cross-armv6l.Dockerfile
create mode 100644 buildenv-libosinfo-debian-sid-cross-armv7l.Dockerfile
create mode 100644 buildenv-libosinfo-debian-sid-cross-i686.Dockerfile
create mode 100644 buildenv-libosinfo-debian-sid-cross-mips.Dockerfile
create mode 100644 buildenv-libosinfo-debian-sid-cross-mips64el.Dockerfile
create mode 100644 buildenv-libosinfo-debian-sid-cross-mipsel.Dockerfile
create mode 100644 buildenv-libosinfo-debian-sid-cross-ppc64le.Dockerfile
create mode 100644 buildenv-libosinfo-debian-sid-cross-s390x.Dockerfile
create mode 100644 buildenv-libosinfo-debian-sid.Dockerfile
create mode 100644 buildenv-libosinfo-fedora-29.Dockerfile
create mode 100644 buildenv-libosinfo-fedora-30.Dockerfile
create mode 100644 buildenv-libosinfo-fedora-rawhide.Dockerfile
create mode 100644 buildenv-libosinfo-ubuntu-16.Dockerfile
create mode 100644 buildenv-libosinfo-ubuntu-18.Dockerfile
rename buildenv-centos-7.Dockerfile => buildenv-libvirt-centos-7.Dockerfile (100%)
rename buildenv-debian-10-cross-aarch64.Dockerfile => buildenv-libvirt-debian-10-cross-aarch64.Dockerfile (100%)
rename buildenv-debian-10-cross-armv6l.Dockerfile => buildenv-libvirt-debian-10-cross-armv6l.Dockerfile (100%)
rename buildenv-debian-10-cross-armv7l.Dockerfile => buildenv-libvirt-debian-10-cross-armv7l.Dockerfile (100%)
rename buildenv-debian-10-cross-i686.Dockerfile => buildenv-libvirt-debian-10-cross-i686.Dockerfile (100%)
rename buildenv-debian-10-cross-mips.Dockerfile => buildenv-libvirt-debian-10-cross-mips.Dockerfile (100%)
rename buildenv-debian-10-cross-mips64el.Dockerfile => buildenv-libvirt-debian-10-cross-mips64el.Dockerfile (100%)
rename buildenv-debian-10-cross-mipsel.Dockerfile => buildenv-libvirt-debian-10-cross-mipsel.Dockerfile (100%)
rename buildenv-debian-10-cross-ppc64le.Dockerfile => buildenv-libvirt-debian-10-cross-ppc64le.Dockerfile (100%)
rename buildenv-debian-10-cross-s390x.Dockerfile => buildenv-libvirt-debian-10-cross-s390x.Dockerfile (100%)
rename buildenv-debian-10.Dockerfile => buildenv-libvirt-debian-10.Dockerfile (100%)
rename buildenv-debian-9-cross-aarch64.Dockerfile => buildenv-libvirt-debian-9-cross-aarch64.Dockerfile (100%)
rename buildenv-debian-9-cross-armv6l.Dockerfile => buildenv-libvirt-debian-9-cross-armv6l.Dockerfile (100%)
rename buildenv-debian-9-cross-armv7l.Dockerfile => buildenv-libvirt-debian-9-cross-armv7l.Dockerfile (100%)
rename buildenv-debian-9-cross-mips.Dockerfile => buildenv-libvirt-debian-9-cross-mips.Dockerfile (100%)
rename buildenv-debian-9-cross-mips64el.Dockerfile => buildenv-libvirt-debian-9-cross-mips64el.Dockerfile (100%)
rename buildenv-debian-9-cross-mipsel.Dockerfile => buildenv-libvirt-debian-9-cross-mipsel.Dockerfile (100%)
rename buildenv-debian-9-cross-ppc64le.Dockerfile => buildenv-libvirt-debian-9-cross-ppc64le.Dockerfile (100%)
rename buildenv-debian-9-cross-s390x.Dockerfile => buildenv-libvirt-debian-9-cross-s390x.Dockerfile (100%)
rename buildenv-debian-9.Dockerfile => buildenv-libvirt-debian-9.Dockerfile (100%)
rename buildenv-debian-sid-cross-aarch64.Dockerfile => buildenv-libvirt-debian-sid-cross-aarch64.Dockerfile (100%)
rename buildenv-debian-sid-cross-armv6l.Dockerfile => buildenv-libvirt-debian-sid-cross-armv6l.Dockerfile (100%)
rename buildenv-debian-sid-cross-armv7l.Dockerfile => buildenv-libvirt-debian-sid-cross-armv7l.Dockerfile (100%)
rename buildenv-debian-sid-cross-i686.Dockerfile => buildenv-libvirt-debian-sid-cross-i686.Dockerfile (100%)
rename buildenv-debian-sid-cross-mips.Dockerfile => buildenv-libvirt-debian-sid-cross-mips.Dockerfile (100%)
rename buildenv-debian-sid-cross-mips64el.Dockerfile => buildenv-libvirt-debian-sid-cross-mips64el.Dockerfile (100%)
rename buildenv-debian-sid-cross-mipsel.Dockerfile => buildenv-libvirt-debian-sid-cross-mipsel.Dockerfile (100%)
rename buildenv-debian-sid-cross-ppc64le.Dockerfile => buildenv-libvirt-debian-sid-cross-ppc64le.Dockerfile (100%)
rename buildenv-debian-sid-cross-s390x.Dockerfile => buildenv-libvirt-debian-sid-cross-s390x.Dockerfile (100%)
rename buildenv-debian-sid.Dockerfile => buildenv-libvirt-debian-sid.Dockerfile (100%)
rename buildenv-fedora-29.Dockerfile => buildenv-libvirt-fedora-29.Dockerfile (100%)
rename buildenv-fedora-30.Dockerfile => buildenv-libvirt-fedora-30.Dockerfile (100%)
rename buildenv-fedora-rawhide.Dockerfile => buildenv-libvirt-fedora-rawhide.Dockerfile (100%)
rename buildenv-ubuntu-16.Dockerfile => buildenv-libvirt-ubuntu-16.Dockerfile (100%)
rename buildenv-ubuntu-18.Dockerfile => buildenv-libvirt-ubuntu-18.Dockerfile (100%)
--
2.21.0
5 years, 5 months
[libvirt] [PATCH 0/8] qemu: blockdevize qemuDomainGetBlockJobInfo and qemuDomainBlockJobAbort (blockdev-add saga)
by Peter Krempa
In the effort to use blockdev we need a few tweaks for the support APIs.
Peter Krempa (8):
qemu: driver: blockdevize qemuDomainGetBlockJobInfo
qemu: Make checks in qemuDomainBlockPivot depend on data of the job
qemu: blockjob: Add block job states for abort and pivot operations
qemu: Use QEMU_BLOCKJOB_STATE_PIVOTING/ABORTING in
qemuDomainBlockJobAbort
qemu: driver: Report error if pivoting fails in
qemuDomainBlockJobAbort
qemu: driver: Blockdevize qemuDomainBlockJobAbort/Pivot
qemu: Remove stale comment outlining how to extend
qemuDomainBlockPivot
qemu: driver: Remove semi-stale comment about asynchronous job abort
src/qemu/qemu_blockjob.c | 13 +++++-
src/qemu/qemu_blockjob.h | 2 +
src/qemu/qemu_driver.c | 88 ++++++++++++++++++++++++++--------------
src/qemu/qemu_monitor.c | 2 +-
4 files changed, 72 insertions(+), 33 deletions(-)
--
2.21.0
5 years, 5 months
[libvirt] [PATCH] build: bump min libxml2 to 2.9.1
by Daniel P. Berrangé
The various distros have the following libxml2 vesions:
CentOS 7: 2.9.1
Debian Stretch: 2.9.4
FreeBSD Ports: 2.9.9
Ubuntu 16.04 LTS: 2.9.3
Based on this sampling, we can reasonably bump libxml2 min
version to 2.9.1
The 'query_raw' struct field was added in version 2.6.28,
so can be assumed to exist.
Signed-off-by: Daniel P. Berrangé <berrange(a)redhat.com>
---
m4/virt-libxml.m4 | 18 ++----------------
src/util/viruri.c | 9 ---------
tests/viruritest.c | 8 --------
3 files changed, 2 insertions(+), 33 deletions(-)
diff --git a/m4/virt-libxml.m4 b/m4/virt-libxml.m4
index 65012d506a..9aefbdc3f1 100644
--- a/m4/virt-libxml.m4
+++ b/m4/virt-libxml.m4
@@ -18,31 +18,17 @@ dnl <http://www.gnu.org/licenses/>.
dnl
AC_DEFUN([LIBVIRT_ARG_LIBXML], [
- LIBVIRT_ARG_WITH([LIBXML], [libxml-2.0 (>= 2.6.0) location], [check])
+ LIBVIRT_ARG_WITH([LIBXML], [libxml-2.0 (>= 2.9.1) location], [check])
])
AC_DEFUN([LIBVIRT_CHECK_LIBXML], [
- LIBXML_REQUIRED="2.6.0"
+ LIBXML_REQUIRED="2.9.1"
LIBVIRT_CHECK_PKG([LIBXML], [libxml-2.0], [$LIBXML_REQUIRED])
if test "$with_libxml" = "no" ; then
AC_MSG_ERROR([libxml2 >= $LIBXML_REQUIRED is required for libvirt])
fi
-
- dnl xmlURI structure has query_raw?
- old_CFLAGS="$CFLAGS"
- old_LIBS="$LIBS"
- CFLAGS="$CFLAGS $LIBXML_CFLAGS"
- LIBS="$LIBS $LIBXML_LIBS"
-
- AC_CHECK_MEMBER([struct _xmlURI.query_raw],
- [AC_DEFINE([HAVE_XMLURI_QUERY_RAW], [1],
- [Have query_raw field in libxml2 xmlURI structure])],
- [], [#include <libxml/uri.h>])
-
- CFLAGS="$old_CFLAGS"
- LIBS="$old_LIBS"
])
AC_DEFUN([LIBVIRT_RESULT_LIBXML], [
diff --git a/src/util/viruri.c b/src/util/viruri.c
index 8e45a447b9..a43fe2afd4 100644
--- a/src/util/viruri.c
+++ b/src/util/viruri.c
@@ -183,13 +183,8 @@ virURIParse(const char *uri)
ret->port = xmluri->port;
if (VIR_STRDUP(ret->path, xmluri->path) < 0)
goto error;
-#ifdef HAVE_XMLURI_QUERY_RAW
if (VIR_STRDUP(ret->query, xmluri->query_raw) < 0)
goto error;
-#else
- if (VIR_STRDUP(ret->query, xmluri->query) < 0)
- goto error;
-#endif
if (VIR_STRDUP(ret->fragment, xmluri->fragment) < 0)
goto error;
if (VIR_STRDUP(ret->user, xmluri->user) < 0)
@@ -237,11 +232,7 @@ virURIFormat(virURIPtr uri)
xmluri.server = uri->server;
xmluri.port = uri->port;
xmluri.path = uri->path;
-#ifdef HAVE_XMLURI_QUERY_RAW
xmluri.query_raw = uri->query;
-#else
- xmluri.query = uri->query;
-#endif
xmluri.fragment = uri->fragment;
xmluri.user = uri->user;
diff --git a/tests/viruritest.c b/tests/viruritest.c
index c09e5323bc..d419711135 100644
--- a/tests/viruritest.c
+++ b/tests/viruritest.c
@@ -196,23 +196,19 @@ mymain(void)
{ (char*)"foo", (char*)"two", false },
{ NULL, NULL, false },
};
-#ifdef HAVE_XMLURI_QUERY_RAW
virURIParam params3[] = {
{ (char*)"foo", (char*)"&one", false },
{ (char*)"bar", (char*)"&two", false },
{ NULL, NULL, false },
};
-#endif
virURIParam params4[] = {
{ (char*)"foo", (char*)"", false },
{ NULL, NULL, false },
};
-#ifdef HAVE_XMLURI_QUERY_RAW
virURIParam params5[] = {
{ (char*)"foo", (char*)"one two", false },
{ NULL, NULL, false },
};
-#endif
virURIParam params6[] = {
{ (char*)"foo", (char*)"one", false },
{ NULL, NULL, false },
@@ -222,16 +218,12 @@ mymain(void)
TEST_PARAMS("foo=one&foo=two", "", params2);
TEST_PARAMS("foo=one&&foo=two", "foo=one&foo=two", params2);
TEST_PARAMS("foo=one;foo=two", "foo=one&foo=two", params2);
-#ifdef HAVE_XMLURI_QUERY_RAW
TEST_PARAMS("foo=%26one&bar=%26two", "", params3);
-#endif
TEST_PARAMS("foo", "foo=", params4);
TEST_PARAMS("foo=", "", params4);
TEST_PARAMS("foo=&", "foo=", params4);
TEST_PARAMS("foo=&&", "foo=", params4);
-#ifdef HAVE_XMLURI_QUERY_RAW
TEST_PARAMS("foo=one%20two", "", params5);
-#endif
TEST_PARAMS("=bogus&foo=one", "foo=one", params6);
return ret == 0 ? EXIT_SUCCESS : EXIT_FAILURE;
--
2.21.0
5 years, 5 months
[libvirt] [PATCH] virfile: adds quobyte as a shared fs
by Silvan Kaiser
Adds detection of a Quobyte shared file system for
live migration.
Signed-off-by: Silvan Kaiser <silvan(a)quobyte.com>
---
src/util/virfile.c | 13 ++++++++++++-
src/util/virfile.h | 1 +
tests/virfiledata/mounts3.txt | 1 +
tests/virfilemock.c | 3 +++
tests/virfiletest.c | 1 +
5 files changed, 18 insertions(+), 1 deletion(-)
diff --git a/src/util/virfile.c b/src/util/virfile.c
index f7415cf633..a46b8792f6 100644
--- a/src/util/virfile.c
+++ b/src/util/virfile.c
@@ -3434,6 +3434,9 @@ int virFilePrintf(FILE *fp, const char *msg, ...)
# ifndef GPFS_SUPER_MAGIC
# define GPFS_SUPER_MAGIC 0x47504653
# endif
+# ifndef QB_MAGIC
+# define QB_MAGIC 0x51626d6e
+# endif
# define PROC_MOUNTS "/proc/mounts"
@@ -3490,6 +3493,10 @@ virFileIsSharedFixFUSE(const char *path,
VIR_DEBUG("Found gluster FUSE mountpoint=%s for path=%s. "
"Fixing shared FS type", mntDir, canonPath);
*f_type = GFS2_MAGIC;
+ } else if (STREQ_NULLABLE(mntType, "fuse.quobyte")) {
+ VIR_DEBUG("Found Quobyte FUSE mountpoint=%s for path=%s. "
+ "Fixing shared FS type", mntDir, canonPath);
+ *f_type = QB_MAGIC;
}
ret = 0;
@@ -3582,6 +3589,9 @@ virFileIsSharedFSType(const char *path,
if ((fstypes & VIR_FILE_SHFS_GPFS) &&
(f_type == GPFS_SUPER_MAGIC))
return 1;
+ if ((fstypes & VIR_FILE_SHFS_QB) &&
+ (f_type == QB_MAGIC))
+ return 1;
return 0;
}
@@ -3771,7 +3781,8 @@ int virFileIsSharedFS(const char *path)
VIR_FILE_SHFS_SMB |
VIR_FILE_SHFS_CIFS |
VIR_FILE_SHFS_CEPH |
- VIR_FILE_SHFS_GPFS);
+ VIR_FILE_SHFS_GPFS|
+ VIR_FILE_SHFS_QB);
}
diff --git a/src/util/virfile.h b/src/util/virfile.h
index 641960e2ca..e06855ea86 100644
--- a/src/util/virfile.h
+++ b/src/util/virfile.h
@@ -212,6 +212,7 @@ enum {
VIR_FILE_SHFS_CIFS = (1 << 5),
VIR_FILE_SHFS_CEPH = (1 << 6),
VIR_FILE_SHFS_GPFS = (1 << 7),
+ VIR_FILE_SHFS_QB = (1 << 8),
};
int virFileIsSharedFSType(const char *path, int fstypes) ATTRIBUTE_NONNULL(1);
diff --git a/tests/virfiledata/mounts3.txt b/tests/virfiledata/mounts3.txt
index 4377e5d471..b91804a4e4 100644
--- a/tests/virfiledata/mounts3.txt
+++ b/tests/virfiledata/mounts3.txt
@@ -36,3 +36,4 @@ root@host:/tmp/mkdir /gluster/sshfs fuse.sshfs rw 0 0
192.168.0.1:/ceph/data /ceph ceph rw,noatime,name=cephfs,secret=<hidden>,acl,wsize=16777216 0 0
192.168.0.1,192.168.0.2,192.168.0.3:/ceph/data2 /ceph/multi ceph rw,noatime,name=cephfs,secret=<hidden>,acl,wsize=16777216 0 0
gpfs_data /gpfs/data gpfs rw,relatime 0 0
+quobyte(a)192.168.0.1/data /quobyte fuse.quobyte rw,nosuid,nodev,noatime,user_id=0,group_id=0,allow_other 0 0
diff --git a/tests/virfilemock.c b/tests/virfilemock.c
index 106032f857..54c57d417b 100644
--- a/tests/virfilemock.c
+++ b/tests/virfilemock.c
@@ -92,6 +92,9 @@ setmntent(const char *filename, const char *type)
#ifndef GPFS_SUPER_MAGIC
# define GPFS_SUPER_MAGIC 0x47504653
#endif
+# ifndef QB_MAGIC
+# define QB_MAGIC 0x51626d6e
+# endif
static int
diff --git a/tests/virfiletest.c b/tests/virfiletest.c
index e2bd4953ed..aa4c3435e5 100644
--- a/tests/virfiletest.c
+++ b/tests/virfiletest.c
@@ -458,6 +458,7 @@ mymain(void)
DO_TEST_FILE_IS_SHARED_FS_TYPE("mounts3.txt", "/ceph/file", true);
DO_TEST_FILE_IS_SHARED_FS_TYPE("mounts3.txt", "/ceph/multi/file", true);
DO_TEST_FILE_IS_SHARED_FS_TYPE("mounts3.txt", "/gpfs/data", true);
+ DO_TEST_FILE_IS_SHARED_FS_TYPE("mounts3.txt", "/quobyte", true);
return ret != 0 ? EXIT_FAILURE : EXIT_SUCCESS;
}
--
2.16.5
5 years, 5 months
[libvirt] [PATCH] virsh migrate: Properly check for --parallel-connections
by Jiri Denemark
Ever since --parallel-connections option for virsh migrate was
introduced we did not properly check the return value of
vshCommandOptInt. We would set VIR_MIGRATE_PARAM_PARALLEL_CONNECTIONS
parameter even if vshCommandOptInt returned 0 (which means
--parallel-connections was not specified) when another int option which
was checked earlier was specified with a nonzero value.
Specifically, running virsh migrate with either
--auto-converge-increment, --auto-converge-initial, --comp-mt-dthreads,
--comp-mt-threads, or --comp-mt-level would set
VIR_MIGRATE_PARAM_PARALLEL_CONNECTIONS parameter and if --parallel
option was not used, libvirt would complain
error: invalid argument: Turn parallel migration on to tune it
even though --parallel-connections option was not used at all.
https://bugzilla.redhat.com/show_bug.cgi?id=1726643
Signed-off-by: Jiri Denemark <jdenemar(a)redhat.com>
---
tools/virsh-domain.c | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c
index 828ae30789..2ad73959ec 100644
--- a/tools/virsh-domain.c
+++ b/tools/virsh-domain.c
@@ -10785,13 +10785,14 @@ doMigrate(void *opaque)
goto save_error;
}
- if (vshCommandOptInt(ctl, cmd, "parallel-connections", &intOpt) < 0)
+ if ((rv = vshCommandOptInt(ctl, cmd, "parallel-connections", &intOpt)) < 0) {
goto out;
- if (intOpt &&
- virTypedParamsAddInt(¶ms, &nparams, &maxparams,
- VIR_MIGRATE_PARAM_PARALLEL_CONNECTIONS,
- intOpt) < 0)
- goto save_error;
+ } else if (rv > 0) {
+ if (virTypedParamsAddInt(¶ms, &nparams, &maxparams,
+ VIR_MIGRATE_PARAM_PARALLEL_CONNECTIONS,
+ intOpt) < 0)
+ goto save_error;
+ }
if (vshCommandOptBool(cmd, "live"))
flags |= VIR_MIGRATE_LIVE;
--
2.22.0
5 years, 5 months
[libvirt] [PATCH] util: change the return value of virCgroupRemove if failed
by Wang Yechao
virCgroupRemove return -1 when removing cgroup failed.
But there are retry code to remove cgroup in QemuProcessStop:
retry:
if ((ret = qemuRemoveCgroup(vm)) < 0) {
if (ret == -EBUSY && (retries++ < 5)) {
usleep(200*1000);
goto retry;
}
VIR_WARN("Failed to remove cgroup for %s",
vm->def->name);
}
The return value of qemuRemoveCgroup will never be equal to "-EBUSY",
so change the return value of virCgroupRemove if failed.
Signed-off-by: Wang Yechao <wang.yechao255(a)zte.com.cn>
---
src/util/vircgroup.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/src/util/vircgroup.c b/src/util/vircgroup.c
index 268e401..260ed2d 100644
--- a/src/util/vircgroup.c
+++ b/src/util/vircgroup.c
@@ -2399,11 +2399,13 @@ int
virCgroupRemove(virCgroupPtr group)
{
size_t i;
+ int ret = 0;
for (i = 0; i < VIR_CGROUP_BACKEND_TYPE_LAST; i++) {
- if (group->backends[i] &&
- group->backends[i]->remove(group) < 0) {
- return -1;
+ if (group->backends[i])
+ ret = group->backends[i]->remove(group);
+ if (ret < 0)
+ return ret;
}
}
--
1.8.3.1
5 years, 5 months