[libvirt] [jenkins-ci PATCH] guests: Fix intltool-update on FreeBSD
by Andrea Bolognani
The tool became completely unusable after the switch to Perl
5.26; workaround the issue while we wait for a proper solution.
Signed-off-by: Andrea Bolognani <abologna(a)redhat.com>
---
Using regexes to match regexes: it's regexception.
guests/tasks/kludges.yml | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/guests/tasks/kludges.yml b/guests/tasks/kludges.yml
index d0ff6cb..4dd06a4 100644
--- a/guests/tasks/kludges.yml
+++ b/guests/tasks/kludges.yml
@@ -46,3 +46,16 @@
command: cap_mkdb /etc/login.conf
when:
- loginconf.changed
+
+# FreeBSD switched to Perl 5.26, which makes a long existing warning in
+# intltool-update turn into an error and causes jobs to fail. While we
+# wait for the port to be fixed, we can patch things up ourselves.
+#
+# See https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=227444
+- name: Fix intltool-update
+ replace:
+ path: /usr/local/bin/intltool-update
+ regexp: '^(.*) !~ /\\\$\{\?\$2\}\?/;$'
+ replace: '\1 !~ /\\$\\{?$2}?/;'
+ when:
+ - os_name == 'FreeBSD'
--
2.14.3
6 years, 6 months
[libvirt] [PATCH jenkins-ci] Run "make check" for osinfo-db
by Daniel P. Berrangé
Signed-off-by: Daniel P. Berrangé <berrange(a)redhat.com>
---
projects/osinfo-db.yaml | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/projects/osinfo-db.yaml b/projects/osinfo-db.yaml
index 0dd73b5..7f83722 100644
--- a/projects/osinfo-db.yaml
+++ b/projects/osinfo-db.yaml
@@ -17,8 +17,12 @@
command: |
$MAKE -j{smp} all
$MAKE install OSINFO_DB_TARGET="--system"
- - generic-rpm-job:
+ - generic-check-job:
parent_jobs: 'osinfo-db-master-build'
+ command: |
+ $MAKE -j{smp} check
+ - generic-rpm-job:
+ parent_jobs: 'osinfo-db-master-check'
machines:
- libvirt-centos-7
- libvirt-fedora-26
--
2.14.3
6 years, 6 months
[libvirt] path for user provided all-guest-read-only content
by Christian Ehrhardt
Feel free to read [1] for context, here the quote that made me poll for
opinions:
"it would be nice in the future to have some standardized path for user
provided guest-read-only stuff"
The TL;DR of their case is:
- extra info they want to pass, but is not part of libvirts guest
description (qemu-cmdline in their case)
- apparmor blocks their access to an unknown path
There are no reliable paths today to put data for a guest. Guests are names
with their ID in the paths - so even knowing the guest name - they are not
predictable (for example /var/lib/libvirt/qemu/domain-1-guestname/ might be
different next time).
Due to that I can see their use-case for "let all read from there", but
OTOH "let all" always feels wrong at first from a security POV.
Therefore i wanted to poll for opinions on this before suggesting any
change.
[1]: https://github.com/coreos/bugs/issues/2083#issuecomment-380404427
--
Christian Ehrhardt
Software Engineer, Ubuntu Server
Canonical Ltd
6 years, 6 months
[libvirt] [PATCH] vbox: Make vboxCommonDriver static
by Michal Privoznik
This is a global variable, but it isn't accessible from outside
of the file its declared in.
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
Pushed as trivial.
src/vbox/vbox_common.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/vbox/vbox_common.c b/src/vbox/vbox_common.c
index 3bcca43d32..b5f8456f8d 100644
--- a/src/vbox/vbox_common.c
+++ b/src/vbox/vbox_common.c
@@ -7978,7 +7978,7 @@ vboxDomainSendKey(virDomainPtr dom,
* Function Tables
*/
-virHypervisorDriver vboxCommonDriver = {
+static virHypervisorDriver vboxCommonDriver = {
.name = "VBOX",
.connectOpen = vboxConnectOpen, /* 0.6.3 */
.connectClose = vboxConnectClose, /* 0.6.3 */
--
2.16.1
6 years, 6 months
[libvirt] virNetSocketNewListenTCP tries just one address
by Olaf Hering
To rescue this bug from the noise in a subthread:
If a hostname resolves to more than one address and the host currently
configured itself for just IPv4, doing a bind() to some IPv6 address
will fail. As a result an error is returned instead of continuing with
the next item in 'runp'.
> Mär 20 09:35:52 macintyre-old libvirtd[4527]: 2018-03-20 08:35:52.521+0000: 4531: error : virNetSocketNewListenTCP:389 : Unable to bind to port: Cannot assign requested address
After further debugging:
27672 16:04:46.774906 socket(PF_INET6, SOCK_STREAM, IPPROTO_TCP) = 35
27672 16:04:46.775041 setsockopt(35, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0
27672 16:04:46.775172 setsockopt(35, SOL_IPV6, IPV6_V6ONLY, [1], 4) = 0
27672 16:04:46.775302 bind(35, {sa_family=AF_INET6, sin6_port=htons(49152), inet_pton(AF_INET6, "2620:113:80c0:8000:10:161:8:197", &sin6_addr), sin6_flowinfo=0, sin6_scope_id=0}, 28) = -1 EADDRNOTAVAIL (Cannot assign requested address)
27672 16:04:46.775455 gettid() = 27672
27672 16:04:46.775590 write(4, "2018-03-20 15:04:46.775+0000: 27672: error : virNetSocketNewListenTCP:389 : Unable to bind to port: Cannot assign requested address\n", 132) = 132
27672 16:04:46.775742 gettid() = 27672
27672 16:04:46.775875 write(4, "2018-03-20 15:04:46.775+0000: 27672: info : virObjectUnref:350 : OBJECT_UNREF: obj=0x7fa4bc003530\n", 98) = 98
27672 16:04:46.776026 gettid() = 27672
So for some reason libvirtd tries to bind to ipv6 even if the host does
not have that ipv6 address at this point, only the link-local address.
Not sure if there is a way to detect that within libvirt. Perhaps it
should just move on with the runp list and try the next one?
Olaf
6 years, 6 months
[libvirt] [PATCH] news: announce dropping of legacy Xen driver
by Jim Fehlig
Signed-off-by: Jim Fehlig <jfehlig(a)suse.com>
---
Not sure if removal of a feature is a feature, but this seems better
placed under "New features" than "Improvements" or "Bug fixes".
docs/news.xml | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/docs/news.xml b/docs/news.xml
index 798ab6da4..106979cc1 100644
--- a/docs/news.xml
+++ b/docs/news.xml
@@ -44,6 +44,16 @@
add this controller when traditional PCI devices are in use.
</description>
</change>
+ <change>
+ <summary>
+ Xen: Drop the legacy xend-based driver
+ </summary>
+ <description>
+ The xm/xend toolstack was deprecated in Xen 4.2 and removed
+ from the Xen sources in the 4.5 development cycle. The libvirt
+ driver based on xend is now removed from the libvirt sources.
+ </description>
+ </change>
</section>
<section title="Improvements">
<change>
--
2.16.3
6 years, 6 months
[libvirt] [PATCH] qemu: Format gic-version=2 on the command line
by Andrea Bolognani
Up until now we have only formatted non-default GIC versions on
the command line, in order to maintain compatibility with older
QEMU versions that didn't implement the gic-version option to
begin with; however, doing so is entirely unnecessary for newer
QEMU versions, where the option is available. Moreover, having
the GIC version formatted on the command line at all times
ensures that QEMU changing its own defaults doesn't affect the
ABI of libvirt guests.
A few test cases are removed to avoid extra churn. It doesn't
matter for coverage, as those scenarios are already covered by
other parts of the test suite.
This patch is better viewed with 'git show -w'.
Signed-off-by: Andrea Bolognani <abologna(a)redhat.com>
---
src/qemu/qemu_command.c | 44 +++++++++++++++++-------
tests/qemuxml2argvdata/aarch64-gic-none-tcg.args | 2 +-
tests/qemuxml2argvdata/aarch64-gic-v2.args | 2 +-
tests/qemuxml2argvtest.c | 6 ----
4 files changed, 33 insertions(+), 21 deletions(-)
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index 682d714419..1ab1e1a285 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -7299,21 +7299,39 @@ qemuBuildMachineCommandLine(virCommandPtr cmd,
goto cleanup;
if (def->features[VIR_DOMAIN_FEATURE_GIC] == VIR_TRISTATE_SWITCH_ON) {
- if (def->gic_version != VIR_GIC_VERSION_NONE) {
- /* The default GIC version (GICv2) should not be specified on
- * the QEMU commandline for backwards compatibility reasons */
- if (def->gic_version != VIR_GIC_VERSION_2) {
- if (!virQEMUCapsGet(qemuCaps,
- QEMU_CAPS_MACH_VIRT_GIC_VERSION)) {
- virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
- _("gic-version option is not available "
- "with this QEMU binary"));
- goto cleanup;
- }
+ bool hasGICVersionOption = virQEMUCapsGet(qemuCaps,
+ QEMU_CAPS_MACH_VIRT_GIC_VERSION);
+
+ switch ((virGICVersion) def->gic_version) {
+ case VIR_GIC_VERSION_2:
+ if (!hasGICVersionOption) {
+ /* If the gic-version option is not available, we can't
+ * configure the GIC; however, we know that before the
+ * option was introduced the guests would always get a
+ * GICv2, so in order to maintain compatibility with
+ * those old QEMU versions all we need to do is stop
+ * early instead of erroring out */
+ break;
+ }
+ ATTRIBUTE_FALLTHROUGH;
- virBufferAsprintf(&buf, ",gic-version=%s",
- virGICVersionTypeToString(def->gic_version));
+ case VIR_GIC_VERSION_3:
+ case VIR_GIC_VERSION_HOST:
+ if (!hasGICVersionOption) {
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
+ _("gic-version option is not available "
+ "with this QEMU binary"));
+ goto cleanup;
}
+
+ virBufferAsprintf(&buf, ",gic-version=%s",
+ virGICVersionTypeToString(def->gic_version));
+ break;
+
+ case VIR_GIC_VERSION_NONE:
+ case VIR_GIC_VERSION_LAST:
+ default:
+ break;
}
}
diff --git a/tests/qemuxml2argvdata/aarch64-gic-none-tcg.args b/tests/qemuxml2argvdata/aarch64-gic-none-tcg.args
index 4e3c0eee2d..b766a821d5 100644
--- a/tests/qemuxml2argvdata/aarch64-gic-none-tcg.args
+++ b/tests/qemuxml2argvdata/aarch64-gic-none-tcg.args
@@ -7,7 +7,7 @@ QEMU_AUDIO_DRV=none \
/usr/bin/qemu-system-aarch64 \
-name guest \
-S \
--machine virt,accel=tcg \
+-machine virt,accel=tcg,gic-version=2 \
-cpu cortex-a57 \
-m 1024 \
-smp 1,sockets=1,cores=1,threads=1 \
diff --git a/tests/qemuxml2argvdata/aarch64-gic-v2.args b/tests/qemuxml2argvdata/aarch64-gic-v2.args
index 7e88bbde3f..eec5c4a082 100644
--- a/tests/qemuxml2argvdata/aarch64-gic-v2.args
+++ b/tests/qemuxml2argvdata/aarch64-gic-v2.args
@@ -7,7 +7,7 @@ QEMU_AUDIO_DRV=none \
/usr/bin/qemu-system-aarch64 \
-name aarch64test \
-S \
--machine virt,accel=kvm \
+-machine virt,accel=kvm,gic-version=2 \
-cpu host \
-m 1024 \
-smp 1,sockets=1,cores=1,threads=1 \
diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c
index 308d71f725..dee765d3dd 100644
--- a/tests/qemuxml2argvtest.c
+++ b/tests/qemuxml2argvtest.c
@@ -2608,8 +2608,6 @@ mymain(void)
DO_TEST("aarch64-cpu-passthrough",
QEMU_CAPS_NODEFCONFIG, QEMU_CAPS_DEVICE_VIRTIO_MMIO,
QEMU_CAPS_KVM);
- DO_TEST_GIC("aarch64-gic-none", GIC_NONE,
- QEMU_CAPS_KVM, QEMU_CAPS_MACHINE_OPT);
DO_TEST_GIC("aarch64-gic-none", GIC_NONE,
QEMU_CAPS_KVM, QEMU_CAPS_MACHINE_OPT,
QEMU_CAPS_MACH_VIRT_GIC_VERSION);
@@ -2625,8 +2623,6 @@ mymain(void)
DO_TEST_GIC("aarch64-gic-none-tcg", GIC_BOTH,
QEMU_CAPS_MACHINE_OPT,
QEMU_CAPS_MACH_VIRT_GIC_VERSION);
- DO_TEST_GIC("aarch64-gic-default", GIC_NONE,
- QEMU_CAPS_KVM, QEMU_CAPS_MACHINE_OPT);
DO_TEST_GIC("aarch64-gic-default", GIC_NONE,
QEMU_CAPS_KVM, QEMU_CAPS_MACHINE_OPT,
QEMU_CAPS_MACH_VIRT_GIC_VERSION);
@@ -2639,8 +2635,6 @@ mymain(void)
DO_TEST_GIC("aarch64-gic-default-both", GIC_BOTH,
QEMU_CAPS_KVM, QEMU_CAPS_MACHINE_OPT,
QEMU_CAPS_MACH_VIRT_GIC_VERSION);
- DO_TEST_GIC("aarch64-gic-v2", GIC_NONE,
- QEMU_CAPS_KVM, QEMU_CAPS_MACHINE_OPT);
DO_TEST_GIC("aarch64-gic-v2", GIC_NONE,
QEMU_CAPS_KVM, QEMU_CAPS_MACHINE_OPT,
QEMU_CAPS_MACH_VIRT_GIC_VERSION);
--
2.14.3
6 years, 6 months
[libvirt] crash in libxlDoMigrateDstReceive in error case
by Olaf Hering
Jim,
while fixing and debugging virNetSocketNewListenTCP in master, I had
breakpoints in virNetSocketNewListenTCP and virNetSocketNew. After
starting a migration the receiving libvirtd went into both functions. I
hit continue a 4 times, but forgot to do it for the fifth call to let it
proceed. libvirtd was stuck there for a long time.
As a result, when leaving virNetSocketNew, I got a crash in
libxlDoMigrateDstReceive -> libxlDomainStartRestore -> libxlDomainStart
because args->conn->privateData is NULL. This means 'driver' becomes
NULL and things fall apart.
I have no checked where privateData is set. I think some place should
catch the broken connection and stop the incoming migration.
Olaf
6 years, 6 months
[libvirt] [RFC PATCH 0/4] LXC - Implement save/restore domain state
by Radostin Stoyanov
This patch set contains rebased version of Katerina's work from GSoC 2016 [1].
It allows integrates CRIU [2] with the libvirt-lxc to enable save/resore of containers.
[1] https://wiki.libvirt.org/page/Google_Summer_of_Code_2016/lxc_migration
[2] https://criu.org
Radostin Stoyanov (4):
configure: Include support for CRIU
lxc: Add save/restore helper functions
lxc: Add restore mode for libvirt-lxc
lxc: Add save/restore support
configure.ac | 1 +
m4/virt-criu.m4 | 27 +++++
po/POTFILES.in | 1 +
src/lxc/Makefile.inc.am | 4 +
src/lxc/lxc_container.c | 162 ++++++++++++++++++++++++++++--
src/lxc/lxc_container.h | 3 +-
src/lxc/lxc_controller.c | 104 ++++++++++++++++++-
src/lxc/lxc_criu.c | 253 +++++++++++++++++++++++++++++++++++++++++++++++
src/lxc/lxc_criu.h | 36 +++++++
src/lxc/lxc_driver.c | 238 +++++++++++++++++++++++++++++++++++++++++++-
src/lxc/lxc_process.c | 23 ++++-
src/lxc/lxc_process.h | 1 +
12 files changed, 836 insertions(+), 17 deletions(-)
create mode 100644 m4/virt-criu.m4
create mode 100644 src/lxc/lxc_criu.c
create mode 100644 src/lxc/lxc_criu.h
--
2.14.3
6 years, 6 months
[libvirt] [PATCH 0/2] Fix lxc callers using virDomainObjListRemove
by John Ferlan
Details in each patch - being consistent for future adjustment.
John Ferlan (2):
lxc: Fix possible leaked @vm in lxcDomainCreateXMLWithFiles
lxc: Fix object locking after virDomainObjListRemove
src/lxc/lxc_driver.c | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
--
2.13.6
6 years, 6 months