[libvirt] [PATCH] src: add missing include access path for bhyve and vz drivers
by Pavel Hrdina
Commit <b98f90cf913965243c6e2c49a52aa170a48093ef> forgot to update
bhyve and vz Makefile files as well.
Signed-off-by: Pavel Hrdina <phrdina(a)redhat.com>
---
Pushed under build-breaker rule.
src/bhyve/Makefile.inc.am | 1 +
src/vz/Makefile.inc.am | 1 +
2 files changed, 2 insertions(+)
diff --git a/src/bhyve/Makefile.inc.am b/src/bhyve/Makefile.inc.am
index de9fbe9239..1fc100d5ab 100644
--- a/src/bhyve/Makefile.inc.am
+++ b/src/bhyve/Makefile.inc.am
@@ -42,6 +42,7 @@ libvirt_driver_bhyve_la_LDFLAGS = $(AM_LDFLAGS_MOD_NOUNDEF)
libvirt_driver_bhyve_impl_la_CFLAGS = \
-I$(srcdir)/access \
+ -I$(builddir)/access \
-I$(srcdir)/conf \
$(AM_CFLAGS) \
$(NULL)
diff --git a/src/vz/Makefile.inc.am b/src/vz/Makefile.inc.am
index 1757c8ba10..acada11148 100644
--- a/src/vz/Makefile.inc.am
+++ b/src/vz/Makefile.inc.am
@@ -29,6 +29,7 @@ libvirt_driver_vz_la_LDFLAGS = $(AM_LDFLAGS_MOD_NOUNDEF)
libvirt_driver_vz_impl_la_CFLAGS = \
-I$(srcdir)/conf \
-I$(srcdir)/access \
+ -I$(builddir)/access \
$(AM_CFLAGS) \
$(PARALLELS_SDK_CFLAGS) \
$(LIBNL_CFLAGS) \
--
2.23.0
5 years
[libvirt] [jenkins-ci PATCH v2] Add python3-docutils package for libvirt
by Daniel P. Berrangé
This is needed to acquire the rst2html command line tool
Signed-off-by: Daniel P. Berrangé <berrange(a)redhat.com>
---
guests/vars/mappings.yml | 5 +++++
guests/vars/projects/libvirt.yml | 1 +
2 files changed, 6 insertions(+)
diff --git a/guests/vars/mappings.yml b/guests/vars/mappings.yml
index ba0f1cf..81d0916 100644
--- a/guests/vars/mappings.yml
+++ b/guests/vars/mappings.yml
@@ -795,6 +795,11 @@ mappings:
default: polkit
deb: policykit-1
+ python3-docutils:
+ default: python3-docutils
+ CentOS7: python36-docutils
+ FreeBSD: py36-docutils
+
python2:
default: python
Fedora: python2
diff --git a/guests/vars/projects/libvirt.yml b/guests/vars/projects/libvirt.yml
index 8fcb286..780a5aa 100644
--- a/guests/vars/projects/libvirt.yml
+++ b/guests/vars/projects/libvirt.yml
@@ -46,6 +46,7 @@ packages:
- openwsman
- parted
- polkit
+ - python3-docutils
- qemu-img
- radvd
- readline
--
2.23.0
5 years
[libvirt] [PATCH 0/2] qemu: Check for job being set when getting iothread stats
by Michal Privoznik
I've been playing with domstats and encountered a crasher. Here's the
fix.
Michal Prívozník (2):
qemu: Warn on possibly incorrect usage of EnterMonitor*
qemu: Check for job being set when getting iothread stats
src/qemu/qemu_domain.c | 5 +++++
src/qemu/qemu_driver.c | 4 ++--
2 files changed, 7 insertions(+), 2 deletions(-)
--
2.23.0
5 years
[libvirt] [jenkins-ci PATCH 0/5] Add Fedora 31, drop Fedora 29
by Andrea Bolognani
You know the drill :)
Andrea Bolognani (5):
guests: Explicitly enable ssh root login in kickstart
guests: Add Fedora 31
Start building on Fedora 31
Stop building on Fedora 29
guests: Drop Fedora 29
guests/configs/kickstart.cfg | 12 +++
guests/configs/preseed.cfg | 12 ++-
guests/host_vars/libvirt-fedora-29/docker.yml | 2 -
guests/host_vars/libvirt-fedora-31/docker.yml | 2 +
.../install.yml | 2 +-
.../main.yml | 2 +-
guests/inventory | 2 +-
guests/playbooks/build/jobs/defaults.yml | 4 +-
guests/playbooks/build/projects/libosinfo.yml | 2 +-
.../playbooks/build/projects/libvirt-dbus.yml | 3 +-
.../build/projects/libvirt-go-xml.yml | 2 +-
.../playbooks/build/projects/libvirt-go.yml | 2 +-
.../build/projects/libvirt-sandbox.yml | 4 +-
.../playbooks/build/projects/libvirt-tck.yml | 4 +-
guests/playbooks/build/projects/libvirt.yml | 2 +-
.../build/projects/osinfo-db-tools.yml | 2 +-
.../playbooks/build/projects/virt-manager.yml | 6 +-
.../playbooks/build/projects/virt-viewer.yml | 2 +-
guests/vars/vault.yml | 82 +++++++++----------
jenkins/jobs/defaults.yaml | 4 +-
jenkins/projects/libosinfo.yaml | 2 +-
jenkins/projects/libvirt-dbus.yaml | 4 +-
jenkins/projects/libvirt-go-xml.yaml | 2 +-
jenkins/projects/libvirt-go.yaml | 2 +-
jenkins/projects/libvirt-sandbox.yaml | 4 +-
jenkins/projects/libvirt-tck.yaml | 4 +-
jenkins/projects/libvirt.yaml | 2 +-
jenkins/projects/osinfo-db-tools.yaml | 2 +-
jenkins/projects/virt-manager.yaml | 6 +-
jenkins/projects/virt-viewer.yaml | 2 +-
30 files changed, 100 insertions(+), 83 deletions(-)
delete mode 100644 guests/host_vars/libvirt-fedora-29/docker.yml
create mode 100644 guests/host_vars/libvirt-fedora-31/docker.yml
rename guests/host_vars/{libvirt-fedora-29 => libvirt-fedora-31}/install.yml (66%)
rename guests/host_vars/{libvirt-fedora-29 => libvirt-fedora-31}/main.yml (95%)
--
2.21.0
5 years
[libvirt] [PATCH v2 0/2] Deprecate implicit filters
by Vladimir Sementsov-Ogievskiy
v2:
Don't deprecate drive-backup, it is unrelated thing and will be resent
in separate.
Don't deprecate drive-mirror. Instead add filter-node-name to
drive-mirror to behave like blockdev-mirror
Fix all broken iotests.
Vladimir Sementsov-Ogievskiy (2):
qapi: add filter-node-name option to drive-mirror
qapi: deprecate implicit filters
qemu-deprecated.texi | 6 ++++++
qapi/block-core.json | 14 ++++++++++++--
include/block/block_int.h | 10 +++++++++-
blockdev.c | 12 +++++++++++-
tests/qemu-iotests/094 | 1 +
tests/qemu-iotests/095 | 6 ++++--
tests/qemu-iotests/109 | 1 +
tests/qemu-iotests/127 | 1 +
tests/qemu-iotests/141 | 5 ++++-
tests/qemu-iotests/144 | 3 ++-
tests/qemu-iotests/156 | 1 +
tests/qemu-iotests/161 | 7 +++++++
tests/qemu-iotests/161.out | 1 +
tests/qemu-iotests/185 | 3 +++
tests/qemu-iotests/191 | 2 ++
tests/qemu-iotests/229 | 1 +
tests/qemu-iotests/247 | 8 +++++---
tests/qemu-iotests/249 | 5 +++--
tests/qemu-iotests/249.out | 2 +-
19 files changed, 75 insertions(+), 14 deletions(-)
--
2.21.0
5 years
[libvirt] s390: change default cpu model to host-model?
by Christian Borntraeger
On the KVM forum I have discussed the default cpu model mode on s390.
Right now if the xml does not specify anything, libvirt defaults to
not specifying anything on the qemu command line (no -cpu statement)
which is the equivalent of -cpu host for s390 which is equivalent to
host-passthrough. While this enables all features it does not provide
any migration safety by default.
So in fact we are kind of "broken" right now when it comes to safery.
So we discussed that it would make sense that an empty xml should actually
be defaulted to host-model, which results in - as of today - the same guest
features but in a migration safe way.
There is another change planned right now to actually make the cpu model
present in an xml if none was specified. So we could actually do this change
before, together or after te other. Jiri and I think it probably makes most
sense to have both changes at the same time (in terms of libvirt version).
Does anyone see an issue with changing the default model mode to "host-model"
if the xml does not specify anything else?
Christian
5 years
[libvirt] [PATCH v2 00/39] Introduce NVMe support
by Michal Privoznik
v2 of:
https://www.redhat.com/archives/libvir-list/2019-July/msg00675.html
As usual, you can find my patches on my github:
https://github.com/zippy2/libvirt/tree/nvme_v3
https://travis-ci.org/zippy2/libvirt/builds/590033775
(Yeah, my branch is really called _v3 because reasons)
diff to v1:
- A lot. Hopefully all Peter's comments are worked in
Michal Prívozník (39):
virhostdev: Fix const correctness of
virHostdevIs{PCINet,SCSI,Mdev}Device()
virhostdev: Introduce and use virHostdevIsVFIODevice
conf: Introduce virDomainDefHasMdevHostdev
qemu_hostdev: Introduce qemuHostdevNeedsVFIO()
qemu: Introduce qemuDomainNeedsVFIO
qemu_cgroup: Teardown Cgroup for more host device types
qemu: Explicitly add/remove /dev/vfio/vfio to/from NS/CGroups
qemu_domain: Drop few useless checks in qemuDomainGetHostdevPath
qemuDomainGetHostdevPath: Drop @freeTmpPath
qemuDomainGetHostdevPath: Use more VIR_AUTOFREE/VIR_AUTOPTR
qemuDomainGetHostdevPath: Don't include /dev/vfio/vfio in returned
paths
qemu: Drop some 'cleanup' labels
virpci: Introduce and use virPCIDeviceAddressGetIOMMUGroupDev
virHostdevPreparePCIDevices: Separate out function body
virHostdevReAttachPCIDevices: Separate out function body
virpci: Introduce virPCIDeviceAddressCopy
qemuMigrationSrcIsSafe: Rework slightly
schemas: Introduce disk type NVMe
conf: Format and parse NVMe type disk
virstoragefile: Introduce virStorageSourceChainHasNVMe
domain_conf: Introduce virDomainDefHasNVMeDisk
util: Introduce virNVMeDevice module
virhostdev: Include virNVMeDevice module
virpcimock: Introduce NVMe driver and devices
virhostdevtest: Test virNVMeDevice assignment
qemu: prepare NVMe devices too
qemu: Take NVMe disks into account when calculating memlock limit
qemu: Create NVMe disk in domain namespace
qemu: Mark NVMe disks as 'need VFIO'
qemu: Allow NVMe disk in CGroups
security_selinux: Simplify virSecuritySELinuxSetImageLabelInternal
virSecuritySELinuxRestoreImageLabelInt: Don't skip non-local storage
qemu_capabilities: Introduce QEMU_CAPS_DRIVE_NVME
qemu: Generate command line of NVMe disks
qemu_monitor_text: Catch IOMMU/VFIO related errors in
qemuMonitorTextAddDrive
qemu: Don't leak storage perms on failure in
qemuDomainAttachDiskGeneric
qemu: Allow forcing VFIO when computing memlock limit
qemu_hotplug: Prepare NVMe disks on hotplug
virsh: Introduce nvme disk to domblklist
docs/formatdomain.html.in | 57 ++-
docs/schemas/domaincommon.rng | 32 ++
src/conf/domain_conf.c | 129 ++++-
src/conf/domain_conf.h | 6 +
src/libvirt_private.syms | 30 ++
src/libxl/xen_xl.c | 1 +
src/qemu/qemu_block.c | 25 +
src/qemu/qemu_capabilities.c | 4 +
src/qemu/qemu_capabilities.h | 3 +
src/qemu/qemu_cgroup.c | 216 ++++++---
src/qemu/qemu_command.c | 6 +-
src/qemu/qemu_domain.c | 409 +++++++++-------
src/qemu/qemu_domain.h | 17 +-
src/qemu/qemu_driver.c | 4 +
src/qemu/qemu_hostdev.c | 80 ++-
src/qemu/qemu_hostdev.h | 18 +
src/qemu/qemu_hotplug.c | 39 +-
src/qemu/qemu_migration.c | 30 +-
src/qemu/qemu_monitor_text.c | 7 +
src/qemu/qemu_process.c | 7 +
src/security/security_apparmor.c | 33 +-
src/security/security_dac.c | 30 ++
src/security/security_selinux.c | 82 ++--
src/util/Makefile.inc.am | 2 +
src/util/virhostdev.c | 455 ++++++++++++++++--
src/util/virhostdev.h | 44 +-
src/util/virnvme.c | 454 +++++++++++++++++
src/util/virnvme.h | 95 ++++
src/util/virpci.c | 29 ++
src/util/virpci.h | 5 +
src/util/virstoragefile.c | 73 +++
src/util/virstoragefile.h | 19 +
.../caps_2.12.0.aarch64.xml | 1 +
.../caps_2.12.0.ppc64.xml | 1 +
.../caps_2.12.0.s390x.xml | 1 +
.../caps_2.12.0.x86_64.xml | 1 +
.../qemucapabilitiesdata/caps_3.0.0.ppc64.xml | 1 +
.../caps_3.0.0.riscv32.xml | 1 +
.../caps_3.0.0.riscv64.xml | 1 +
.../qemucapabilitiesdata/caps_3.0.0.s390x.xml | 1 +
.../caps_3.0.0.x86_64.xml | 1 +
.../qemucapabilitiesdata/caps_3.1.0.ppc64.xml | 1 +
.../caps_3.1.0.x86_64.xml | 1 +
.../caps_4.0.0.aarch64.xml | 1 +
.../qemucapabilitiesdata/caps_4.0.0.ppc64.xml | 1 +
.../caps_4.0.0.riscv32.xml | 1 +
.../caps_4.0.0.riscv64.xml | 1 +
.../qemucapabilitiesdata/caps_4.0.0.s390x.xml | 1 +
.../caps_4.0.0.x86_64.xml | 1 +
.../caps_4.1.0.x86_64.xml | 1 +
tests/qemumemlocktest.c | 2 +-
.../disk-nvme.x86_64-latest.args | 53 ++
tests/qemuxml2argvdata/disk-nvme.xml | 63 +++
tests/qemuxml2argvtest.c | 1 +
tests/qemuxml2xmloutdata/disk-nvme.xml | 1 +
tests/qemuxml2xmltest.c | 1 +
tests/virhostdevtest.c | 97 ++++
tests/virpcimock.c | 3 +
tests/virpcitestdata/0000-01-00.0.config | Bin 0 -> 4096 bytes
tests/virpcitestdata/0000-02-00.0.config | Bin 0 -> 4096 bytes
tools/virsh-domain-monitor.c | 31 +-
61 files changed, 2330 insertions(+), 381 deletions(-)
create mode 100644 src/util/virnvme.c
create mode 100644 src/util/virnvme.h
create mode 100644 tests/qemuxml2argvdata/disk-nvme.x86_64-latest.args
create mode 100644 tests/qemuxml2argvdata/disk-nvme.xml
create mode 120000 tests/qemuxml2xmloutdata/disk-nvme.xml
create mode 100644 tests/virpcitestdata/0000-01-00.0.config
create mode 100644 tests/virpcitestdata/0000-02-00.0.config
--
2.21.0
5 years
[libvirt] [jenkins-ci PATCH] Add python-docutils package for libvirt
by Daniel P. Berrangé
This is needed to acquire the rst2html command line tool
Signed-off-by: Daniel P. Berrangé <berrange(a)redhat.com>
---
guests/vars/mappings.yml | 5 +++++
guests/vars/projects/libvirt.yml | 1 +
2 files changed, 6 insertions(+)
diff --git a/guests/vars/mappings.yml b/guests/vars/mappings.yml
index ba0f1cf..a6df789 100644
--- a/guests/vars/mappings.yml
+++ b/guests/vars/mappings.yml
@@ -795,6 +795,11 @@ mappings:
default: polkit
deb: policykit-1
+ python-docutils:
+ default: python3-docutils
+ CentOS7: python2-docutils
+ FreeBSD: py36-docutils
+
python2:
default: python
Fedora: python2
diff --git a/guests/vars/projects/libvirt.yml b/guests/vars/projects/libvirt.yml
index 8fcb286..38a979a 100644
--- a/guests/vars/projects/libvirt.yml
+++ b/guests/vars/projects/libvirt.yml
@@ -46,6 +46,7 @@ packages:
- openwsman
- parted
- polkit
+ - python-docutils
- qemu-img
- radvd
- readline
--
2.23.0
5 years
[libvirt] [PATCH v3 00/20] cleanup current build system
by Pavel Hrdina
As preparation to switch to Meson there are some things that needs be
cleaned up to make the conversion easier.
The important thing in Meson is that there is a strict separation
between source and build directory and the distributed tarball by
default contains only files tracked by git with a possibility to
write a script which would add some other sources into the tarball.
Regardless of the adoption of Meson these patches improve our current
build system to fully support VPATH builds.
Changes in v2:
- some patches from v1 are pushed now
- added a patch to mandate build dir != src dir
- added a patch to cleanup .gitignore
- added patches to fix sc_po_check
- improved some patches from v1
Changes in v3:
- python-zanata-client is the tool our Makefile uses
Daniel P. Berrangé (1):
build: mandate use of a build dir != src dir
Pavel Hrdina (19):
.gitignore: cleanup old and obsolete ignores
syntax-check.mk: fix sc_po_check rule
syntax-check.mk: cleanup sc_po_check dependencies
syntax-check.mk: cleanup generated_files list for sc_po_check
po: generate files into build directory
po: rewrite the way how we generate files
po: README.md: add a note about which Zanata client is required
remote: unify rpc server dispatch generated files
src: generate source files into build directory
src: access: generate source files into build directory
src: admin: generate source files into build directory
src: esx: generate source files into build directory
src: hyperv: generate source files into build directory
src: locking: generate source files into build directory
src: logging: generate source files into build directory
src: lxc: generate source files into build directory
src: remote: generate source files into build directory
src: stop distributing generated source files
tools: stop distributing generated source files
.gitignore | 276 ++-------------------
build-aux/syntax-check.mk | 47 ++--
configure.ac | 6 +
libvirt.spec.in | 10 +-
po/Makefile.am | 47 ++--
po/POTFILES | 320 -------------------------
po/POTFILES.in | 357 ++++++++++++++++++++++++++++
po/README.md | 3 +
src/Makefile.am | 13 +-
src/access/Makefile.inc.am | 17 +-
src/admin/Makefile.inc.am | 24 +-
src/bhyve/Makefile.inc.am | 1 +
src/esx/Makefile.inc.am | 9 +-
src/esx/esx_vi_generator.py | 11 +-
src/hyperv/Makefile.inc.am | 9 +-
src/hyperv/hyperv_wmi_generator.py | 11 +-
src/interface/Makefile.inc.am | 2 +
src/libxl/Makefile.inc.am | 2 +
src/locking/Makefile.inc.am | 16 +-
src/logging/Makefile.inc.am | 18 +-
src/lxc/Makefile.inc.am | 36 ++-
src/network/Makefile.inc.am | 2 +
src/node_device/Makefile.inc.am | 2 +
src/nwfilter/Makefile.inc.am | 2 +
src/qemu/Makefile.inc.am | 2 +
src/remote/Makefile.inc.am | 45 ++--
src/remote/remote_daemon_dispatch.c | 4 +-
src/rpc/Makefile.inc.am | 8 +-
src/secret/Makefile.inc.am | 2 +
src/storage/Makefile.inc.am | 2 +
src/util/Makefile.inc.am | 6 +-
src/vbox/Makefile.inc.am | 1 +
src/vz/Makefile.inc.am | 1 +
tests/Makefile.am | 4 +
tools/Makefile.am | 1 -
35 files changed, 607 insertions(+), 710 deletions(-)
delete mode 100644 po/POTFILES
create mode 100644 po/POTFILES.in
--
2.21.0
5 years
[libvirt] [PATCH v6] util: Set SIGPIPE to a no-op handler in virFork
by Wang Yechao
Libvirtd has set SIGPIPE to ignored, and virFork resets all signal
handlers to the defaults. But child process may write logs to
stderr/stdout, that may generate SIGPIPE if journald has stopped.
So set SIGPIPE to a dummy no-op handler before unmask signals in
virFork(), and the handler will get reset to SIG_DFL when execve()
runs. Now we can delete sigaction() call entirely in virExec().
Signed-off-by: Wang Yechao <wang.yechao255(a)zte.com.cn>
---
v3 patch:
https://www.redhat.com/archives/libvir-list/2019-October/msg00934.html
Changes in v4:
- don't block SIGPIPE, ignore it when invoke VIR_FORCE_CLOSE and virCommandMassClose
Changes in v5:
- chang from SIG_IGN to a no-op handler in child process
Changes in v6:
- add a comment and delete sigaction() call entirely in virExec
---
src/util/vircommand.c | 32 ++++++++++----------------------
1 file changed, 10 insertions(+), 22 deletions(-)
diff --git a/src/util/vircommand.c b/src/util/vircommand.c
index 93b3dd2..8b10253 100644
--- a/src/util/vircommand.c
+++ b/src/util/vircommand.c
@@ -217,6 +217,8 @@ virCommandFDSet(virCommandPtr cmd,
#ifndef WIN32
+static void virDummyHandler(int sig G_GNUC_UNUSED) {}
+
/**
* virFork:
*
@@ -312,6 +314,14 @@ virFork(void)
ignore_value(sigaction(i, &sig_action, NULL));
}
+ /* Code that runs between fork & execve might trigger
+ * SIG_PIPE, so we must explicitly set that to a no-op
+ * handler. This handler will get reset to SIG_DFL when
+ * execve() runs
+ */
+ sig_action.sa_handler = virDummyHandler;
+ ignore_value(sigaction(SIGPIPE, &sig_action, NULL));
+
/* Unmask all signals in child, since we've no idea what the
* caller's done with their signal mask and don't want to
* propagate that to children */
@@ -550,7 +560,6 @@ virExec(virCommandPtr cmd)
g_autofree char *binarystr = NULL;
const char *binary = NULL;
int ret;
- struct sigaction waxon, waxoff;
g_autofree gid_t *groups = NULL;
int ngroups;
@@ -718,21 +727,6 @@ virExec(virCommandPtr cmd)
}
}
- /* virFork reset all signal handlers to the defaults.
- * This is good for the child process, but our hook
- * risks running something that generates SIGPIPE,
- * so we need to temporarily block that again
- */
- memset(&waxoff, 0, sizeof(waxoff));
- waxoff.sa_handler = SIG_IGN;
- sigemptyset(&waxoff.sa_mask);
- memset(&waxon, 0, sizeof(waxon));
- if (sigaction(SIGPIPE, &waxoff, &waxon) < 0) {
- virReportSystemError(errno, "%s",
- _("Could not disable SIGPIPE"));
- goto fork_error;
- }
-
if (virProcessSetMaxMemLock(0, cmd->maxMemLock) < 0)
goto fork_error;
if (virProcessSetMaxProcesses(0, cmd->maxProcesses) < 0)
@@ -783,12 +777,6 @@ virExec(virCommandPtr cmd)
if (virCommandHandshakeChild(cmd) < 0)
goto fork_error;
- if (sigaction(SIGPIPE, &waxon, NULL) < 0) {
- virReportSystemError(errno, "%s",
- _("Could not re-enable SIGPIPE"));
- goto fork_error;
- }
-
/* Close logging again to ensure no FDs leak to child */
virLogReset();
--
1.8.3.1
5 years