[libvirt] [PATCH 0/3] Couple of build fixes
by Michal Privoznik
I've noticed couple of build failures with a bleeding edge gcc.
Here are fixes to some of them.
Michal Privoznik (3):
docs: Teach apibuild to deal with (1U << 31) too
Turn 1<<31 into 1U<<31
build: use gnulib's unsetenv
bootstrap.conf | 1 +
docs/apibuild.py | 3 ++-
include/libvirt/libvirt-domain.h | 2 +-
src/util/virtypedparam.h | 2 +-
4 files changed, 5 insertions(+), 3 deletions(-)
--
2.8.3
8 years, 5 months
[libvirt] [PATCH rfc 0/1] storage: vzstorage storage pool
by Olga Krishtal
In-Reply-To:
This is first draft, that supports vzstorage in storage pools.i
Virtuozzo Storage is a fault-tolerant distributed storage system, optimized
for virtualization workloads.
Vzstorage pool supports the same volume formats as directory, nfs, etc.
In terms of volume management - there is no difference between these pools.
You can find more information here: https://openvz.org/Virtuozzo_Storage
XML:
<pool type='vz'>
<name>vz7_pool</name>
<uuid>b27a72b5-a92e-4e58-a172-a80ba73b30fe</uuid>
<capacity unit='bytes'>0</capacity>
<allocation unit='bytes'>0</allocation>
<available unit='bytes'>0</available>
<source>
<host name='127.0.0.2'/>
<device path='vz7-vzstorage'/>
<dir path='/pool1'/>
</source>
<target>
<path>/vz7-vzstorage</path>
</target>
</pool>
To compile libvirt with vz pool support use key --with-storage-vz
I need some help to resolve some problems:
- how to detect that pool is alredy mounted.
- when we show pool sources do we need to show folders that may reside on vzstorage
- I am not quite sure that we need host name in xml.
I will be glad to here your opinion.
8 years, 5 months
[libvirt] [PATCH] maint: update to latest gnulib
by Eric Blake
Pulls in several portability fixes, including the fact that gnulib
now only works on platforms with two's complement signed integers.
Also makes for a smaller delta on the next update (we are waiting
on a license change to unsetenv for the sake of mingw).
* .gnulib: Update to latest.
* bootstrap: Resync from upstream.
* tests/virstringtest.c: Drop use of obsolete probes of integer
properties.
Signed-off-by: Eric Blake <eblake(a)redhat.com>
---
I'd like to get this in now, before RC1 is cut, so that we maximize
the testing of the bulk of the gnulib changes (rather than waiting
for the unsetenv change needed for mingw to land, but forcing the
gnulib update to only get testing in RC2).
* .gnulib 6cc32c6...8d807a9 (127):
> gendocs.sh: Set default TOP_NODE_UP_URL in HTML output.
> manywarnings: update for GCC 6.1
> autoupdate
> intdiv0, memmem, nocrash, strcasestr, strstr: no exit
> glob: size_t overflow checks
> glob: don't assume INT_MAX < SIZE_MAX
> Fix undefined behaviour in gettext.h.
> autoupdate
> git-version-gen: avoid undefined shift
> update from texinfo
> glob: merge glibc changes into lib/glob.c
> mktime: spelling fix in comment
> mktime: port to stricter signed overflow checking
> mktime: speed up DEBUG_MKTIME benchmarks
> mktime: resurrect DEBUG_MKTIME testing
> mktime: simplify DEBUG_MKTIME
> Port mktime_internal offset to unsigned time_t
> xstrtol: prohibit monstrosities like "1bB"
> xstrtod: reinstate setting of *result upon ERANGE
> xstrtod: modify *result only if no errors
> btowc: document problems in C locale
> autoupdate
> update from texinfo
> mktime: improve integer overflow checking
> intprops: check two's complement assumption
> intprops, mktime, strtol: assume two's complement
> stdint: port to strict C11 left shift
> mbrtowc: work around glibc bug#19932
> update from texinfo
> autoupdate
> stdint: detect good enough pre-C++11 stdint.h in C++ mode
> argp: merge changes from glibc
> Prefer American spelling for "initialize"
> autoupdate
> stddef: support configuring with g++
> autoupdate
> autoupdate
> update from texinfo
> test-framework-sh: minor cleanups
> test-framework-sh: revert port to NetBSD 7.0
> autoupdate
> Port better to Alpine Linux
> test-framework-sh: port to NetBSD 7.0
> update from texinfo
> gitlog-to-changelog: suppress ignored chatter
> update from texinfo
> update from texinfo
> setlocale: add "sv" to Windows language table
> update from texinfo
> sys_select: port to new Cygwin
> test-userspec.c: do not trigger gcc's new -Wmisleading-indentation
> time_rz: port to clang -Wunused-const-variable
> std-gnu11: improve clang support
> select: port more to Intel 2016.1.150 compiler
> select: try to port to 2016.1.150 compiler
> localename-tests: memory allocation fixes
> intprops: make .h file license match module
> acl: fix missing return on Cygwin
> update from texinfo
> update from texinfo
> extern-inline: port to PGI CC
> update from texinfo
> update from texinfo
> signbit: port back to pre-C++11 GCC
> mountlist: recognize autofs-mounted remote file systems, too
> signbit: port to C++ with GCC 6
> regex: make it closer to libc
> regex: merge patches from libc
> update from texinfo
> update from texinfo
> autoupdate
> autoupdate
> stdalign: port to older HP and IBM cc
> stdalign: port to clang 3.7.0
> update from texinfo
> readdir_r: now obsolescent
> Use modern texinfo when syncing install.texi output from autoconf
> update from texinfo
> sync install.texi from autoconf
> misc: port better to gcc -fsanitize=address
> update from texinfo
> autoupdate
> verify-tests: also remove stray test-verify.Tpo
> std-gnu11: new module
> update from texinfo
> update from texinfo
> get-permissions, strftime: fix grammar in comments
> gettext: mark as obsolete
> gnulib-tool: don't give up on ln -s so easily
> closedir: fix OS/2-related typos
> openat_proc_name: fix that last '/' is overwritten on OS/2 kLIBC
> regex: treat [x] as x if x is a unibyte encoding error
> closedir, dirfd, opendir: port to OpenSolaris 5.10
> bootstrap: use American spelling
> @item needed inside @itemize
> hash-pjw-bare: fix comment
> wcwidth: Replace also on OpenBSD 5.8
> update from texinfo
> gnu-web-doc-update: fix addition of new files
> utimens-tests: avoid pulling gettext .m4 files
> regex: pacify static checkers
> regex: fix [ diagnostic
> regex: fix memory leaks
> fts: don't unconditionally use leaf optimization for NFS
> * gnulib-tool: fix stray debug line in previous patch
> gnulib-tool: don't assume ln -s works
> utimes: detect utimes() correctly on OS/2 kLIBC
> openat_proc_name: port to OS/2 kLIBC
> stdint: check _INTPTR_T_DECLARED for intptr_t etc.
> doc: mention unfixed issues with unsupported localtime() values
> Go back to gettext-0.19.7
> opendir, closedir, dirfd, fdopendir: port to OS/2 kLIBC
> dup, dup2, fcntl: support a directory fd on OS/2 kLIBC
> pipe_filter_ii_execute: port to OS/2 kLIBC
> wchar: fix "conflicting types" error for __wcwidth on OS/2 kLIBC
> w32spawn: clear SHELL_SPECIAL_CHARS and SHELL_SPACE_CHAR on OS/2 kLIBC
> pipe-filter-aux: undefine HAVE_SELECT on KLIBC
> binary-io: don't put fd in binary mode if it is a console on EMX
> doc: mention setlocale() issues on OpenBSD
> sig2str: list all signals on FreeBSD >= 7
> acl-permissions: port to USE_ACL==0 platforms
> mktime: rename macro to avoid glibc clash
> Port "$@" to OpenIndiana ksh93
> autoupdate
> Port Universal Time settings to strict POSIX
> update from texinfo
> update from texinfo
.gnulib | 2 +-
bootstrap | 6 +++---
tests/virstringtest.c | 9 +++------
3 files changed, 7 insertions(+), 10 deletions(-)
diff --git a/.gnulib b/.gnulib
index 6cc32c6..8d807a9 160000
--- a/.gnulib
+++ b/.gnulib
@@ -1 +1 @@
-Subproject commit 6cc32c63e80bc1a30c521b2f07f2b54909b59892
+Subproject commit 8d807a99c6e8eecd2a9cf7c7b5d48ec0b2c934f8
diff --git a/bootstrap b/bootstrap
index 294c0bc..f060bab 100755
--- a/bootstrap
+++ b/bootstrap
@@ -1,6 +1,6 @@
#! /bin/sh
# Print a version string.
-scriptversion=2014-12-08.12; # UTC
+scriptversion=2016-01-24.06; # UTC
# Bootstrap this package from checked-out sources.
@@ -42,7 +42,7 @@ export LC_ALL
local_gl_dir=gl
-# Honour $PERL, but work even if there is none
+# Honor $PERL, but work even if there is none.
PERL="${PERL-perl}"
me=$0
@@ -1021,6 +1021,6 @@ echo "$0: done. Now you can run './configure'."
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-time-zone: "UTC"
+# time-stamp-time-zone: "UTC0"
# time-stamp-end: "; # UTC"
# End:
diff --git a/tests/virstringtest.c b/tests/virstringtest.c
index 7a1dcfd..63b8009 100644
--- a/tests/virstringtest.c
+++ b/tests/virstringtest.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2012-2014 Red Hat, Inc.
+ * Copyright (C) 2012-2016 Red Hat, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -23,7 +23,6 @@
#include <stdlib.h>
#include "testutils.h"
-#include "intprops.h"
#include "verify.h"
#include "virerror.h"
#include "viralloc.h"
@@ -409,13 +408,11 @@ struct stringToLongData {
/* This test makes assumptions about our compilation platform that are
* not guaranteed by POSIX. Good luck to you if you are crazy enough
- * to try and port libvirt to a platform with 16-bit int. */
+ * to try and port libvirt to a platform with 16-bit int. Gnulib
+ * already assumes that signed integers are two's complement. */
verify(sizeof(int) == 4);
-verify(TYPE_TWOS_COMPLEMENT(int));
verify(sizeof(long) == sizeof(int) || sizeof(long) == sizeof(long long));
-verify(TYPE_TWOS_COMPLEMENT(long));
verify(sizeof(long long) == 8);
-verify(TYPE_TWOS_COMPLEMENT(long long));
static int
testStringToLong(const void *opaque)
--
2.5.5
8 years, 6 months
[libvirt] [PATCH] maint: update to latest gnulib
by Eric Blake
Fix a regression in checking for realpath (which caused link
failures regarding duplicate rpl_canonicalize_file_name), and
fix the mingw build regarding unsetenv.
* .gnulib: Update to latest.
Signed-off-by: Eric Blake <eblake(a)redhat.com>
---
Fixes the reported failure with canonicalize_file_name,
but there's still the issue of new gcc warnings enabled
which affect F24 with its newer gcc.
.gnulib | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
* .gnulib 8d807a9...246b3b2 (3):
> canonicalize: Fix broken probe for realpath.
> unsetenv: relax to LGPLv2+
> update from texinfo
diff --git a/.gnulib b/.gnulib
index 8d807a9..246b3b2 160000
--- a/.gnulib
+++ b/.gnulib
@@ -1 +1 @@
-Subproject commit 8d807a99c6e8eecd2a9cf7c7b5d48ec0b2c934f8
+Subproject commit 246b3b28808ee5f4664be674dce573af9497fc7a
--
2.5.5
8 years, 6 months
[libvirt] inconsistency in attribute usage between hv drivers
by Laine Stump
I just came across this problem while looking for the proper place to
put <ip> info for the host side of <interface type='ethernet'>. I don't
think there's really anything that can be done about it now, since
everything below has been in place for so long, but maybe it can serve
as a cautionary tale.
Prologue: A week or two ago, I made patches to support <interface
type='ethernet'> in the LXC driver. I did this not because I have a need
for that, but because it seemed like the perfect avenue for
investigating the best way to add IP address and route config to
<interface>, as it is one environment where we have a need *and* the
ability to setup IP info for both the host and guest sides of the
interface. I accomplished this by simply generalizing the existing
<interface type='bridge'> code to not attach the host-side veth device
to a bridge.
This makes all common attributes between type='ethernet' and
type='bridge' consistent, including the configuration of guest-side and
host-side device names, and here we come to the first inconsistency -
the device name for the veth/tap on the host side is in the <target>
element (which I've always been told is supposed to be used for
device-specific info about how the device will be presented on the
*guest* side, but I suppose this is because <interface type='direct'>
uses <source dev='blah'> to provide the name of the physical device that
the macvtap device (named in <target dev='macvblah'/> is attached to).
And I guess because the dev attribute was already in-use in <target> the
much more recently added guest-side name is given in the <guest>
subelement (in LXC at least):
<interface type='ethernet'>
<target dev='hostblah'/> <-- name of veth on host side
<guest dev='guestblah'/> <-- name of veth on guest side
...
Now, this "is what it is". There is no changing it. In particular, the
use of <target dev> for the host-side device name has been in use for so
long and is so deeply ingrained that it's just part of the scenery.
Moving for a minute to the IP address/route info for the guest side is
already configured in the toplevel <ip> and <route> subelements of
<interface>,
<interface type='ethernet'>
<ip address='1.2.3.4' .../>
</interface>
My first thought was to put the <ip> for the host side inside <source>:
<interface type='ethernet'>
<source>
<ip address='1.2.3.5' .../> <-- host side
</source>
<ip address='1.2.3.4' .../> <-- guest side
</interface>
That makes sense to me because it parallels what we do with PCI
addresses for hostdev - the PCI address in <source> tells what the
address is on the host, and the one at the toplevel of <hostdev> tells
what the PCI address will be in the guest. It *doesn't* fit well with
the fact that the device we're setting up is named in <target> though,
so we're already inconsistent, but putting the host-side IP config in
<target> seems like an invitation to mix things up even more in the
future, since <target> is used everywhere else as a place to put stuff
related to what the device looks like in the guest (although... for
<interface>, <target> *is* currently used only for the host-side
tap/veth device name; so maybe we just can define the purpose of
<target> differently in this one case... But I digress).
So I went to the code to add parsing of <ip> inside <source>, and found
that the type-specific data for ethernet has a dev, and that field in
the object is set during parsing from <source dev='blah'/>, *and* that
the openvz driver uses that dev name as the name of the network device
in the *guest*! (even though my understanding of <source> is that it is
supposed to be used for information about the *host* side of any device.
Sigh.) So on openvz, we have this:
<interface type='ethernet'>
<target dev='hostblah'/> <-- name of interface on host side
<source dev='guestblah'/> <-- name of interface on guest side
...
which seems exactly the opposite of what it should be. Note that this
doesn't seem to be documented anywhere except in the few lines in
openvz_driver.c that implement it. (Note that, prior to commit 9a4b705f7
back in 2010, which added support for type='ethernet' in openvz, the
"dev" field was already in the ethernet-specific sub-object of
virDomainNetDef, but it was only used to hold the name of the bridge
that a tap device was attached to when converting from a qemu
commandline to XML (also, as previously stated, for type='direct' it is
used to name the physical device on the host that the macvtap interface
is connected to, i.e. *exactly* the opposite end of the chain). It looks
like the poster of the openvz patch just saw an opportune
existing-but-unused-by-type=ethernet attribute and took advantage, and
it wasn't noticed in review).
I'm actually skeptical that anyone even uses this, since openvz is a
less-used driver, type='ethernet' is less used among interface types,
and even after that it's valid to not provide a name, in which case one
is automatically generated. But there is no way to verify that, so we're
stuck with it. It is true that the LXC version of type='ethernet' was
added only a few days ago, and there hasn't yet been a release, so I
*could* modify it to be consistent with the attribute usage in the
openvz driver. But that would make <interface type='ethernet'> in LXC
inconsistent with <interface type='bridge'> in LXC, which is a much
worse situation. IT seems there is nothing to change. As I said above
"it is what it is".
So why am I writing this message? Partly to just vent frustration (aka
"whine") I suppose :-). Also partly as public testimony that my
seemingly excessive worrying over attribute naming and placement is
justified, and not just OCD. Also, as I said above, as a cautionary tale
that any patch adding *any* XML config knob, or making use of an
existing XML config knob needs extra scrutiny to help minimize such
messes in the future.
8 years, 6 months
[libvirt] [PATCH] unsetenv: relax to LGPLv2+
by Eric Blake
Especially since setenv is also LGPLv2+, and it makes sense for the
two modules to stay in sync.
Signed-off-by: Eric Blake <eblake(a)redhat.com>
---
Libvirt wants LGPLv2+ when it uses gnulib, and recently ran into
a problem where it can use the setenv module for mingw but not the
unsetenv module. Barring any negative reviews, I'll push this in
24 hours, or sooner if I get a positive review; then libvirt will
have to pick up the latest gnulib to make use of it.
modules/unsetenv | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/modules/unsetenv b/modules/unsetenv
index 015ac4e..909cec9 100644
--- a/modules/unsetenv
+++ b/modules/unsetenv
@@ -24,7 +24,7 @@ Include:
<stdlib.h>
License:
-LGPL
+LGPLv2+
Maintainer:
all
--
2.5.5
8 years, 6 months
[libvirt] [PATCH] lxc: Fix virLXCDomainObjBeginJob position in lxcDomainSetMemoryParameters
by Katerina Koukiou
Adjust the code to perform the virLXCDomainObjBeginJob first
and then the call virDomainLiveConfigHelperMethod.
As Ján Tomko pointed out, in virDomainLiveConfigHelperMethod,
there is a check to see if the domain is active when AFFECT_LIVE is set.
Since virLXCDomainObjBeginJob unlocks the virDomainObjPtr lock,
the domain could possibly be destroyed while we wait for the job
and the check results would no longer be valid.
Signed-off-by: Katerina Koukiou <k.koukiou(a)gmail.com>
---
src/lxc/lxc_driver.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/src/lxc/lxc_driver.c b/src/lxc/lxc_driver.c
index 3aadd64..f883ffb 100644
--- a/src/lxc/lxc_driver.c
+++ b/src/lxc/lxc_driver.c
@@ -841,14 +841,16 @@ lxcDomainSetMemoryParameters(virDomainPtr dom,
cfg = virLXCDriverGetConfig(driver);
if (virDomainSetMemoryParametersEnsureACL(dom->conn, vm->def, flags) < 0 ||
- !(caps = virLXCDriverGetCapabilities(driver, false)) ||
- virDomainLiveConfigHelperMethod(caps, driver->xmlopt,
- vm, &flags, &vmdef) < 0)
+ !(caps = virLXCDriverGetCapabilities(driver, false)))
goto cleanup;
if (virLXCDomainObjBeginJob(driver, vm, LXC_JOB_MODIFY) < 0)
goto cleanup;
+ if (virDomainLiveConfigHelperMethod(caps, driver->xmlopt,
+ vm, &flags, &vmdef) < 0)
+ goto endjob;
+
if (flags & VIR_DOMAIN_AFFECT_LIVE &&
!virCgroupHasController(priv->cgroup, VIR_CGROUP_CONTROLLER_MEMORY)) {
virReportError(VIR_ERR_OPERATION_INVALID,
--
2.7.4
8 years, 6 months
[libvirt] [PATCHv2] Added hook for network modification event
by Khramov Anton
From: Anton Khramov <anton(a)endocode.com>
Anton Khramov (1):
network: Added hook for network modification event
docs/hooks.html.in | 2 ++
src/network/bridge_driver.c | 5 +++++
src/util/virhook.c | 3 ++-
src/util/virhook.h | 1 +
4 files changed, 10 insertions(+), 1 deletion(-)
--
1.9.1
8 years, 6 months