[libvirt] [PATCH] configure: Check for MSG_NOSIGNAL availability
by Andrea Bolognani
The symbol being missing has been reported as causing build
failures on OS X. Check for its availability before using it.
---
See https://www.redhat.com/archives/libvir-list/2016-July/msg00613.html
configure.ac | 4 ++++
src/util/virsystemd.c | 4 ++--
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/configure.ac b/configure.ac
index 2c81c95..af5d2f8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -402,6 +402,10 @@ AC_CHECK_TYPE([struct sockpeercred],
[], [[#include <sys/socket.h>
]])
+AC_CHECK_DECLS([MSG_NOSIGNAL],
+ [], [], [[#include <sys/socket.h>
+ ]])
+
AC_CHECK_DECLS([ETH_FLAG_TXVLAN, ETH_FLAG_NTUPLE, ETH_FLAG_RXHASH, ETH_FLAG_LRO,
ETHTOOL_GGSO, ETHTOOL_GGRO, ETHTOOL_GFLAGS, ETHTOOL_GFEATURES],
[], [], [[#include <linux/ethtool.h>
diff --git a/src/util/virsystemd.c b/src/util/virsystemd.c
index 969cd68..d2f4bfb 100644
--- a/src/util/virsystemd.c
+++ b/src/util/virsystemd.c
@@ -482,7 +482,7 @@ int virSystemdTerminateMachine(const char *name)
void
virSystemdNotifyStartup(void)
{
-#ifdef HAVE_SYS_UN_H
+#if defined(HAVE_SYS_UN_H) && defined(HAVE_MSG_NOSIGNAL)
const char *path;
const char *msg = "READY=1";
int fd;
@@ -526,7 +526,7 @@ virSystemdNotifyStartup(void)
VIR_WARN("Failed to notify systemd");
VIR_FORCE_CLOSE(fd);
-#endif /* HAVE_SYS_UN_H */
+#endif /* defined(HAVE_SYS_UN_H) && defined(HAVE_MSG_NOSIGNAL) */
}
static int
--
2.7.4
8 years, 5 months
[libvirt] Minor compile failure on OSX for libvirt 2.0.0
by Justin Clift
Hi all,
There's a minor compile failure on OSX with libvirt 2.0.0:
CC util/libvirt_util_la-virtime.lo
CC util/libvirt_util_la-virtpm.lo
util/virsystemd.c:524:26: error: use of undeclared identifier 'MSG_NOSIGNAL'
if (sendmsg(fd, &mh, MSG_NOSIGNAL) < 0)
^
1 error generated.
make[3]: *** [util/libvirt_util_la-virsystemd.lo] Error 1
make[3]: *** Waiting for unfinished jobs....
Seems solvable by adding a stub declaration for MSG_NOSIGNAL on
systems that don't implement it.
An initial patch with the declaration, developed by Tomasz Pajor
(CC'd), is below:
--- src/util/virsystemd.h.orig 2016-07-03 21:40:12.000000000 +0200
+++ src/util/virsystemd.h 2016-07-03 21:37:53.000000000 +0200
@@ -57,3 +57,7 @@
char *virSystemdGetMachineNameByPID(pid_t pid);
#endif /* __VIR_SYSTEMD_H__ */
+
+#ifndef MSG_NOSIGNAL
+#define MSG_NOSIGNAL 0x0 //Don't request NOSIGNAL on systems where this is not implemented.
+#endif
It's outside the #endif for __VIR_SYSTEMD_H___ though, so I'm kind of
thinking it would need to be move inside the guard (which also compiles
ok), or is there a better place/file for it instead? :)
Regards and best wishes,
Justin Clift
--
"My grandfather once told me that there are two kinds of people: those
who work and those who take the credit. He told me to try to be in the
first group; there was less competition there."
- Indira Gandhi
8 years, 5 months
[libvirt] [PATCH] qemu: Reset error if we're not going to error label
by Martin Kletzander
Signed-off-by: Martin Kletzander <mkletzan(a)redhat.com>
---
src/qemu/qemu_conf.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/src/qemu/qemu_conf.c b/src/qemu/qemu_conf.c
index fa9d65e91967..2a889381090f 100644
--- a/src/qemu/qemu_conf.c
+++ b/src/qemu/qemu_conf.c
@@ -266,8 +266,11 @@ virQEMUDriverConfigPtr virQEMUDriverConfigNew(bool privileged)
virFileFindHugeTLBFS(&cfg->hugetlbfs, &cfg->nhugetlbfs) < 0) {
/* This however is not implemented on all platforms. */
virErrorPtr err = virGetLastError();
- if (err && err->code != VIR_ERR_NO_SUPPORT)
- goto error;
+ if (err) {
+ if (err->code == VIR_ERR_NO_SUPPORT)
+ virResetError(err);
+ else
+ goto error;
}
if (VIR_STRDUP(cfg->bridgeHelperName, QEMU_BRIDGE_HELPER) < 0)
--
2.9.2
8 years, 5 months
[libvirt] [PATCH 0/2] Need to set booleans in right place for hotplug cleanup
by John Ferlan
After pushing and working on the next set of changes, I realized that
the setting of some booleans needed to be inside an if condition <sigh>.
John Ferlan (2):
qemu: Move setting of obj bools for qemuDomainAttachVirtioDiskDevice
qemu: Move setting of encobjAdded for qemuDomainAttachSCSIDisk
src/qemu/qemu_hotplug.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
--
2.5.5
8 years, 5 months
[libvirt] [PATCH 0/3] Resolve CI build integration test failure
by John Ferlan
Details in patches... The first patch was seen by inspection. The second
patch will fix the test failure. The third patch is the lipstick on the pig.
John Ferlan (3):
storage: Fix error path
qemu: Disallow usage of luks encryption if aes secret not possible
storage: Add extra failure condition for luks volume creation
src/qemu/qemu_domain.c | 7 +++++++
src/storage/storage_backend.c | 8 ++++++++
tests/qemuxml2argvtest.c | 4 ++++
3 files changed, 19 insertions(+)
--
2.5.5
8 years, 5 months
[libvirt] [PATCHv2 0/3] Speed up hvsupport.pl
by Ján Tomko
This reduces the script execution time from 14.7s to 60 ms.
Since this was by far the longest taking target from the docs/ directory
and make does not parallelize across Makefiles, the savings are similar
for a complete build from a fresh git checkout.
The second patch shaves off 8.2s, the third 6.4s and the last one shaves
off half of the remaining time.
v2:
* renamed parseAPIXML to getAPIFilenames
* documented getAPIFilenames
* comment in apibuild.py above the line that generates the data
consumed by hvsupport.pl
* more verbose commit messages
Ján Tomko (3):
hvsupport: use a regex instead of XML::XPath
hvsupport: construct the group regex upfront
hvsupport: skip non-matching lines early
bootstrap.conf | 1 -
docs/apibuild.py | 1 +
docs/hvsupport.pl | 69 +++++++++++++++++++++++++++++++++++++------------------
3 files changed, 48 insertions(+), 23 deletions(-)
--
2.7.3
8 years, 5 months
[libvirt] [PATCH 0/3] vz: make vz driver more responsive
by Nikolay Shirokovskiy
Patches 1 and 2 are tiny fixes and cleanups. 3 has the essence.
Nikolay Shirokovskiy (3):
vz: use state variable sdkdom in prlsdkApplyConfig
vz: remove redundant variable in prlsdkHandleVmAddedEvent
vz: make vz driver more responsive
src/vz/vz_driver.c | 183 ++++++++++++++++++++++++++++++++++---------------
src/vz/vz_sdk.c | 195 ++++++++++++++++++++++++++++++++++-------------------
src/vz/vz_utils.c | 50 ++++++++++++++
src/vz/vz_utils.h | 7 ++
4 files changed, 310 insertions(+), 125 deletions(-)
--
1.8.3.1
8 years, 5 months
Re: [libvirt] [Libvirt-ci] Build failed in Jenkins: libvirt-daemon-check » libvirt-centos-6 #1473
by Daniel P. Berrange
Hi John,
On Tue, Jul 19, 2016 at 02:58:06PM +0000, ci(a)centos.org wrote:
> See <https://ci.centos.org/job/libvirt-daemon-check/systems=libvirt-centos-6/1...>
This failure points to the LUKS patches.
372) QEMU XML-2-ARGV luks-disks ...
In '/home/jenkins/libvirt/systems/libvirt-centos-6/tests/qemuxml2argvdata/qemuxml2argv-luks-disks.args':
Offset 0
Expect [LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test QEMU_AUDIO_DRV=none /usr/bin/qemu -name encryptdisk -S -object secret,id=masterKey0,format=raw,file=/tmp/lib/domain--1-encryptdisk/master-key.aes -M pc-i440fx-2.1 -m 1024 -smp 1,sockets=1,cores=1,threads=1 -uuid 496898a6-e6ff-f7c8-5dc2-3cf410945ee9 -nographic -nodefaults -monitor unix:/tmp/lib/domain--1-encryptdisk/monitor.sock,server,nowait -no-acpi -boot c -usb -object secret,id=virtio-disk0-luks-secret0,data=9eao5F8qtkGt+seB1HYivWIxbtwUu6MQtg1zpj/oDtUsPr1q8wBYM91uEHCn6j/1,keyid=masterKey0,iv=AAECAwQFBgcICQoLDA0ODw==,format=base64 -drive file=/storage/guest_disks/encryptdisk,key-secret=virtio-disk0-luks-secret0,format=luks,if=none,id=drive-virtio-disk0 -device virtio-blk-pci,bus=pci.0,addr=0x4,drive=drive-virtio-disk0,id=virtio-disk0 -object secret,id=virtio-disk1-luks-secret0,data=9eao5F8qtkGt+seB1HYivWIxbtwUu6MQtg1zpj/oDtUsPr1q8wBYM91uEHCn6j/1,keyid=masterKey0,iv=AAECAwQFBgcICQoLDA0ODw==,format=base64 -drive file=/storage/guest_disks/encryptdisk2,key-secret=virtio-disk1-luks-secret0,format=luks,if=none,id=drive-virtio-disk1 -device virtio-blk-pci,bus=pci.0,addr=0x5,drive=drive-virtio-disk1,id=virtio-disk1 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3
]
Actual [LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test QEMU_AUDIO_DRV=none /usr/bin/qemu -name encryptdisk -S -object secret,id=masterKey0,format=raw,file=/tmp/lib/domain--1-encryptdisk/master-key.aes -M pc-i440fx-2.1 -m 1024 -smp 1,sockets=1,cores=1,threads=1 -uuid 496898a6-e6ff-f7c8-5dc2-3cf410945ee9 -nographic -nodefaults -monitor unix:/tmp/lib/domain--1-encryptdisk/monitor.sock,server,nowait -no-acpi -boot c -usb -drive file=/storage/guest_disks/encryptdisk,key-secret=AQCVn5hO6HzFAhAAq0NCv8jtJcIcE+HOBlMQ1A,format=luks,if=none,id=drive-virtio-disk0 -device virtio-blk-pci,bus=pci.0,addr=0x4,drive=drive-virtio-disk0,id=virtio-disk0 -drive file=/storage/guest_disks/encryptdisk2,key-secret=AQCVn5hO6HzFAhAAq0NCv8jtJcIcE+HOBlMQ1A,format=luks,if=none,id=drive-virtio-disk1 -device virtio-blk-pci,bus=pci.0,addr=0x5,drive=drive-virtio-disk1,id=virtio-disk1 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3]
... FAILED
Regards,
Daniel
--
|: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org -o- http://virt-manager.org :|
|: http://autobuild.org -o- http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|
8 years, 5 months
[libvirt] [PATCH] lxc: errors after the handshake won't be reported
by Cédric Bosdonnat
Any error happening after the hand shake in the lxc controller
will not result in a failure as errors are checked during the handshake.
Move the handshake after the last possible error.
---
src/lxc/lxc_controller.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/lxc/lxc_controller.c b/src/lxc/lxc_controller.c
index f55aadc..825b4d4 100644
--- a/src/lxc/lxc_controller.c
+++ b/src/lxc/lxc_controller.c
@@ -2444,13 +2444,13 @@ virLXCControllerRun(virLXCControllerPtr ctrl)
if (lxcControllerClearCapabilities() < 0)
goto cleanup;
- if (virLXCControllerDaemonHandshake(ctrl) < 0)
- goto cleanup;
-
for (i = 0; i < ctrl->nconsoles; i++)
if (virLXCControllerConsoleSetNonblocking(&(ctrl->consoles[i])) < 0)
goto cleanup;
+ if (virLXCControllerDaemonHandshake(ctrl) < 0)
+ goto cleanup;
+
/* We must not hold open a dbus connection for life
* of LXC instance, since dbus-daemon is limited to
* only a few 100 connections by default
--
2.6.6
8 years, 5 months
[libvirt] [PATCH v4 0/7] Add support for LUKS encrypted devices
by John Ferlan
According to Dan's post commit response:
http://www.redhat.com/archives/libvir-list/2016-July/msg00088.html
to the v3 series:
http://www.redhat.com/archives/libvir-list/2016-June/msg01935.html
using a 'passphrase' usage is not desired, rather a 'volume' usage
model should be used for LUKS.
So patches 1 & 2 make those alterations to already pushed docs and tests
Patch 3 then repurposes the 'passphrase' usage to a 'tls' usage type.
I posted with this series since it removed the 'passphrase' usage and
thus flushed out any errors in subsequent patches. I could hold off and
repost it with the TLS changes that will also need to be made...
Patches 4-7 were reviewed previously and had been given what I took
as provisional ACK's; however, I reposted the changes after the most
recent review "just in case". Fortunately (I guess) I didn't push
them along with the other changes. In any case, there are once again
posted here - the primary difference between what's posted in this
series vs. what was posted previously is the change to use a "volume"
secret plus a tweak to the qemuxml2argvtest to fix some issues found
while making the change.
John Ferlan (7):
tests: Adjust LUKS tests to use 'volume' secret type
docs: Update docs to reflect LUKS secret changes
Repurpose the 'passphrase' secret to 'tls'
storage: Add support to create a luks volume
qemu: Add secinfo for hotplug virtio disk
qemu: Alter the qemuDomainGetSecretAESAlias to add new arg
qemu: Add luks support for domain disk
docs/aclpolkit.html.in | 2 +-
docs/formatsecret.html.in | 81 +++++---
docs/formatstorage.html.in | 16 ++
docs/formatstorageencryption.html.in | 29 ++-
docs/schemas/secret.rng | 6 +-
include/libvirt/libvirt-secret.h | 2 +-
src/access/viraccessdriverpolkit.c | 2 +-
src/conf/secret_conf.c | 12 +-
src/conf/virsecretobj.c | 2 +-
src/libvirt_private.syms | 1 +
src/qemu/qemu_alias.c | 10 +-
src/qemu/qemu_alias.h | 3 +-
src/qemu/qemu_command.c | 9 +
src/qemu/qemu_domain.c | 40 +++-
src/qemu/qemu_hotplug.c | 126 +++++++++++-
src/storage/storage_backend.c | 218 +++++++++++++++++++--
src/storage/storage_backend.h | 3 +-
src/util/virqemu.c | 23 +++
src/util/virqemu.h | 6 +
.../qemuxml2argv-luks-disk-cipher.xml | 45 -----
.../qemuxml2argvdata/qemuxml2argv-luks-disks.args | 36 ++++
tests/qemuxml2argvdata/qemuxml2argv-luks-disks.xml | 2 +-
tests/qemuxml2argvtest.c | 24 ++-
.../qemuxml2xmlout-luks-disk-cipher.xml | 1 -
tests/qemuxml2xmltest.c | 1 -
tests/secretxml2xmlin/usage-passphrase.xml | 7 -
tests/secretxml2xmlin/usage-tls.xml | 7 +
tests/secretxml2xmltest.c | 2 +-
tests/storagevolxml2argvtest.c | 3 +-
tests/storagevolxml2xmlin/vol-luks-cipher.xml | 2 +-
tests/storagevolxml2xmlin/vol-luks.xml | 2 +-
tests/storagevolxml2xmlout/vol-luks-cipher.xml | 2 +-
tests/storagevolxml2xmlout/vol-luks.xml | 2 +-
33 files changed, 577 insertions(+), 150 deletions(-)
delete mode 100644 tests/qemuxml2argvdata/qemuxml2argv-luks-disk-cipher.xml
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-luks-disks.args
delete mode 120000 tests/qemuxml2xmloutdata/qemuxml2xmlout-luks-disk-cipher.xml
delete mode 100644 tests/secretxml2xmlin/usage-passphrase.xml
create mode 100644 tests/secretxml2xmlin/usage-tls.xml
--
2.5.5
8 years, 5 months