[PATCH 0/8] run iptables directly rather than via firewalld
by Laine Stump
The reasoning for this is explained in Patch 8/8
Laine Stump (8):
util: fix typo in VIR_MOCK_WRAP_RET_ARGS()
util/tests: enable locking on iptables/ebtables commandlines in unit
tests
util/tests: enable locking on iptables/ebtables commandlines by
default
tests: fix iptables test case commandline options in virfirewalltest.c
network: be more verbose about the reason for a firewall reload
util: always check for ebtables/iptables binaries, even when using
firewalld
util: synchronize with firewalld before we start calling iptables
directly
util: call iptables directly rather than via firewalld
src/libvirt_private.syms | 2 +-
src/network/bridge_driver.c | 10 +-
src/util/virfirewall.c | 155 +++---
src/util/virfirewall.h | 2 +-
src/util/viriptables.c | 7 +
tests/networkxml2firewalldata/base.args | 34 ++
.../nat-default-linux.args | 19 +
.../nat-ipv6-linux.args | 30 ++
.../nat-ipv6-masquerade-linux.args | 34 ++
.../nat-many-ips-linux.args | 33 ++
.../nat-no-dhcp-linux.args | 29 ++
.../nat-tftp-linux.args | 21 +
.../route-default-linux.args | 14 +
tests/networkxml2firewalltest.c | 2 -
tests/nwfilterebiptablestest.c | 466 +++++++++---------
.../ah-ipv6-linux.args | 9 +
tests/nwfilterxml2firewalldata/ah-linux.args | 9 +
.../all-ipv6-linux.args | 9 +
tests/nwfilterxml2firewalldata/all-linux.args | 9 +
tests/nwfilterxml2firewalldata/arp-linux.args | 5 +
.../comment-linux.args | 19 +
.../conntrack-linux.args | 7 +
.../esp-ipv6-linux.args | 9 +
tests/nwfilterxml2firewalldata/esp-linux.args | 9 +
.../example-1-linux.args | 12 +
.../example-2-linux.args | 10 +
.../hex-data-linux.args | 10 +
.../icmp-direction-linux.args | 6 +
.../icmp-direction2-linux.args | 6 +
.../icmp-direction3-linux.args | 6 +
.../nwfilterxml2firewalldata/icmp-linux.args | 3 +
.../icmpv6-linux.args | 4 +
.../nwfilterxml2firewalldata/igmp-linux.args | 9 +
tests/nwfilterxml2firewalldata/ip-linux.args | 3 +
.../nwfilterxml2firewalldata/ipset-linux.args | 18 +
.../ipt-no-macspoof-linux.args | 2 +
.../nwfilterxml2firewalldata/ipv6-linux.args | 15 +
.../nwfilterxml2firewalldata/iter1-linux.args | 9 +
.../nwfilterxml2firewalldata/iter2-linux.args | 171 +++++++
.../nwfilterxml2firewalldata/iter3-linux.args | 15 +
tests/nwfilterxml2firewalldata/mac-linux.args | 4 +
.../nwfilterxml2firewalldata/rarp-linux.args | 6 +
.../sctp-ipv6-linux.args | 9 +
.../nwfilterxml2firewalldata/sctp-linux.args | 9 +
tests/nwfilterxml2firewalldata/stp-linux.args | 11 +
.../target-linux.args | 33 ++
.../target2-linux.args | 12 +
.../tcp-ipv6-linux.args | 9 +
tests/nwfilterxml2firewalldata/tcp-linux.args | 13 +
.../udp-ipv6-linux.args | 9 +
tests/nwfilterxml2firewalldata/udp-linux.args | 9 +
.../udplite-ipv6-linux.args | 9 +
.../udplite-linux.args | 9 +
.../nwfilterxml2firewalldata/vlan-linux.args | 7 +
tests/nwfilterxml2firewalltest.c | 146 +++---
tests/virfirewalltest.c | 236 ++++-----
56 files changed, 1259 insertions(+), 514 deletions(-)
--
2.28.0
4 years
[PATCH v3 0/2] hyperv: storage volume XML changes
by Matt Coleman
Changes since v2:
* raise an error if the parent device cannot be located
* correct the disk count and use constants instead of magic numbers
Here's a GitLab MR if you'd prefer to review it there:
https://gitlab.com/iammattcoleman/libvirt/-/merge_requests/12/commits
This link shows a diff between v2 and v3:
https://gitlab.com/iammattcoleman/libvirt/-/merge_requests/12/diffs?diff_...
Matt Coleman (2):
hyperv: XML parsing of storage volumes
schema: add support for Windows file paths and device names
docs/schemas/basictypes.rng | 2 +-
docs/schemas/domaincommon.rng | 5 +-
src/hyperv/hyperv_driver.c | 425 +++++++++++++++++-
src/hyperv/hyperv_driver.h | 5 +
src/hyperv/hyperv_private.h | 2 +
src/hyperv/hyperv_wmi.c | 45 ++
src/hyperv/hyperv_wmi.h | 8 +
src/hyperv/hyperv_wmi_classes.h | 19 +
src/hyperv/hyperv_wmi_generator.input | 134 ++++++
.../disk-hyperv-physical.xml | 17 +
.../disk-hyperv-virtual.xml | 17 +
.../disk-hyperv-physical.xml | 23 +
.../disk-hyperv-virtual.xml | 23 +
tests/genericxml2xmltest.c | 2 +
14 files changed, 724 insertions(+), 3 deletions(-)
create mode 100644 tests/genericxml2xmlindata/disk-hyperv-physical.xml
create mode 100644 tests/genericxml2xmlindata/disk-hyperv-virtual.xml
create mode 100644 tests/genericxml2xmloutdata/disk-hyperv-physical.xml
create mode 100644 tests/genericxml2xmloutdata/disk-hyperv-virtual.xml
--
2.27.0
4 years
[PATCH 0/7] qemu: migration: TLS enforcement and non-shared-storage error improvement
by Peter Krempa
A collection of fixes for migration.
Peter Krempa (7):
docs: migration: Fix example for unix socket migration
qemu: migration: Remove TODO about implementing NBD for TUNNELLED
migration
qemu: migration: Aggregate logic depending on tunnelled migration
qemu: migration: Forbid tunnelled non-shared storage migration with
-blockdev
docs: migration: Mention that features may not work with tunnelled
migration
qemu: conf: Introduce "migrate_tls_force" qemu.conf option
docs: migration: Add a mention of VIR_MIGRATE_TLS and it's enforcement
for qemu
docs/migration.html.in | 21 ++++++++++-
src/qemu/libvirtd_qemu.aug | 1 +
src/qemu/qemu.conf | 8 ++++
src/qemu/qemu_conf.c | 2 +
src/qemu/qemu_conf.h | 1 +
src/qemu/qemu_migration.c | 60 ++++++++++++++++++++++--------
src/qemu/test_libvirtd_qemu.aug.in | 1 +
7 files changed, 78 insertions(+), 16 deletions(-)
--
2.28.0
4 years
[PATCH 0/2] qemu: Fix setting of 'current' checkpoint/snapshot
by Peter Krempa
See patch 1
Peter Krempa (2):
qemu: snapshot: Write metadata of previously-'current' snapshot on
update
qemu: checkpoint: Write metadata of previously-'current' checkpoint on
update
src/qemu/qemu_checkpoint.c | 35 +++++++++++++++++++++++++++++++++--
src/qemu/qemu_snapshot.c | 38 +++++++++++++++++++++++++++++++++++---
2 files changed, 68 insertions(+), 5 deletions(-)
--
2.28.0
4 years
[PATCH 0/5] qemu: Don't abort() when creating internal snapshot with <disk type='volume'
by Peter Krempa
See patch 5/5
Peter Krempa (5):
virCommandAddArg: Don't abort on invalid input
virDomainDiskTranslateSourcePool: Don't break error message in half
qemuDomainSnapshotForEachQcow2Raw: Avoid a level of indentation
qemuDomainSnapshotForEachQcow2Raw: Lock out operation on unsupported
storage
qemuDomainSnapshotForEachQcow2: Pass in 'def' rather than selecting it
internally
src/conf/domain_conf.c | 3 +-
src/qemu/qemu_domain.c | 102 +++++++++++++++++++++------------------
src/qemu/qemu_domain.h | 2 +-
src/qemu/qemu_snapshot.c | 16 ++++--
src/util/vircommand.c | 2 +-
5 files changed, 70 insertions(+), 55 deletions(-)
--
2.28.0
4 years
[libvirt PATCH 0/3] Introudce virCommandPassFDIndex
by Ján Tomko
Simplify passing file descriptors via add-fd by adding a new
parameter to virCommandPassFD that returns the index of the passed
FD right away, removing the need to look it up later and pretend
to handle errors which cannot happen - we've just put the file
descriptor there, why would it not be there?
This should also silence Coverity - in that regard it's an alternative
to Pavel's patch:
https://www.redhat.com/archives/libvir-list/2020-November/msg00885.html
Ján Tomko (3):
util: introduce virCommandPassFDIndex
qemu: introduce qemuBuildFDSet
qemu: use qemuVirCommandGetDevSet less
src/libvirt_private.syms | 1 +
src/qemu/qemu_command.c | 38 +++++++++++++++++++++++++-------------
src/util/vircommand.c | 28 ++++++++++++++++++++++++++--
src/util/vircommand.h | 5 +++++
4 files changed, 57 insertions(+), 15 deletions(-)
--
2.26.2
4 years
[PATCH 0/2] hyperv: storage volume XML changes
by Matt Coleman
Here's a GitLab MR if you'd prefer to review it there:
https://gitlab.com/iammattcoleman/libvirt/-/merge_requests/12/commits
Matt Coleman (2):
hyperv: XML parsing of storage volumes
schema: add support for Windows file paths and device names
docs/schemas/basictypes.rng | 2 +-
docs/schemas/domaincommon.rng | 5 +-
src/hyperv/hyperv_driver.c | 408 +++++++++++++++++-
src/hyperv/hyperv_driver.h | 3 +
src/hyperv/hyperv_wmi.c | 45 ++
src/hyperv/hyperv_wmi.h | 8 +
src/hyperv/hyperv_wmi_classes.h | 19 +
src/hyperv/hyperv_wmi_generator.input | 134 ++++++
.../disk-hyperv-physical.xml | 17 +
.../disk-hyperv-virtual.xml | 17 +
.../disk-hyperv-physical.xml | 23 +
.../disk-hyperv-virtual.xml | 23 +
tests/genericxml2xmltest.c | 2 +
13 files changed, 703 insertions(+), 3 deletions(-)
create mode 100644 tests/genericxml2xmlindata/disk-hyperv-physical.xml
create mode 100644 tests/genericxml2xmlindata/disk-hyperv-virtual.xml
create mode 100644 tests/genericxml2xmloutdata/disk-hyperv-physical.xml
create mode 100644 tests/genericxml2xmloutdata/disk-hyperv-virtual.xml
--
2.27.0
4 years
[libvirt PATCH v3] ci: Switch to meson build system
by Erik Skultety
Add meson required bits to the ci logic in the repo to be able to run
a meson build in a container.
This patch also drops a few environment variables we don't need with
meson anymore.
Signed-off-by: Erik Skultety <eskultet(a)redhat.com>
---
v2: https://www.redhat.com/archives/libvir-list/2020-November/msg00380.html
Since v2:
- squashed both original patches into 1
- dropped some unnecessary code which meson handles implicitly
ci/Makefile | 32 ++++++++------------------------
ci/build.sh | 29 +++--------------------------
2 files changed, 11 insertions(+), 50 deletions(-)
diff --git a/ci/Makefile b/ci/Makefile
index c7c8eb9a45..6c253f0b1e 100644
--- a/ci/Makefile
+++ b/ci/Makefile
@@ -20,26 +20,8 @@ CI_HOST_SRCDIR = $(CI_SCRATCHDIR)/src
# the $(CI_HOST_SRCDIR) directory from the host
CI_CONT_SRCDIR = $(CI_USER_HOME)/libvirt
-# Relative directory to perform the build in. This
-# defaults to using a separate build dir, but can be
-# set to empty string for an in-source tree build.
-CI_VPATH = build
-
-# The directory holding the build output inside the
-# container.
-CI_CONT_BUILDDIR = $(CI_CONT_SRCDIR)/$(CI_VPATH)
-
-# Can be overridden with mingw{32,64}-configure if desired
-CI_CONFIGURE = $(CI_CONT_SRCDIR)/configure
-
-# Default to using all possible CPUs
-CI_SMP = $(shell getconf _NPROCESSORS_ONLN)
-
-# Any extra arguments to pass to make
-CI_MAKE_ARGS =
-
-# Any extra arguments to pass to configure
-CI_CONFIGURE_ARGS =
+# Any extra arguments to pass to ninja
+CI_NINJA_ARGS =
# Script containing environment preparation steps
CI_PREPARE_SCRIPT = $(CI_ROOTDIR)/prepare.sh
@@ -221,12 +203,15 @@ ci-run-command@%: ci-prepare-tree
--user="#$(CI_UID)" \
--group="#$(CI_GID)" \
CONFIGURE_OPTS="$$CONFIGURE_OPTS" \
+ MESON_OPTS="$$MESON_OPTS" \
CI_CONT_SRCDIR="$(CI_CONT_SRCDIR)" \
CI_CONT_BUILDDIR="$(CI_CONT_BUILDDIR)" \
CI_SMP="$(CI_SMP)" \
CI_CONFIGURE="$(CI_CONFIGURE)" \
CI_CONFIGURE_ARGS="$(CI_CONFIGURE_ARGS)" \
CI_MAKE_ARGS="$(CI_MAKE_ARGS)" \
+ CI_CONT_SRCDIR="$(CI_CONT_SRCDIR)" \
+ CI_NINJA_ARGS="$(CI_NINJA_ARGS)" \
$(CI_COMMAND) || exit 1'
@test "$(CI_CLEAN)" = "1" && rm -rf $(CI_SCRATCHDIR) || :
@@ -236,8 +221,8 @@ ci-shell@%:
ci-build@%:
$(MAKE) -C $(CI_ROOTDIR) ci-run-command@$* CI_COMMAND="$(CI_USER_HOME)/build"
-ci-check@%:
- $(MAKE) -C $(CI_ROOTDIR) ci-build@$* CI_MAKE_ARGS="check"
+ci-test@%:
+ $(MAKE) -C $(CI_ROOTDIR) ci-build@$* CI_NINJA_ARGS=test
ci-list-images:
@echo
@@ -266,6 +251,5 @@ ci-help:
@echo " CI_CLEAN=0 - do not delete '$(CI_SCRATCHDIR)' after completion"
@echo " CI_REUSE=1 - re-use existing '$(CI_SCRATCHDIR)' content"
@echo " CI_ENGINE=auto - container engine to use (podman, docker)"
- @echo " CI_CONFIGURE_ARGS= - extra arguments passed to configure"
- @echo " CI_MAKE_ARGS= - extra arguments passed to make, e.g. space delimited list of targets"
+ @echo " CI_NINJA_ARGS= - extra arguments passed to ninja"
@echo
diff --git a/ci/build.sh b/ci/build.sh
index 2da84c080a..4530283cd8 100644
--- a/ci/build.sh
+++ b/ci/build.sh
@@ -7,32 +7,9 @@
#
# to make.
-mkdir -p "$CI_CONT_BUILDDIR" || exit 1
-cd "$CI_CONT_BUILDDIR"
+cd "$CI_CONT_SRCDIR"
export VIR_TEST_DEBUG=1
-NOCONFIGURE=1 "$CI_CONT_SRCDIR/autogen.sh" || exit 1
-# $CONFIGURE_OPTS is a env that can optionally be set in the container,
-# populated at build time from the Dockerfile. A typical use case would
-# be to pass --host/--target args to trigger cross-compilation
-#
-# This can be augmented by make local args in $CI_CONFIGURE_ARGS
-"$CI_CONFIGURE" $CONFIGURE_OPTS $CI_CONFIGURE_ARGS
-if test $? != 0; then
- test -f config.log && cat config.log
- exit 1
-fi
-find -name test-suite.log -delete
-
-make -j"$CI_SMP" $CI_MAKE_ARGS
-
-if test $? != 0; then \
- LOGS=$(find -name test-suite.log)
- if test "$LOGS"; then
- echo "=== LOG FILE(S) START ==="
- cat $LOGS
- echo "=== LOG FILE(S) END ==="
- fi
- exit 1
-fi
+meson build --werror $MESON_OPTS || (cat build/meson-logs/meson-log.txt && exit 1)
+ninja -C build $CI_NINJA_ARGS
--
2.26.2
4 years
[PATCH 01/30] util: convert pointers to use g_autofree
by Ryan Gahagan
From: Barrett Schonefeld <bschoney(a)utexas.edu>
- src/util/virxml.c
Signed-off-by: Barrett Schonefeld <bschoney(a)utexas.edu>
---
src/util/virxml.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/src/util/virxml.c b/src/util/virxml.c
index a3b819d85c..7df50e4b4d 100644
--- a/src/util/virxml.c
+++ b/src/util/virxml.c
@@ -696,8 +696,8 @@ catchXMLError(void *ctx, const char *msg G_GNUC_UNUSED, ...)
unsigned int n, col; /* GCC warns if signed, because compared with sizeof() */
int domcode = VIR_FROM_XML;
g_auto(virBuffer) buf = VIR_BUFFER_INITIALIZER;
- char *contextstr = NULL;
- char *pointerstr = NULL;
+ g_autofree char *contextstr = NULL;
+ g_autofree char *pointerstr = NULL;
/* conditions for error printing */
@@ -763,9 +763,6 @@ catchXMLError(void *ctx, const char *msg G_GNUC_UNUSED, ...)
contextstr,
pointerstr);
}
-
- VIR_FREE(contextstr);
- VIR_FREE(pointerstr);
}
/**
--
2.29.0
4 years