Re: [libvirt] [PATCH 0/3] Add dnsmasq module (v2)

2010-04-23 Thread Daniel Veillard
On Thu, Apr 22, 2010 at 11:41:04PM +0900, Satoru SATOH wrote: > The following series of patches is a prototype implementation of dnsmasq > module. > > It implements an idea to save dhcp hosts' macaddr vs. ipaddr mappings to > static file and make dnsmasq loading it with "--dhcp-hostsfile" option,

Re: [libvirt] [PATCH 1/3] Add dnsmasq module (v2)

2010-04-23 Thread Jim Meyering
Satoru SATOH wrote: ... > +static int > +hostsfileWrite(const char *path, > + dnsmasqDhcpHost *hosts, > + unsigned int nhosts) > +{ > +char *tmp; > +FILE *f; > +bool istmp = true; > +unsigned int i; > +int saved_errno; > + > +if (nhosts == 0 && un

Re: [libvirt] [Qemu-devel] Re: Libvirt debug API

2010-04-23 Thread Daniel P. Berrange
On Thu, Apr 22, 2010 at 01:45:27PM -0500, Anthony Liguori wrote: > On 04/09/2010 09:27 AM, Daniel P. Berrange wrote: > >On Fri, Apr 09, 2010 at 09:41:39AM -0400, Chris Lalancette wrote: > > > > > >> > >> myguest > >> ... > >> > >> > >> > >> qemu arguments > >> > >>

Re: [libvirt] [Qemu-devel] Re: Libvirt debug API

2010-04-23 Thread Daniel P. Berrange
On Thu, Apr 22, 2010 at 01:47:55PM -0500, Anthony Liguori wrote: > On 04/12/2010 07:23 AM, Jamie Lokier wrote: > >Daniel Veillard wrote: > > > >>On Sun, Apr 11, 2010 at 11:17:38PM +0100, Jamie Lokier wrote: > >> > >>>It's not that hard to write this for trivial extra options: > >>> > >>>

[libvirt] [PATCH] Fix handling of security driver restore failures in QEMU domain save

2010-04-23 Thread Daniel P. Berrange
In cases where the security driver failed to restore a label after a guest has saved, we mistakenly jumped to the error cleanup paths. This is not good, because the operation has in fact completed and cannot be rolled back completely. Label restore is non-critical, so just log the problem instead.

Re: [libvirt] [PATCH] Fix handling of security driver restore failures in QEMU domain save

2010-04-23 Thread Daniel Veillard
On Fri, Apr 23, 2010 at 11:49:38AM +0100, Daniel P. Berrange wrote: > In cases where the security driver failed to restore a label after a > guest has saved, we mistakenly jumped to the error cleanup paths. > This is not good, because the operation has in fact completed and > cannot be rolled back

Re: [libvirt] [Qemu-devel] Re: Libvirt debug API

2010-04-23 Thread Avi Kivity
On 04/22/2010 09:49 PM, Anthony Liguori wrote: real API. Say, adding a device libvirt doesn't know about or stopping the VM while libvirt thinks it's still running or anything like that. Another problem is issuing Monitor commands that could confuse libvirt's We need to make libvirt and qem

Re: [libvirt] [Qemu-devel] Re: Libvirt debug API

2010-04-23 Thread Anthony Liguori
On 04/23/2010 05:28 AM, Daniel P. Berrange wrote: On Thu, Apr 22, 2010 at 01:45:27PM -0500, Anthony Liguori wrote: On 04/09/2010 09:27 AM, Daniel P. Berrange wrote: On Fri, Apr 09, 2010 at 09:41:39AM -0400, Chris Lalancette wrote: myguest ... q

Re: [libvirt] [Qemu-devel] Re: Libvirt debug API

2010-04-23 Thread Anthony Liguori
On 04/23/2010 07:48 AM, Avi Kivity wrote: On 04/22/2010 09:49 PM, Anthony Liguori wrote: real API. Say, adding a device libvirt doesn't know about or stopping the VM while libvirt thinks it's still running or anything like that. Another problem is issuing Monitor commands that could confuse

[libvirt] AUTHORS update (was: [PATCH] Fix security context references in DAC code)

2010-04-23 Thread Eric Blake
On 04/22/2010 02:15 PM, Eric Blake wrote: > I'm also pushing a followup patch to update AUTHORS with seven recent > patch contributors (to avoid posting raw email addresses for spammers to > harvest, I won't post that patch to the list unless specifically > requested). I think that qualifies as ob

Re: [libvirt] [Qemu-devel] Re: Libvirt debug API

2010-04-23 Thread Daniel P. Berrange
On Fri, Apr 23, 2010 at 08:40:49AM -0500, Anthony Liguori wrote: > On 04/23/2010 05:28 AM, Daniel P. Berrange wrote: > >On Thu, Apr 22, 2010 at 01:45:27PM -0500, Anthony Liguori wrote: > > > >>On 04/09/2010 09:27 AM, Daniel P. Berrange wrote: > >> > >>>On Fri, Apr 09, 2010 at 09:41:39AM -04

Re: [libvirt] [Qemu-devel] Re: Libvirt debug API

2010-04-23 Thread Avi Kivity
On 04/23/2010 04:48 PM, Anthony Liguori wrote: On 04/23/2010 07:48 AM, Avi Kivity wrote: On 04/22/2010 09:49 PM, Anthony Liguori wrote: real API. Say, adding a device libvirt doesn't know about or stopping the VM while libvirt thinks it's still running or anything like that. Another problem

Re: [libvirt] [RFC] libvirt-TCK scripts to verify spoofing prevention

2010-04-23 Thread Gerhard Stenzel
Daniel, thanks for the comments .. most of them are integrated, but I have a problem with changing MAC addresses, because the domain xml is regenerated every time, so I cannot rely on the interface name being "eth0" as fedora during boot creates a new ethX for each new MAC address .. any good advic

Re: [libvirt] [Qemu-devel] Re: Libvirt debug API

2010-04-23 Thread Daniel P. Berrange
On Fri, Apr 23, 2010 at 08:48:51AM -0500, Anthony Liguori wrote: > On 04/23/2010 07:48 AM, Avi Kivity wrote: > >On 04/22/2010 09:49 PM, Anthony Liguori wrote: > >>>real API. Say, adding a device libvirt doesn't know about or > >>>stopping the VM > >>>while libvirt thinks it's still running or anyt

[libvirt] [PATCH] nwfilter: extend schema + add testcase w/ connlimit-above test

2010-04-23 Thread Stefan Berger
I am extending the schema with the recently added connlimit-above attribute and adding a test case to the test suite. Signed-off-by: Stefan Berger --- docs/schemas/nwfilter.rng |5 + tests/nwfilterxml2xmlin/conntrack-test.xml | 14 ++ tests/nwfilterxml2x

Re: [libvirt] [Qemu-devel] Re: Libvirt debug API

2010-04-23 Thread Daniel P. Berrange
On Fri, Apr 23, 2010 at 05:24:34PM +0300, Avi Kivity wrote: > On 04/23/2010 04:48 PM, Anthony Liguori wrote: > >On 04/23/2010 07:48 AM, Avi Kivity wrote: > >>On 04/22/2010 09:49 PM, Anthony Liguori wrote: > real API. Say, adding a device libvirt doesn't know about or > stopping the VM > >>

Re: [libvirt] [PATCH] nwfilter: extend schema + add testcase w/ connlimit-above test

2010-04-23 Thread Eric Blake
On 04/23/2010 08:34 AM, Stefan Berger wrote: > I am extending the schema with the recently added connlimit-above > attribute and adding a test case to the test suite. > > Signed-off-by: Stefan Berger > > --- > docs/schemas/nwfilter.rng |5 + > tests/nwfilterxml2xmlin/c

Re: [libvirt] [PATCH 1/1] Properly indent encryption tags

2010-04-23 Thread Eric Blake
On 04/22/2010 12:32 PM, David Allan wrote: > * Fix for the bug reported at: > > https://bugzilla.redhat.com/show_bug.cgi?id=573908 > --- > src/conf/storage_encryption_conf.c |6 +++--- > 1 files changed, 3 insertions(+), 3 deletions(-) > > diff --git a/src/conf/storage_encryption_conf.c > b

Re: [libvirt] [PATCH 1/1] Properly indent encryption tags

2010-04-23 Thread Daniel P. Berrange
On Fri, Apr 23, 2010 at 08:41:54AM -0600, Eric Blake wrote: > On 04/22/2010 12:32 PM, David Allan wrote: > > * Fix for the bug reported at: > > > > https://bugzilla.redhat.com/show_bug.cgi?id=573908 > > --- > > src/conf/storage_encryption_conf.c |6 +++--- > > 1 files changed, 3 insertions(+)

Re: [libvirt] [PATCH 1/1] Properly indent encryption tags

2010-04-23 Thread Dave Allan
On Fri, Apr 23, 2010 at 03:52:41PM +0100, Daniel P. Berrange wrote: > On Fri, Apr 23, 2010 at 08:41:54AM -0600, Eric Blake wrote: > > On 04/22/2010 12:32 PM, David Allan wrote: > > > * Fix for the bug reported at: > > > > > > https://bugzilla.redhat.com/show_bug.cgi?id=573908 > > > --- > > > src/

Re: [libvirt] [Qemu-devel] Re: Libvirt debug API

2010-04-23 Thread Markus Armbruster
Anthony Liguori writes: > On 04/23/2010 07:48 AM, Avi Kivity wrote: >> On 04/22/2010 09:49 PM, Anthony Liguori wrote: real API. Say, adding a device libvirt doesn't know about or stopping the VM while libvirt thinks it's still running or anything like that. >>> Another problem is

[libvirt] [RESEND] qemu_monitor_json: Drop timestamp from command object

2010-04-23 Thread Luiz Capitulino
It's not needed and is currently ignored, but this is a bug. It will get fixed soon and QMP will return an error for keys it doesn't know about, this will break libvirt. Signed-off-by: Luiz Capitulino --- src/qemu/qemu_monitor_json.c | 34 -- 1 files changed, 0

Re: [libvirt] [RESEND] qemu_monitor_json: Drop timestamp from command object

2010-04-23 Thread Daniel P. Berrange
On Fri, Apr 23, 2010 at 12:18:11PM -0300, Luiz Capitulino wrote: > It's not needed and is currently ignored, but this is a bug. > > It will get fixed soon and QMP will return an error for keys > it doesn't know about, this will break libvirt. > > Signed-off-by: Luiz Capitulino > --- > src/qemu/

Re: [libvirt] [PATCH] nwfilter: extend schema + add testcase w/ connlimit-above test

2010-04-23 Thread Stefan Berger
Eric Blake wrote on 04/23/2010 10:40:29 AM: > > On 04/23/2010 08:34 AM, Stefan Berger wrote: > > I am extending the schema with the recently added connlimit-above > > attribute and adding a test case to the test suite. > > [...] > > + > > + > > + > > + > > ACK.

Re: [libvirt] [RESEND] qemu_monitor_json: Drop timestamp from command object

2010-04-23 Thread Daniel Veillard
On Fri, Apr 23, 2010 at 12:18:11PM -0300, Luiz Capitulino wrote: > It's not needed and is currently ignored, but this is a bug. > > It will get fixed soon and QMP will return an error for keys > it doesn't know about, this will break libvirt. > > Signed-off-by: Luiz Capitulino Oops, thanks fo

[libvirt] [PATCH] build: don't include winsock2.h on cygwin

2010-04-23 Thread Eric Blake
Under cygwin, winsock2.h is intentionally incompatible with, , and checking for existence is wrong. Under mingw, HAVE_WINSOCK2_H is defined on our behalf by gnulib, in a way that does not interfere with cygwin. * configure.ac: Drop unnecessary header check. Reported by Matthias Bolte. --- config

[libvirt] [PATCH] cygwin: Check explicitly for getmntent_r

2010-04-23 Thread Matthias Bolte
Cygwin has mntent.h but lacks getmntent_r. Update preprocessor checks to catch this combination. --- src/qemu/qemu_conf.c |2 +- src/util/cgroup.c| 10 +- src/util/util.c |8 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/qemu/qemu_conf.c b

[libvirt] [PATCH] Improve configure error message about missing Linux headers

2010-04-23 Thread Matthias Bolte
--- configure.ac |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/configure.ac b/configure.ac index 99bc906..e34f417 100644 --- a/configure.ac +++ b/configure.ac @@ -528,7 +528,7 @@ dnl check for kernel headers required by src/bridge.c dnl if test "$with_qemu" = "yes" ||

[libvirt] [PATCH] Disable stateful OpenNebula driver if libvirtd is disabled

2010-04-23 Thread Matthias Bolte
Also move the equivalent checks for LXC and UML before their header checks. This way configure doesn't check for the headers when the driver gets disabled anyway. --- configure.ac | 15 +-- 1 files changed, 9 insertions(+), 6 deletions(-) diff --git a/configure.ac b/configure.ac ind

[libvirt] [PATCH] Some NWFilter symbols are conditional and have to be exported conditional

2010-04-23 Thread Matthias Bolte
--- src/Makefile.am |7 ++- src/libvirt_nwfilter.syms | 14 ++ src/libvirt_private.syms | 13 + 3 files changed, 21 insertions(+), 13 deletions(-) create mode 100644 src/libvirt_nwfilter.syms diff --git a/src/Makefile.am b/src/Makefile.am index 66dc

[libvirt] [PATCH] xen: Fix inside_daemon being unused when libvirtd is disabled

2010-04-23 Thread Matthias Bolte
The defined __sun is there, because inside_daemon is used in xenUnifiedOpen if __sun is defined. Also initialize it to 0. --- src/xen/xen_driver.c |4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/src/xen/xen_driver.c b/src/xen/xen_driver.c index 5ab169d..b16a16a 100644 -

Re: [libvirt] [PATCH] build: don't include winsock2.h on cygwin

2010-04-23 Thread Matthias Bolte
2010/4/23 Eric Blake : > Under cygwin, winsock2.h is intentionally incompatible with, > , and checking for existence is wrong. > > Under mingw, HAVE_WINSOCK2_H is defined on our behalf by > gnulib, in a way that does not interfere with cygwin. > > * configure.ac: Drop unnecessary header check. > Re

Re: [libvirt] [PATCH] Improve configure error message about missing Linux headers

2010-04-23 Thread Eric Blake
On 04/23/2010 10:57 AM, Matthias Bolte wrote: > --- > configure.ac |2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/configure.ac b/configure.ac > index 99bc906..e34f417 100644 > --- a/configure.ac > +++ b/configure.ac > @@ -528,7 +528,7 @@ dnl check for kernel header

Re: [libvirt] [PATCH] build: don't include winsock2.h on cygwin

2010-04-23 Thread Eric Blake
On 04/23/2010 11:02 AM, Matthias Bolte wrote: >> * configure.ac: Drop unnecessary header check. >> Reported by Matthias Bolte. >> --- >> -AC_CHECK_HEADERS([pwd.h paths.h regex.h sys/syslimits.h sys/utsname.h >> sys/wait.h winsock2.h sched.h termios.h sys/poll.h syslog.h mntent.h >> net/ethernet.h

Re: [libvirt] [PATCH] Disable stateful OpenNebula driver if libvirtd is disabled

2010-04-23 Thread Eric Blake
On 04/23/2010 10:58 AM, Matthias Bolte wrote: > Also move the equivalent checks for LXC and UML before their header > checks. This way configure doesn't check for the headers when the driver > gets disabled anyway. ACK. -- Eric Blake ebl...@redhat.com+1-801-349-2682 Libvirt virtualization

Re: [libvirt] [PATCH] xen: Fix inside_daemon being unused when libvirtd is disabled

2010-04-23 Thread Eric Blake
On 04/23/2010 11:00 AM, Matthias Bolte wrote: > The defined __sun is there, because inside_daemon is used in xenUnifiedOpen > if __sun is defined. Also initialize it to 0. > --- > src/xen/xen_driver.c |4 +++- > 1 files changed, 3 insertions(+), 1 deletions(-) > > diff --git a/src/xen/xen_dri

Re: [libvirt] [PATCH] Some NWFilter symbols are conditional and have to be exported conditional

2010-04-23 Thread Eric Blake
On 04/23/2010 11:00 AM, Matthias Bolte wrote: > --- > src/Makefile.am |7 ++- > src/libvirt_nwfilter.syms | 14 ++ > src/libvirt_private.syms | 13 + > 3 files changed, 21 insertions(+), 13 deletions(-) > create mode 100644 src/libvirt_nwfilter.syms

Re: [libvirt] [PATCH 1/1] Properly indent encryption tags

2010-04-23 Thread Laine Stump
On 04/23/2010 11:00 AM, Dave Allan wrote: On Fri, Apr 23, 2010 at 03:52:41PM +0100, Daniel P. Berrange wrote: On Fri, Apr 23, 2010 at 08:41:54AM -0600, Eric Blake wrote: On 04/22/2010 12:32 PM, David Allan wrote: * Fix for the bug reported at: https://bugzilla.redhat.com/sho

Re: [libvirt] [PATCH] build: don't include winsock2.h on cygwin

2010-04-23 Thread Eric Blake
On 04/23/2010 11:12 AM, Eric Blake wrote: > On 04/23/2010 11:02 AM, Matthias Bolte wrote: >>> * configure.ac: Drop unnecessary header check. >>> Reported by Matthias Bolte. >>> --- >>> -AC_CHECK_HEADERS([pwd.h paths.h regex.h sys/syslimits.h sys/utsname.h >>> sys/wait.h winsock2.h sched.h termios.

[libvirt] [PATCH 1/8] Fix up the locking in the snapshot code.

2010-04-23 Thread Chris Lalancette
In particular I was forgetting to take the qemuMonitorPrivatePtr lock (via qemuDomainObjBeginJob), which would cause problems if two users tried to access the same domain at the same time. This patch also fixes a problem where I was forgetting to remove a transient domain from the list of domains.

[libvirt] [PATCH 0/8]: Snapshot fixes

2010-04-23 Thread Chris Lalancette
Hello, This series of patches fixes up a number of problems discovered while testing the snapshot code. Descriptions of the fixes are in the individual patches. Please review. Thanks, Chris Lalancette -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinf

[libvirt] [PATCH 7/8] Report better error if qemuSnapshotIsAllowed failed.

2010-04-23 Thread Chris Lalancette
Signed-off-by: Chris Lalancette --- src/qemu/qemu_driver.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 7314328..b0c1877 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -10673,8 +10673,8 @@ st

[libvirt] [PATCH 2/8] Fix a memory leak in the snapshot code in libvirtd.

2010-04-23 Thread Chris Lalancette
While running libvirtd under valgrind and doing some snapshot testing I noticed that we would always leak a connection reference. The problem was actually that we were leaking a domain reference in the libvirtd remote snapshot code, which was in turn causing a leaked connection reference. Fix the

[libvirt] [PATCH 8/8] Fix memory leak in virsh snapshot-list.

2010-04-23 Thread Chris Lalancette
We were forgetting to release the memory allocated by virDomainSnapshotListNames. Free the memory properly. Signed-off-by: Chris Lalancette --- tools/virsh.c |4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/tools/virsh.c b/tools/virsh.c index 93a9f45..04b47a1 100644 -

[libvirt] [PATCH 3/8] Make virDomainSnapshotObjListDeinit static.

2010-04-23 Thread Chris Lalancette
Signed-off-by: Chris Lalancette --- src/conf/domain_conf.c |3 ++- src/conf/domain_conf.h |1 - 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 43d74cf..6dc26c3 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_c

[libvirt] [PATCH 6/8] Fix printing of pathnames on error in qemuDomainSnapshotLoad.

2010-04-23 Thread Chris Lalancette
While doing some testing of the snapshot code I noticed that if qemuDomainSnapshotLoad failed, it would print a NULL as part of the error. That's not desirable, so leave the full_path variable around until after we are done printing errors. Signed-off-by: Chris Lalancette --- src/qemu/qemu_driv

[libvirt] [PATCH 5/8] Fix virDomainSnapshotObjFree memory leak.

2010-04-23 Thread Chris Lalancette
We were freeing the virDomainSnapshotDefPtr, but not the virDomainSnapshotObjPtr in virDomainSnapshotObjFree. Signed-off-by: Chris Lalancette --- src/conf/domain_conf.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index

[libvirt] [PATCH 4/8] Fix up the error message if we can't parse the snapshot XML.

2010-04-23 Thread Chris Lalancette
Signed-off-by: Chris Lalancette --- src/conf/domain_conf.c |3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 6dc26c3..139712a 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -6614,8 +6614,7 @@ virDo

Re: [libvirt] [PATCH 2/8] Fix a memory leak in the snapshot code in libvirtd.

2010-04-23 Thread Matthias Bolte
2010/4/23 Chris Lalancette : > While running libvirtd under valgrind and doing some > snapshot testing I noticed that we would always leak a > connection reference.  The problem was actually that we > were leaking a domain reference in the libvirtd remote > snapshot code, which was in turn causing

Re: [libvirt] [PATCH 3/8] Make virDomainSnapshotObjListDeinit static.

2010-04-23 Thread Matthias Bolte
2010/4/23 Chris Lalancette : > Signed-off-by: Chris Lalancette > --- >  src/conf/domain_conf.c |    3 ++- >  src/conf/domain_conf.h |    1 - >  2 files changed, 2 insertions(+), 2 deletions(-) > ACK. Matthias -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/list

Re: [libvirt] [PATCH 4/8] Fix up the error message if we can't parse the snapshot XML.

2010-04-23 Thread Matthias Bolte
2010/4/23 Chris Lalancette : > Signed-off-by: Chris Lalancette > --- >  src/conf/domain_conf.c |    3 +-- >  1 files changed, 1 insertions(+), 2 deletions(-) > > diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c > index 6dc26c3..139712a 100644 > --- a/src/conf/domain_conf.c > +++ b/src/

Re: [libvirt] [PATCH 5/8] Fix virDomainSnapshotObjFree memory leak.

2010-04-23 Thread Matthias Bolte
2010/4/23 Chris Lalancette : > We were freeing the virDomainSnapshotDefPtr, but not > the virDomainSnapshotObjPtr in virDomainSnapshotObjFree. > > Signed-off-by: Chris Lalancette > --- >  src/conf/domain_conf.c |    1 + >  1 files changed, 1 insertions(+), 0 deletions(-) > > diff --git a/src/conf/

Re: [libvirt] [PATCH] cygwin: Check explicitly for getmntent_r

2010-04-23 Thread Eric Blake
On 04/23/2010 10:57 AM, Matthias Bolte wrote: > Cygwin has mntent.h but lacks getmntent_r. Update preprocessor > checks to catch this combination. Ultimately, cygwin might be taught to implement getmntent_r, so this may have to be revisited in the future. But that said, > +++ b/src/qemu/qemu_con

Re: [libvirt] [PATCH 6/8] Fix printing of pathnames on error in qemuDomainSnapshotLoad.

2010-04-23 Thread Matthias Bolte
2010/4/23 Chris Lalancette : > While doing some testing of the snapshot code I noticed that > if qemuDomainSnapshotLoad failed, it would print a NULL as > part of the error.  That's not desirable, so leave the > full_path variable around until after we are done printing > errors. > > Signed-off-by:

Re: [libvirt] [PATCH 8/8] Fix memory leak in virsh snapshot-list.

2010-04-23 Thread Matthias Bolte
2010/4/23 Chris Lalancette : > We were forgetting to release the memory allocated by > virDomainSnapshotListNames.  Free the memory properly. > > Signed-off-by: Chris Lalancette > --- >  tools/virsh.c |    4 +++- >  1 files changed, 3 insertions(+), 1 deletions(-) > ACK. Matthias -- libvir-list

Re: [libvirt] [PATCH] Improve configure error message about missing Linux headers

2010-04-23 Thread Matthias Bolte
2010/4/23 Eric Blake : > On 04/23/2010 10:57 AM, Matthias Bolte wrote: >> --- >>  configure.ac |    2 +- >>  1 files changed, 1 insertions(+), 1 deletions(-) >> >> diff --git a/configure.ac b/configure.ac >> index 99bc906..e34f417 100644 >> --- a/configure.ac >> +++ b/configure.ac >> @@ -528,7 +528

Re: [libvirt] [PATCH] Disable stateful OpenNebula driver if libvirtd is disabled

2010-04-23 Thread Matthias Bolte
2010/4/23 Eric Blake : > On 04/23/2010 10:58 AM, Matthias Bolte wrote: >> Also move the equivalent checks for LXC and UML before their header >> checks. This way configure doesn't check for the headers when the driver >> gets disabled anyway. > > ACK. > Thanks, pushed. Matthias -- libvir-list ma

Re: [libvirt] [PATCH] xen: Fix inside_daemon being unused when libvirtd is disabled

2010-04-23 Thread Matthias Bolte
2010/4/23 Eric Blake : > On 04/23/2010 11:00 AM, Matthias Bolte wrote: >> The defined __sun is there, because inside_daemon is used in xenUnifiedOpen >> if __sun is defined. Also initialize it to 0. >> --- >>  src/xen/xen_driver.c |    4 +++- >>  1 files changed, 3 insertions(+), 1 deletions(-) >>

Re: [libvirt] [PATCH] Some NWFilter symbols are conditional and have to be exported conditional

2010-04-23 Thread Matthias Bolte
2010/4/23 Eric Blake : > On 04/23/2010 11:00 AM, Matthias Bolte wrote: >> --- >>  src/Makefile.am           |    7 ++- >>  src/libvirt_nwfilter.syms |   14 ++ >>  src/libvirt_private.syms  |   13 + >>  3 files changed, 21 insertions(+), 13 deletions(-) >>  create mode 10

Re: [libvirt] [PATCH] cygwin: Check explicitly for getmntent_r

2010-04-23 Thread Matthias Bolte
2010/4/23 Eric Blake : > On 04/23/2010 10:57 AM, Matthias Bolte wrote: >> Cygwin has mntent.h but lacks getmntent_r. Update preprocessor >> checks to catch this combination. > > Ultimately, cygwin might be taught to implement getmntent_r, so this may > have to be revisited in the future.  But that

Re: [libvirt] [PATCH 2/8] Fix a memory leak in the snapshot code in libvirtd.

2010-04-23 Thread Chris Lalancette
On 04/23/2010 01:57 PM, Matthias Bolte wrote: > 2010/4/23 Chris Lalancette : >> While running libvirtd under valgrind and doing some >> snapshot testing I noticed that we would always leak a >> connection reference. The problem was actually that we >> were leaking a domain reference in the libvirt

Re: [libvirt] [PATCH 5/8] Fix virDomainSnapshotObjFree memory leak.

2010-04-23 Thread Chris Lalancette
On 04/23/2010 02:08 PM, Matthias Bolte wrote: > 2010/4/23 Chris Lalancette : >> We were freeing the virDomainSnapshotDefPtr, but not >> the virDomainSnapshotObjPtr in virDomainSnapshotObjFree. >> >> Signed-off-by: Chris Lalancette >> --- >> src/conf/domain_conf.c |1 + >> 1 files changed, 1 i

Re: [libvirt] [PATCH 3/8] Make virDomainSnapshotObjListDeinit static.

2010-04-23 Thread Chris Lalancette
On 04/23/2010 01:59 PM, Matthias Bolte wrote: > 2010/4/23 Chris Lalancette : >> Signed-off-by: Chris Lalancette >> --- >> src/conf/domain_conf.c |3 ++- >> src/conf/domain_conf.h |1 - >> 2 files changed, 2 insertions(+), 2 deletions(-) >> > > ACK. Thanks, pushed. -- Chris Lalancette

Re: [libvirt] [PATCH 6/8] Fix printing of pathnames on error in qemuDomainSnapshotLoad.

2010-04-23 Thread Chris Lalancette
On 04/23/2010 02:10 PM, Matthias Bolte wrote: > 2010/4/23 Chris Lalancette : >> While doing some testing of the snapshot code I noticed that >> if qemuDomainSnapshotLoad failed, it would print a NULL as >> part of the error. That's not desirable, so leave the >> full_path variable around until aft

Re: [libvirt] [PATCH 8/8] Fix memory leak in virsh snapshot-list.

2010-04-23 Thread Chris Lalancette
On 04/23/2010 02:12 PM, Matthias Bolte wrote: > 2010/4/23 Chris Lalancette : >> We were forgetting to release the memory allocated by >> virDomainSnapshotListNames. Free the memory properly. >> >> Signed-off-by: Chris Lalancette >> --- >> tools/virsh.c |4 +++- >> 1 files changed, 3 insertio

Re: [libvirt] [PATCH] cygwin: Check explicitly for getmntent_r

2010-04-23 Thread Eric Blake
On 04/23/2010 12:19 PM, Matthias Bolte wrote: >> Ultimately, cygwin might be taught to implement getmntent_r, so this may >> have to be revisited in the future. But that said, > > This sentence seems incomplete. > >> >> This looks like a reasonable solution to allow compilation on cygwin; >> and

Re: [libvirt] [Qemu-devel] Re: Libvirt debug API

2010-04-23 Thread Anthony Liguori
On 04/23/2010 09:24 AM, Avi Kivity wrote: On 04/23/2010 04:48 PM, Anthony Liguori wrote: On 04/23/2010 07:48 AM, Avi Kivity wrote: On 04/22/2010 09:49 PM, Anthony Liguori wrote: real API. Say, adding a device libvirt doesn't know about or stopping the VM while libvirt thinks it's still runnin

Re: [libvirt] [Qemu-devel] Re: Libvirt debug API

2010-04-23 Thread Anthony Liguori
On 04/23/2010 09:21 AM, Daniel P. Berrange wrote: Say libvirt is running a 'offline core dump' operation. This consists of us invoking stop migrate exec:cat> foo.dump cont I don't want other debug commands accidentally being issued in between these steps. These 3 commands are in e

Re: [libvirt] [PATCH 1/3] Add dnsmasq module (v2)

2010-04-23 Thread Satoru SATOH
Thanks again for your advice! On Fri, Apr 23, 2010 at 10:42:14AM +0200, Jim Meyering wrote: > Satoru SATOH wrote: > ... > > +static int > > +hostsfileWrite(const char *path, > > + dnsmasqDhcpHost *hosts, > > + unsigned int nhosts) > > +{ > > +char *tmp; > > +FIL

[libvirt] Error saving/restoring VM with attached disks

2010-04-23 Thread Shi Jin
Hi there, I have been playing with libvirt/KVM on saving the VM to a checkpoint file and restoring it from this file. It has worked very well for me on my RHEL-5.5 setup, until I added hot-plugged volumes. If I add a volume to a running VM using "virsh attach-disk" and then call "virsh save".

[libvirt] [PATCH 1/3] Add dnsmasq module (v2.1) [was Re: [PATCH 1/3] Add dnsmasq module (v2)]

2010-04-23 Thread Satoru SATOH
Here is updated version of the patch adds the files implements dnsmasq (hostsfile) module [1] based on advices from Jim-san. [1] https://www.redhat.com/archives/libvir-list/2010-April/msg01003.html [2] https://www.redhat.com/archives/libvir-list/2010-April/msg01046.html Signed-off-by: Satoru SAT

Re: [libvirt] [PATCH 0/3] Add dnsmasq module (v2)

2010-04-23 Thread Satoru SATOH
On Fri, Apr 23, 2010 at 09:33:20AM +0200, Daniel Veillard wrote: > On Thu, Apr 22, 2010 at 11:41:04PM +0900, Satoru SATOH wrote: > > The following series of patches is a prototype implementation of dnsmasq > > module. > > > > It implements an idea to save dhcp hosts' macaddr vs. ipaddr mappings to

Re: [libvirt] [PATCH 1/3] Add dnsmasq module (v2.1)

2010-04-23 Thread Jim Meyering
Satoru SATOH wrote: > Here is updated version of the patch adds the files implements dnsmasq > (hostsfile) module [1] based on advices from Jim-san. > > [1] https://www.redhat.com/archives/libvir-list/2010-April/msg01003.html > [2] https://www.redhat.com/archives/libvir-list/2010-April/msg01046.htm

Re: [libvirt] [PATCH 1/3] Add dnsmasq module (v2.1)

2010-04-23 Thread Satoru SATOH
Ok, here is updated one. Could you please take a look at this? This patch adds the files implements dnsmasq (hostsfile) module. Signed-off-by: Satoru SATOH --- src/util/dnsmasq.c | 341 src/util/dnsmasq.h | 59 + 2 files changed,

[libvirt] [PATCH] nwfilter: add support for RAPR protocol

2010-04-23 Thread Stefan Berger
This patch adds support for the RARP protocol. This may be needed due to qemu sending out a RARP packet (at least that's what it seems to want to do even though the protocol id is wrong) when migration finishes and we'd need a rule to let the packets pass. Unfortunately my installation of ebtable

[libvirt] nwfilter: add test case for RARP protocol

2010-04-23 Thread Stefan Berger
This patch adds a test case for the RARP protocol. Signed-off-by: Stefan Berger --- tests/nwfilterxml2xmlin/rarp-test.xml | 33 + tests/nwfilterxml2xmlout/rarp-test.xml | 18 ++ tests/nwfilterxml2xmltest.c|1 + 3 files changed

[libvirt] [PATCH 1/1] Fix indentation for storage conf XML

2010-04-23 Thread David Allan
* virStorageEncryptionFormat is called from both virDomainDiskDefFormat and virStorageVolTargetDefFormat. The proper indentation in the generated XML depends on the caller. My earlier patch to fix the incorrect indentation for the domain XML broke the indentation for the storage XML. Thi

[libvirt] [PATCH 0/1] Fix encryption XML indentation

2010-04-23 Thread David Allan
The following patch fixes the storage XML indentation problem caused by my earlier patch to fix domain XML indentation problems. I liked the style of Laine's suggestion of passing in the number of spaces to indent, so I adopted that approach. I also added a regression test for the domain XML.

Re: [libvirt] [PATCH 2/4] Avoid create/unlink with block devs used for QEMU save

2010-04-23 Thread Laine Stump
On 04/22/2010 07:43 AM, Daniel P. Berrange wrote: It is possible to use block devices with domain save/restore. Upon failure QEMU unlinks the path being saved to. This isn't good when it is a block device ! * src/qemu/qemu_driver.c: Don't unlink block devices if save fails --- src/qemu/qemu_dr

Re: [libvirt] [PATCH] Fix handling of security driver restore failures in QEMU domain save

2010-04-23 Thread Laine Stump
On 04/23/2010 06:49 AM, Daniel P. Berrange wrote: In cases where the security driver failed to restore a label after a guest has saved, we mistakenly jumped to the error cleanup paths. This is not good, because the operation has in fact completed and cannot be rolled back completely. Label restor

Re: [libvirt] [PATCH 3/4] Fix QEMU save/restore with block devices

2010-04-23 Thread Laine Stump
On 04/22/2010 07:43 AM, Daniel P. Berrange wrote: The save process was relying on use of the shell>> append operator to ensure the save data was placed after the libvirt header + XML. This doesn't work for block devices though. Replace this code with use of 'dd' and its 'seek' parameter. This me