[libvirt] [PATCH 1/2] adapt to API change in gnulib
by Jim Meyering
This is actually two changes sets.
The first part is an update from gnulib (including the fix for API change),
the second adjusts .cvsignore files (sorting at same time)
so that "git status" is clean after you run "make sync-vcs-ignore-files"
to generate all .gitignore files.
For reference, the complete (5000+-line) patch is here:
http://meyering.net/code/tmp/libvirt-gnulib.patch
If no one comments, I'll commit this in a couple hours.
Jim
>From 89a1178cd0beaadbda730aacc67fe8f27e919914 Mon Sep 17 00:00:00 2001
From: Jim Meyering <meyering(a)redhat.com>
Date: Wed, 22 Oct 2008 16:56:58 +0200
Subject: [PATCH 1/2] adapt to API change in gnulib
* qemud/qemud.c: Include <netdb.h>, not "getaddrinfo.h"
* src/remote_internal.c: Likewise.
updates from gnulib
* gnulib/lib/.cvsignore:
* gnulib/lib/Makefile.am:
...
---
.gitignore | 32 ---
gnulib/lib/.cvsignore | 6 +
gnulib/lib/.gitignore | 23 --
gnulib/lib/Makefile.am | 194 +++++++++++++--
gnulib/lib/arpa_inet.in.h | 6 +
gnulib/lib/c-ctype.h | 17 ++-
gnulib/lib/float.in.h | 6 +-
gnulib/lib/gai_strerror.c | 7 +-
gnulib/lib/getaddrinfo.c | 18 ++-
gnulib/lib/getaddrinfo.h | 163 ------------
gnulib/lib/getdelim.c | 15 +-
gnulib/lib/netinet_in.in.h | 6 +-
gnulib/lib/poll.c | 439 ++++++++++++++++++++++++++++----
gnulib/lib/stdint.in.h | 5 +-
gnulib/lib/stdio.in.h | 90 +++++++
gnulib/lib/stdlib.in.h | 83 ++++++
gnulib/lib/string.in.h | 22 ++-
gnulib/lib/sys_select.in.h | 37 +++-
gnulib/lib/sys_socket.in.h | 311 ++++++++++++++++++++++-
gnulib/lib/sys_stat.in.h | 50 ++++-
gnulib/lib/sys_time.in.h | 6 +-
gnulib/lib/unistd.in.h | 167 ++++++++++++-
gnulib/lib/vasnprintf.c | 82 ++++++-
gnulib/lib/wchar.in.h | 10 +
gnulib/m4/arpa_inet_h.m4 | 9 +-
gnulib/m4/eoverflow.m4 | 70 -----
gnulib/m4/getaddrinfo.m4 | 16 +-
gnulib/m4/getdelim.m4 | 1 +
gnulib/m4/gnulib-cache.m4 | 2 +-
gnulib/m4/gnulib-common.m4 | 12 +-
gnulib/m4/gnulib-comp.m4 | 99 +++++++-
gnulib/m4/include_next.m4 | 32 ++-
gnulib/m4/inet_ntop.m4 | 5 +-
gnulib/m4/inet_pton.m4 | 5 +-
gnulib/m4/lib-link.m4 | 27 ++-
gnulib/m4/lib-prefix.m4 | 88 +++++--
gnulib/m4/lock.m4 | 330 ++-----------------------
gnulib/m4/posix-shell.m4 | 6 +-
gnulib/m4/stdio_h.m4 | 132 ++++++----
gnulib/m4/stdlib_h.m4 | 11 +-
gnulib/m4/strdup.m4 | 22 ++-
gnulib/m4/string_h.m4 | 11 +-
gnulib/m4/sys_select_h.m4 | 20 ++-
gnulib/m4/sys_socket_h.m4 | 64 ++++-
gnulib/m4/sys_stat_h.m4 | 6 +-
gnulib/m4/unistd_h.m4 | 44 +++-
gnulib/m4/wchar.m4 | 25 ++-
gnulib/tests/.cvsignore | 22 ++
gnulib/tests/.gitignore | 29 --
gnulib/tests/Makefile.am | 193 +++++++++++++-
gnulib/tests/dummy.c | 42 ---
gnulib/tests/test-EOVERFLOW.c | 32 ---
gnulib/tests/test-getaddrinfo.c | 2 +-
gnulib/tests/test-sys_select.c | 5 +-
gnulib/tests/test-vc-list-files-cvs.sh | 3 +-
gnulib/tests/test-vc-list-files-git.sh | 3 +-
gnulib/tests/test-wchar.c | 6 +-
qemud/qemud.c | 2 +-
src/remote_internal.c | 2 +-
59 files changed, 2191 insertions(+), 982 deletions(-)
delete mode 100644 .gitignore
delete mode 100644 gnulib/lib/.gitignore
delete mode 100644 gnulib/lib/getaddrinfo.h
delete mode 100644 gnulib/m4/eoverflow.m4
delete mode 100644 gnulib/tests/.gitignore
delete mode 100644 gnulib/tests/dummy.c
delete mode 100644 gnulib/tests/test-EOVERFLOW.c
...
diff --git a/qemud/qemud.c b/qemud/qemud.c
index 9da27d2..db1a107 100644
--- a/qemud/qemud.c
+++ b/qemud/qemud.c
@@ -47,11 +47,11 @@
#include <fnmatch.h>
#include <grp.h>
#include <signal.h>
+#include <netdb.h>
#include "internal.h"
#include "qemud.h"
-#include "getaddrinfo.h"
#include "util.h"
#include "remote_internal.h"
#include "conf.h"
diff --git a/src/remote_internal.c b/src/remote_internal.c
index 35b7b4b..47a86f0 100644
--- a/src/remote_internal.c
+++ b/src/remote_internal.c
@@ -58,7 +58,7 @@
#endif
#include <libxml/uri.h>
-#include "getaddrinfo.h"
+#include <netdb.h>
/* AI_ADDRCONFIG is missing on some systems. */
#ifndef AI_ADDRCONFIG
--
1.6.0.2.588.g3102
>From a353993bd18f16ff049839b8ae72c835b04c05ab Mon Sep 17 00:00:00 2001
From: Jim Meyering <meyering(a)redhat.com>
Date: Wed, 22 Oct 2008 17:06:48 +0200
Subject: [PATCH 2/2] update .cvsignore files; regenerate .gitignore from them
---
.cvsignore | 39 +++++++++++++++++++---------------
.gitignore | 37 +++++++++++++++++++++++++++++++++
gnulib/lib/.gitignore | 29 ++++++++++++++++++++++++++
gnulib/tests/.cvsignore | 49 ++++++++++++++++++++++---------------------
gnulib/tests/.gitignore | 52 +++++++++++++++++++++++++++++++++++++++++++++++
5 files changed, 165 insertions(+), 41 deletions(-)
create mode 100644 .gitignore
create mode 100644 gnulib/lib/.gitignore
create mode 100644 gnulib/tests/.gitignore
diff --git a/.cvsignore b/.cvsignore
index eded526..ecb8bf0 100644
--- a/.cvsignore
+++ b/.cvsignore
@@ -1,32 +1,37 @@
+*.a
+*.o
+*.orig
...
16 years, 2 months
[libvirt] Problem in running libvirt-cim test suite
by srinivas k
Hi,
I trying to install libvirt-cim in my ubuntu-xen-3.2.1 machine. I am able to
install all dependencies and libvirt-cim , but when I run cimtest which has
given in libvirt.org, I am getting following error message
* Starting test suite: libvirt-cim
ERROR - Failed to create Virtual Network 'cimtest-networkpool'
Unable to create network pool cimtest-networkpool
Please check your environment.*
Is there any special networking setup is require to run cimtest.
Any help would be appreciated. Apologies if this topic has been covered
already. I can't find it anywhere using Google
Thanks,
seenu.
16 years, 2 months
[libvirt] image locking?
by Itamar Heim
Hi,
I am interested to find out how libvirt envisions image locking.
i.e., how do we make sure multiple nodes are not trying to access the
same storage volume, probably causing image corruption.
I know this can be solved by means of a cluster, but it seems excessive
(and not possible in all scenarios).
Central administration (ovirt-like) is also problematic, since unless
fencing is assumed, it cannot verify the image is no longer being used.
If the image/storage volume could be locked (or leased lock), either by
the storage/LVM/NFS preventing from a node access to a specific image,
or by having libvirt/qemu mutually check the lock before accessing it
(very simply, in leased lock we can check every X minutes, and kill the
process to make sure it honors the lock).
Any thoughts on the subject?
Thanks,
Itamar
16 years, 2 months
[libvirt] errors building rpm
by Ben Guthro
I keep getting the following error when trying to build via a
'sudo make rpm' on the tip of the tree
+ /usr/lib/rpm/find-lang.sh /var/tmp/libvirt-0.4.6-1.fc9-root libvirt
No translations found for libvirt in /var/tmp/libvirt-0.4.6-1.fc9-root
error: Bad exit status from /var/tmp/rpm-tmp.82848 (%install)
RPM build errors:
Bad exit status from /var/tmp/rpm-tmp.82848 (%install)
make: *** [rpm] Error 1
This looks like it came in with one of Jim Meyering's latest checkins.
I'm wondering if I'm doing something wrong - or if I'm missing a build
dependency that I did not need previously?
Ben Guthro
16 years, 2 months
[libvirt] [PATCH 00/12] Domain Events - Round 3
by Ben Guthro
The following patch series implements the Events API discussed here previously in this thread:
http://www.redhat.com/archives/libvir-list/2008-September/msg00321.html
http://www.redhat.com/archives/libvir-list/2008-October/msg00245.html and
https://www.redhat.com/archives/libvir-list/2008-October/msg00432.html
Once again, I have broken these into the following patches:
events-01-public-api Changes to libvirt.h, and libvirt.c
events-02-internal-api Changes to internal.h and event code
events-03-qemud Changes to the daemon
events-04-qemud-rpc-protocol Changes to the qemud rpc protocol
events-05-driver.patch Changes to the driver API
events-06-driver-qemu Changes to the qemu driver
events-07-driver-remote Changes to the remote driver
events-08-driver-lxc Minor changes to LXC driver structure to prevent compile errors
events-09-driver-openvz Minor changes to openvz driver structure to prevent compile errors
events-10-driver-test Minor changes to test driver structure to prevent compile errors
events-11-example-testapp Test app, and infrastructure changes for an example dir
events-12-python-ignore.patch Add functions to be ignored, for now
Differences from last submission -
Formatting issues brought up by Daniel V
Some protocol simplifications
General fixes suggested from last time around.
Removal of POLLxxx stuff (this caused a bit of churn)
I think I got them all, but please let me know if I missed something.
Again, domain events are only emitted from qemu/kvm guests.
Ben Guthro
16 years, 2 months
[libvirt] [PATCH 0 of 2] Cgroup and LXC fixes
by Dan Smith
This set moves the cgroup creation before that of the container process,
thus ensuring that it is put in the cgroup as well. As a result, I noticed
that we need to allow device access to /dev/pts/*, and thus added a cgroup
mechanism to allow a whole major device type. The LXC driver is made to
allow major type 136 as a result.
Note that this doesn't seem to do much to really restrict the container.
While it does prevent them from opening devices other than what are allowed,
the container can still mount (or access) the cgroup filesystem and move
itself out of its own group and into the unrestricted root. Further,
it can just add whitelist entries for the devices it wants to gain access.
I tested code to restrict the devices in the per-driver cgroup, but that
appears to have no effect, because from within the container, I can still
add "b 8:* rwm" to my group's devices.allow and subsequently access SCSI
disks. Even still, this patch set is crucial for proper cgroup membership of
the container children.
16 years, 2 months
[libvirt] [PATCH 3/5]: Set format type to LVM2 on NULL format
by Chris Lalancette
Again because of my generic VIR_ENUM_IMPL patch last week, I unwittingly caused
a regression in the storage_backend_logical driver. Previously, if you
submitted logical pool XML that had no <source><format type='lvm2'/> string, it
would just default to VIR_STORAGE_POOL_LOGICAL_LVM2. This would succeed just
fine and go on with life. This is no longer the case, and now XML without the
format tag fails to define. To maintain backwards compatibility with already
existing XML that expects this, add a compatibility wrapper to return
VIR_STORAGE_POOL_LOGICAL_LVM2 on an empty format tag.
Signed-off-by: Chris Lalancette <clalance(a)redhat.com>
16 years, 2 months
[libvirt] [PATCH 4/5]: Make dumpXML more idempotent with defineXML
by Chris Lalancette
Currently, you can define a logical storage pool with something like the following:
<pool type='logical'>
<source>
<name>MyVG</name>
<device name='/dev/sdb'/>
...
However, dumping out the XML for this same storage pool (with, say, virsh
pool-dumpxml), gives:
<pool type='logical'>
<source>
<name>MyVG</name>
<device name='/dev/sdb'>
</device>
To make this more idempotent, do the <device name='/dev/sdb'/> form by default,
and only do the <device>...</device> form if .nfreeExtent is defined for the
storage pool.
Signed-off-by: Chris Lalancette <clalance(a)redhat.com>
16 years, 2 months
[libvirt] [PATCH 2/5]: Properly set errors on unknown format types
by Chris Lalancette
Because of my patch last week that converted the various virStorage*FromString
and virStorage*ToString implementations to the generic VIR_ENUM_IMPL, there were
a couple of places that didn't properly set errors when they failed. This patch
fixes these places up. It also adds an additional check in virEnumFromString(),
so that if a NULL type is passed in, it fails instead of SEGV'ing.
Signed-off-by: Chris Lalancette <clalance(a)redhat.com>
16 years, 2 months
[libvirt] [PATCH 1/5]: Shore up virGetLastError handling
by Chris Lalancette
While doing testing on this patch series, I mistakenly added a bogus piece of
storage XML to libvirtd, which was saved in /etc/libvirt/storage. On subsequent
stop/start of libvirtd, because of another bug (fixed in a later patch), an
error wasn't being set properly in an error path, so libvirtd was SEGV'ing in
storage_conf.c:virStoragePoolObjLoad when trying to dereference the NULL err
returned from virGetLastError(). Make this more robust against errors by always
doing "err ? err->message : NULL" in the printf. I looked around the tree and
found a couple of other places that weren't guarded, so this patch fixes them as
well.
Signed-off-by: Chris Lalancette <clalance(a)redhat.com>
16 years, 2 months