[libvirt] VIR_ERROR and VIR_DEBUG normalization

2010-05-20 Thread Jim Meyering
Most of the following changes have been induced automatically. The few outliers done manually are marked as such. [PATCH 01/10] maint: use VIR_ERROR0 rather than VIR_ERROR with a bare %s [PATCH 02/10] maint: mark translatable string args of VIR_ERROR0 [PATCH 03/10] maint: mark translatable string

[libvirt] [PATCH 01/10] maint: use VIR_ERROR0 rather than VIR_ERROR with a bare %s

2010-05-20 Thread Jim Meyering
From: Jim Meyering meyer...@redhat.com Change VIR_ERROR(%s, ... to VIR_ERROR0(... and Change VIR_ERROR(%s, _(...) to VIR_ERROR0(_(...) Use this command: git grep -E -l 'VIR_ERROR\(%s, (_\()?'|xargs perl -pi -e \ 's/VIR_ERROR\(%s, (_\()?/VIR_ERROR0($1/' --- daemon/libvirtd.c |

[libvirt] [PATCH 02/10] maint: mark translatable string args of VIR_ERROR0

2010-05-20 Thread Jim Meyering
From: Jim Meyering meyer...@redhat.com Run this: git grep -l 'VIR_ERROR0\s*('|xargs perl -pi -e \ 's/(VIR_ERROR0)\s*\((.*?)\)/$1(_($2))/' --- daemon/libvirtd.c |6 +++--- src/esx/esx_driver.c |4 ++-- src/node_device/node_device_hal.c

[libvirt] [PATCH 10/10] maint: update po/POTFILES.in

2010-05-20 Thread Jim Meyering
From: Jim Meyering meyer...@redhat.com * po/POTFILES.in: Add 3 files. --- po/POTFILES.in |7 +-- 1 files changed, 5 insertions(+), 2 deletions(-) diff --git a/po/POTFILES.in b/po/POTFILES.in index e08b8c8..baaf56f 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -18,6 +18,7 @@

[libvirt] [PATCH 03/10] maint: mark translatable string args of VIR_ERROR

2010-05-20 Thread Jim Meyering
From: Jim Meyering meyer...@redhat.com Run this: git grep -l 'VIR_ERROR\s*('|xargs perl -pi -e \ 's/(VIR_ERROR)\s*\((.*?),/$1(_($2),/' --- daemon/libvirtd.c |2 +- src/driver.c |6 +++--- src/libvirt.c

[libvirt] [PATCH 05/10] maint: more of same, but manual: convert VIR_ERROR(%s to VIR_ERROR0(

2010-05-20 Thread Jim Meyering
From: Jim Meyering meyer...@redhat.com --- daemon/libvirtd.c |3 +-- src/phyp/phyp_driver.c | 12 +--- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/daemon/libvirtd.c b/daemon/libvirtd.c index 04af58f..afa10fb 100644 --- a/daemon/libvirtd.c +++

[libvirt] [PATCH 06/10] maint: change in err ? err-message : to _(unknown error), ...

2010-05-20 Thread Jim Meyering
From: Jim Meyering meyer...@redhat.com These changes avoid false-positive syntax-check failure, and also make the resulting diagnostics more comprehensible. --- src/qemu/qemu_driver.c |8 src/secret/secret_driver.c |4 ++-- src/uml/uml_driver.c |2 +- 3 files

[libvirt] [PATCH 04/10] maint: VIR_ERROR/VIR_ERROR0: mark up the remaining ones manually

2010-05-20 Thread Jim Meyering
From: Jim Meyering meyer...@redhat.com Handle concatenated strings manually. --- src/esx/esx_vi.c | 10 +- src/node_device/node_device_udev.c | 20 ++-- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/esx/esx_vi.c

[libvirt] [PATCH 09/10] maint: enforce policy wrt VIR_DEBUG and VIR_DEBUG0

2010-05-20 Thread Jim Meyering
From: Jim Meyering meyer...@redhat.com * cfg.mk (sc_prohibit_gettext_markup): Just like VIR_WARN*. --- cfg.mk |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/cfg.mk b/cfg.mk index a26285f..2909e3e 100644 --- a/cfg.mk +++ b/cfg.mk @@ -425,7 +425,7 @@ sc_copyright_format:

[libvirt] [PATCH 08/10] maint: don't mark VIR_DEBUG or VIR_DEBUG0 diagnostics for translation

2010-05-20 Thread Jim Meyering
From: Jim Meyering meyer...@redhat.com Run this command: git grep -l VIR_DEBUG|xargs perl -pi -e \ 's/(VIR_DEBUG0?)\s*\(_\((.*?)\)/$1($2/' --- ...-Step-7-of-8-Implement-the-driver-methods.patch |4 +- src/node_device/node_device_driver.c |2 +-

[libvirt] [PATCH 07/10] maint: enforce policy wrt VIR_ERROR and VIR_ERROR0

2010-05-20 Thread Jim Meyering
From: Jim Meyering meyer...@redhat.com * cfg.mk (msg_gen_function): Add VIR_ERROR and VIR_ERROR0, so that sc_libvirt_unmarked_diagnostics will check them, too. --- cfg.mk |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/cfg.mk b/cfg.mk index 04719d4..a26285f 100644 ---

[libvirt] [PATCH] libvirtd: mark strings for translation, including --help output

2010-05-20 Thread Jim Meyering
Saw these while fixing the previous bug: From ab3d0ba4f5c004a45da5b5a240a0b5caef21df99 Mon Sep 17 00:00:00 2001 From: Jim Meyering meyer...@redhat.com Date: Thu, 20 May 2010 10:01:32 +0200 Subject: [PATCH] libvirtd: mark strings for translation, including --help output * daemon/libvirtd.c

[libvirt] [PATCH] libvirtd: don't ignore virInitialize failure

2010-05-20 Thread Jim Meyering
I almost missed this; it was so similar to what I though was the sole ignore-virInitialize-failure bug (in python set-up) that I thought I'd already fixed it. From f48e364b6f2182f7fa88862b2e1a789e2d83a027 Mon Sep 17 00:00:00 2001 From: Jim Meyering meyer...@redhat.com Date: Thu, 20 May 2010

[libvirt] [PATCH 1/2] maint: avoid unwanted newline at end of diagnostic

2010-05-20 Thread Jim Meyering
While I was in the virtual vicinity, Jiri mentioned the possibility of detecting one more minor formatting problem: the stray newline at the end of a diagnostic. Here are two corrections and the heuristic that caught them (and that will prevent introduction of some new ones -- but not if the end

Re: [libvirt] Different VLAN IDs

2010-05-20 Thread Csom Gyula
We messed up things:( 1. Unfortunately I was misinformed. In fact the problem was triggered by assigning the same VLAN ID-s within an SMP guest. Just as in the case discussed in the KVM list, it was simply resolved by assigning unique ids within the guest. 2. After all I unit tested the other

[libvirt] ANNOUNCE: Release of Sys::Virt 0.2.4

2010-05-20 Thread Daniel P. Berrange
There is now a new release of the Perl binding, Sys::Virt 0.2.4, available on CPAN: http://search.cpan.org/dist/Sys-Virt/ Direct download link http://search.cpan.org/CPAN/authors/id/D/DA/DANBERR/Sys-Virt-0.2.4.tar.gz The changes since 0.2.3: - Add all APIs + constants from 0.7.7, 0.8.0

[libvirt] [PATCH] qemu driver: fix version parsing fix

2010-05-20 Thread Chris Wright
* Eric Blake (ebl...@redhat.com) wrote: On 05/19/2010 04:37 PM, Chris Wright wrote: Looks like some cut'n paste error to me. While we're at it, there have been some complaints, at least on IRC, that some recent qemu builds changed -help output to start with QEMU emulator version instead of

[libvirt] [PATCH 0/4] Fix autostart to restore managesaved domains

2010-05-20 Thread Jiri Denemark
Hi, The fix required some refactoring in various places. More details about why and what had to be reworked can be found in each of the patches. Jirka Jiri Denemark (4): Refactor qemudDomainRestore Factor out def assignment to existing domain from virDomainAssignDef Refactor

[libvirt] [PATCH 1/4] Refactor qemudDomainRestore

2010-05-20 Thread Jiri Denemark
We need to be able to restore a domain which we already locked and started a job for it without undoing these steps. This patch factors out internals of qemudDomainRestore into separate functions which work for locked objects. --- src/qemu/qemu_driver.c | 213

[libvirt] [PATCH 3/4] Refactor qemudDomainStart

2010-05-20 Thread Jiri Denemark
We need a common internal function for starting managed domains to be used during autostart. This patch factors out relevant code from qemudDomainStart into qemudDomainObjStart and makes it use the refactored code for domain restore instead of calling qemudDomainRestore API directly. ---

[libvirt] [PATCH 2/4] Factor out def assignment to existing domain from virDomainAssignDef

2010-05-20 Thread Jiri Denemark
We need to be able to assign new def to an existing virDomainObj which is already locked. This patch factors out the relevant code from virDomainAssignDef into virDomainObjAssignDef. --- src/conf/domain_conf.c | 36 +--- src/conf/domain_conf.h |3 +++

[libvirt] [PATCH 4/4] Autostart domains using virDomainObjStart

2010-05-20 Thread Jiri Denemark
--- src/qemu/qemu_driver.c | 34 ++ 1 files changed, 18 insertions(+), 16 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 8f5cae1..d40e29a 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -626,29 +626,31 @@

[libvirt] lxc_controller: don't ignore failed accept

2010-05-20 Thread Jim Meyering
Initially I proposed a similar patch here: http://thread.gmane.org/gmane.comp.emulators.libvirt/20607 That thread languished, and Eric proposed a nearly identical patch: http://thread.gmane.org/gmane.comp.emulators.libvirt/21630 Here's a patch that should address the initial objection.

Re: [libvirt] [PATCH 1/2] maint: avoid unwanted newline at end of diagnostic

2010-05-20 Thread Jiri Denemark
While I was in the virtual vicinity, Jiri mentioned the possibility of detecting one more minor formatting problem: the stray newline at the end of a diagnostic. Here are two corrections and the heuristic that caught them (and that will prevent introduction of some new ones -- but not if the

Re: [libvirt] [PATCH] qemu driver: fix version parsing fix

2010-05-20 Thread Jim Meyering
Chris Wright wrote: * Eric Blake (ebl...@redhat.com) wrote: On 05/19/2010 04:37 PM, Chris Wright wrote: Looks like some cut'n paste error to me. While we're at it, there have been some complaints, at least on IRC, that some recent qemu builds changed -help output to start with QEMU

Re: [libvirt] lxc_controller: don't ignore failed accept

2010-05-20 Thread Jim Meyering
Jim Meyering wrote: Initially I proposed a similar patch here: http://thread.gmane.org/gmane.comp.emulators.libvirt/20607 That thread languished, and Eric proposed a nearly identical patch: http://thread.gmane.org/gmane.comp.emulators.libvirt/21630 Here's a patch that should

Re: [libvirt] [PATCH 1/2] maint: avoid unwanted newline at end of diagnostic

2010-05-20 Thread Jim Meyering
Jiri Denemark wrote: ... Subject: [PATCH 1/2] maint: remove unwanted newline at end of diagnostic * src/xen/xend_internal.c (xenDaemonDomainDefineXML): Remove \n. * src/network/bridge_driver.c (networkAddMasqueradingIptablesRules): Likewise. From 532672f3a0c53213609dab49df2e7efcaf0eb594 Mon

Re: [libvirt] [PATCH] qemu driver: fix version parsing fix

2010-05-20 Thread Daniel P. Berrange
On Thu, May 20, 2010 at 03:39:05PM +0200, Jim Meyering wrote: Chris Wright wrote: * Eric Blake (ebl...@redhat.com) wrote: On 05/19/2010 04:37 PM, Chris Wright wrote: Looks like some cut'n paste error to me. While we're at it, there have been some complaints, at least on IRC, that

Re: [libvirt] [PATCH] qemu: Genericize tapfds/ntapfds

2010-05-20 Thread Chris Lalancette
On 05/19/2010 04:00 PM, Alex Williamson wrote: There doesn't seem to be anything specific to tap devices for this array of file descriptors which need to stay open of the guest to use. Rename then for others to make use of. Signed-off-by: Alex Williamson alex.william...@redhat.com Yeah,

Re: [libvirt] [PATCH v3] dots should be valid characters in interface names

2010-05-20 Thread Chris Lalancette
On 05/20/2010 01:06 AM, Charles Duffy wrote: On 05/19/2010 11:54 PM, Charles Duffy wrote: A revised patch is attached. This lifts its logic from its kernel counterpart, and is updated only to permit forward slashes (which, while disallowed for interface names with the kernel, are required for

Re: [libvirt] [PATCH] libvirtd: don't ignore virInitialize failure

2010-05-20 Thread Chris Lalancette
On 05/20/2010 04:05 AM, Jim Meyering wrote: I almost missed this; it was so similar to what I though was the sole ignore-virInitialize-failure bug (in python set-up) that I thought I'd already fixed it. From f48e364b6f2182f7fa88862b2e1a789e2d83a027 Mon Sep 17 00:00:00 2001 From: Jim Meyering

Re: [libvirt] [PATCH] libvirtd: don't ignore virInitialize failure

2010-05-20 Thread Jim Meyering
Chris Lalancette wrote: Subject: [PATCH] libvirtd: don't ignore virInitialize failure * daemon/libvirtd.c (main): Diagnose virInitialize failure and exit nonzero. --- daemon/libvirtd.c |5 - 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/daemon/libvirtd.c

Re: [libvirt] [PATCH] qemu driver: fix version parsing fix

2010-05-20 Thread Jim Meyering
Daniel P. Berrange wrote: ... That patch looks fine, and is nicely minimal. However, it does relax the test significantly. Rather than requiring that QEMU_VERSION_STR be a prefix, it would allow it to appear anywhere within the -help output. ... ACK, prefer the stricter check. One day QEMU

Re: [libvirt] [PATCH v3] dots should be valid characters in interface names

2010-05-20 Thread Daniel P. Berrange
On Thu, May 20, 2010 at 10:12:35AM -0400, Chris Lalancette wrote: On 05/20/2010 01:06 AM, Charles Duffy wrote: On 05/19/2010 11:54 PM, Charles Duffy wrote: A revised patch is attached. This lifts its logic from its kernel counterpart, and is updated only to permit forward slashes (which,

Re: [libvirt] How to enable vhost for virtIO NIC?

2010-05-20 Thread Huang, Zhiteng
Laine, Thank you for the answer. That really solved my problem. Regards, HUANG, Zhiteng Intel -Original Message- From: sendmail [mailto:justsendmailnothinge...@gmail.com] On Behalf Of Laine Stump Sent: Thursday, May 20, 2010 12:23 AM To: libvir-list@redhat.com Cc: Huang, Zhiteng

Re: [libvirt] How to enable vhost for virtIO NIC?

2010-05-20 Thread Ruben Kerkhof
Hi all, On Wed, May 19, 2010 at 18:22, Laine Stump la...@laine.org wrote: On 05/19/2010 01:49 AM, Huang, Zhiteng wrote: Hi gurus on the list, I'm trying to bring up a Linux with virtio vhost backend.  My system is running on kernel 2.6.34-rc7, libvirt 0.8.0. Two questions regarding to

Re: [libvirt] [PATCH] qemu driver: fix version parsing fix

2010-05-20 Thread Chris Wright
* Jim Meyering (j...@meyering.net) wrote: That patch looks fine, and is nicely minimal. However, it does relax the test significantly. Rather than requiring that QEMU_VERSION_STR be a prefix, it would allow it to appear anywhere within the -help output. While I really doubt it'd ever make a

[libvirt] [PATCH] Domain snapshot RNG and tests.

2010-05-20 Thread Chris Lalancette
Signed-off-by: Chris Lalancette clala...@redhat.com --- docs/schemas/domainsnapshot.rng| 53 tests/Makefile.am |6 ++- tests/domainsnapshotschematest | 10

[libvirt] [PATCH] Fix up the python bindings for snapshotting.

2010-05-20 Thread Chris Lalancette
This involved a few fixes. To start with, an virDomainSnapshot object is really tied to a domain, not a connection, so we have to generate a slightly different object so that we can get at self._dom for the object. Next, we had to dummy up an override piece of XML with a bogus argument that the

[libvirt] [PATCH] Use gethostname in qemudDomainMigratePrepare2.

2010-05-20 Thread Chris Lalancette
This patch is essentially a revert of commit: 180ca598c4517012014d226c78068d4b38ff9e24 The problem ends up being that virGetHostname is *too* clever, and is causing migration problems. In particular, on machines with dynamic networks, the hostname of the machine generally gets mapped to

Re: [libvirt] libvirt and Ruby

2010-05-20 Thread Chris Lalancette
On 05/14/2010 07:22 AM, Jaromír Červenka wrote: Hello everyone, is there any possibility that the Ruby bindings for libvirt will be updated? I am currently createing a web interface for libivirt. This web app is written in Ruby on Rails. Now I am in phase when I have to create a deamon

[libvirt] [PATCH] Don't overwrite virDomainAssignDef errors.

2010-05-20 Thread Chris Lalancette
Signed-off-by: Chris Lalancette clala...@redhat.com --- src/qemu/qemu_driver.c |9 +++-- 1 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index f2139c0..6df2356 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c

Re: [libvirt] lxc_controller: don't ignore failed accept

2010-05-20 Thread Chris Lalancette
On 05/20/2010 09:40 AM, Jim Meyering wrote: From d4bebc04bf701e81efdd9d68ceb5b179a625e1db Mon Sep 17 00:00:00 2001 From: Jim Meyering meyer...@redhat.com Date: Thu, 20 May 2010 14:30:36 +0200 Subject: [PATCH] lxc_controller.c: don't ignore failed accept * src/lxc/lxc_controller.c

Re: [libvirt] [PATCH] Use gethostname in qemudDomainMigratePrepare2.

2010-05-20 Thread Daniel P. Berrange
On Thu, May 20, 2010 at 11:14:05AM -0400, Chris Lalancette wrote: This patch is essentially a revert of commit: 180ca598c4517012014d226c78068d4b38ff9e24 The problem ends up being that virGetHostname is *too* clever, and is causing migration problems. In particular, on machines with dynamic

Re: [libvirt] [PATCH 1/2] maint: avoid unwanted newline at end of diagnostic

2010-05-20 Thread Chris Lalancette
On 05/20/2010 05:18 AM, Jim Meyering wrote: From 122b1e31fb33c092a53802b56a0f2f5586c95bd5 Mon Sep 17 00:00:00 2001 From: Jim Meyering meyer...@redhat.com Date: Thu, 20 May 2010 11:12:17 +0200 Subject: [PATCH 1/2] maint: remove unwanted newline at end of diagnostic * src/xen/xend_internal.c

Re: [libvirt] [PATCH 1/2] maint: avoid unwanted newline at end of diagnostic

2010-05-20 Thread Jim Meyering
Chris Lalancette wrote: ... - _(Failed to create inactive domain %s\n), def-name); + _(Failed to create inactive domain %s), def-name); goto error; } ACK to this part, certainly. I'm not sure a new syntax-check rule (which may have

[libvirt] [PATCH v2] qemu: Use ShutdownVMDaemon for all startup cleanup paths

2010-05-20 Thread Cole Robinson
The current cleanup: in StartVMDaemon path is a poor duplication. qemuShutdownVMDaemon can handle teardown for inactive VMs, so let's use it. v2: Remove old abort: label, only use cleanup: Signed-off-by: Cole Robinson crobi...@redhat.com --- src/qemu/qemu_driver.c | 37

[libvirt] [PATCH] qemu: Allow using regular audio backends with VNC

2010-05-20 Thread Cole Robinson
Currently all host audio backends are disabled if a VM is using VNC, in favor of the QEMU VNC audio extension. Unfortunately no released VNC client supports this extension, so users have no way of getting audio to work if using VNC. Add a new config option in qemu.conf which allows changing

[libvirt] [PATCH] daemon: A few initscript corrections

2010-05-20 Thread Cole Robinson
Fedora bug https://bugzilla.redhat.com/show_bug.cgi?id=565238 - Avahi service is called 'avahi-daemon' - chkconfig descriptions must use \ for line continuations Signed-off-by: Cole Robinson crobi...@redhat.com --- daemon/libvirtd.init.in |6 +++--- 1 files changed, 3 insertions(+), 3

Re: [libvirt] [PATCH 4/4] qemu: Use ShutdownVMDaemon for all startup cleanup paths

2010-05-20 Thread Cole Robinson
On 05/18/2010 12:29 PM, Eric Blake wrote: On 05/17/2010 11:17 AM, Cole Robinson wrote: The current cleanup: in StartVMDaemon path is a poor duplication. qemuShutdownVMDaemon can handle teardown for inactive VMs, so let's use it. Signed-off-by: Cole Robinson crobi...@redhat.com ---

[libvirt] [PATCH] daemon: Export SDL audio environment variables

2010-05-20 Thread Cole Robinson
/etc/sysconfig/libvirtd has a few environment variables for configuring libvirt SDL audio. The libvirtd process doesn't see these, however, because they are never exported. Let's export the variables after sourcing the sysconfig script. There is another problem here that the commented out values

[libvirt] [PATCH] storage: Sanitize pool target paths

2010-05-20 Thread Cole Robinson
Spurious / in a pool target path makes life difficult for apps using the GetVolByPath, and doing other path based comparisons with pools. This has caused a few issues for virt-manager users: https://bugzilla.redhat.com/show_bug.cgi?id=494005 https://bugzilla.redhat.com/show_bug.cgi?id=593565 Add

Re: [libvirt] How to enable vhost for virtIO NIC?

2010-05-20 Thread Laine Stump
On 05/20/2010 10:30 AM, Ruben Kerkhof wrote: Hi all, On Wed, May 19, 2010 at 18:22, Laine Stumpla...@laine.org wrote: On 05/19/2010 01:49 AM, Huang, Zhiteng wrote: Hi gurus on the list, I'm trying to bring up a Linux with virtio vhost backend. My system is running on kernel

Re: [libvirt] [PATCH] storage: Sanitize pool target paths

2010-05-20 Thread Daniel P. Berrange
On Thu, May 20, 2010 at 12:04:05PM -0400, Cole Robinson wrote: Spurious / in a pool target path makes life difficult for apps using the GetVolByPath, and doing other path based comparisons with pools. This has caused a few issues for virt-manager users:

Re: [libvirt] [PATCH] Domain snapshot RNG and tests.

2010-05-20 Thread Cole Robinson
On 05/20/2010 11:14 AM, Chris Lalancette wrote: Signed-off-by: Chris Lalancette clala...@redhat.com --- docs/schemas/domainsnapshot.rng| 53 tests/Makefile.am |6 ++- tests/domainsnapshotschematest

Re: [libvirt] [PATCH] Don't overwrite virDomainAssignDef errors.

2010-05-20 Thread Cole Robinson
On 05/20/2010 11:14 AM, Chris Lalancette wrote: Signed-off-by: Chris Lalancette clala...@redhat.com --- src/qemu/qemu_driver.c |9 +++-- 1 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index f2139c0..6df2356 100644 ---

Re: [libvirt] [PATCH] Fix up the python bindings for snapshotting.

2010-05-20 Thread Cole Robinson
On 05/20/2010 11:14 AM, Chris Lalancette wrote: This involved a few fixes. To start with, an virDomainSnapshot object is really tied to a domain, not a connection, so we have to generate a slightly different object so that we can get at self._dom for the object. Next, we had to dummy up

Re: [libvirt] [PATCH] storage: Sanitize pool target paths

2010-05-20 Thread Eric Blake
On 05/20/2010 10:19 AM, Daniel P. Berrange wrote: On Thu, May 20, 2010 at 12:04:05PM -0400, Cole Robinson wrote: Spurious / in a pool target path makes life difficult for apps using the GetVolByPath, and doing other path based comparisons with pools. This has caused a few issues for

Re: [libvirt] [PATCH] storage: Sanitize pool target paths

2010-05-20 Thread Eric Blake
On 05/20/2010 10:34 AM, Eric Blake wrote: If we're going todo this shouldn't we resolve symlinks, and canonicalize any '..' or '.' components in the path. IIRC gnulib had something for this ? Gnulib has canonicalize-lgpl, but that only succeeds on existing file names. If you want to

Re: [libvirt] [PATCH v3] dots should be valid characters in interface names

2010-05-20 Thread Laine Stump
On 05/20/2010 10:12 AM, Chris Lalancette wrote: On 05/20/2010 01:06 AM, Charles Duffy wrote: On 05/19/2010 11:54 PM, Charles Duffy wrote: A revised patch is attached. This lifts its logic from its kernel counterpart, and is updated only to permit forward slashes (which, while

Re: [libvirt] [PATCH] qemu: Genericize tapfds/ntapfds

2010-05-20 Thread Laine Stump
On 05/20/2010 12:24 AM, Chris Wright wrote: * Alex Williamson (alex.william...@redhat.com) wrote: There doesn't seem to be anything specific to tap devices for this array of file descriptors which need to stay open of the guest to use. Rename then for others to make use of. Signed-off-by:

Re: [libvirt] [PATCH] Fix up the python bindings for snapshotting.

2010-05-20 Thread Chris Lalancette
On 05/20/2010 12:34 PM, Cole Robinson wrote: On 05/20/2010 11:14 AM, Chris Lalancette wrote: This involved a few fixes. To start with, an virDomainSnapshot object is really tied to a domain, not a connection, so we have to generate a slightly different object so that we can get at self._dom

Re: [libvirt] [PATCH] Domain snapshot RNG and tests.

2010-05-20 Thread Chris Lalancette
On 05/20/2010 12:19 PM, Cole Robinson wrote: On 05/20/2010 11:14 AM, Chris Lalancette wrote: Signed-off-by: Chris Lalancette clala...@redhat.com --- docs/schemas/domainsnapshot.rng| 53 tests/Makefile.am |6 ++-

Re: [libvirt] [PATCH] Don't overwrite virDomainAssignDef errors.

2010-05-20 Thread Chris Lalancette
On 05/20/2010 12:24 PM, Cole Robinson wrote: On 05/20/2010 11:14 AM, Chris Lalancette wrote: Signed-off-by: Chris Lalancette clala...@redhat.com --- src/qemu/qemu_driver.c |9 +++-- 1 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/qemu/qemu_driver.c

Re: [libvirt] libvirt and Ruby

2010-05-20 Thread Chris Lalancette
On 05/20/2010 01:53 PM, Jaromír Červenka wrote: Hi Chris, thank you for your answer. That will be great! :) I decided that I will write this deamon with Ruby and with old ruby bindings at least, so this is good news for me :) My friend from suse (Michal Hrusecky) did two patches till now

Re: [libvirt] [PATCH] daemon: A few initscript corrections

2010-05-20 Thread Chris Lalancette
On 05/20/2010 12:04 PM, Cole Robinson wrote: Fedora bug https://bugzilla.redhat.com/show_bug.cgi?id=565238 - Avahi service is called 'avahi-daemon' - chkconfig descriptions must use \ for line continuations Signed-off-by: Cole Robinson crobi...@redhat.com --- daemon/libvirtd.init.in |

Re: [libvirt] [RFC PATCH] qemu: Add suport for pci-assign.configfd option

2010-05-20 Thread Alex Williamson
On Wed, 2010-05-19 at 22:34 -0700, Chris Wright wrote: * Alex Williamson (alex.william...@redhat.com) wrote: @@ -1378,6 +1420,9 @@ int qemudExtractVersionInfo(const char *qemu, version, is_kvm, kvm_version) == -1) goto cleanup2; +if (flags

Re: [libvirt] [PATCH 1/4] Refactor qemudDomainRestore

2010-05-20 Thread Cole Robinson
On 05/20/2010 08:54 AM, Jiri Denemark wrote: We need to be able to restore a domain which we already locked and started a job for it without undoing these steps. This patch factors out internals of qemudDomainRestore into separate functions which work for locked objects. ---

Re: [libvirt] [PATCH v2] qemu: Use ShutdownVMDaemon for all startup cleanup paths

2010-05-20 Thread Eric Blake
On 05/20/2010 09:54 AM, Cole Robinson wrote: The current cleanup: in StartVMDaemon path is a poor duplication. qemuShutdownVMDaemon can handle teardown for inactive VMs, so let's use it. v2: Remove old abort: label, only use cleanup: ACK; looks nicer. -- Eric Blake ebl...@redhat.com

Re: [libvirt] [PATCH 2/4] Factor out def assignment to existing domain from virDomainAssignDef

2010-05-20 Thread Cole Robinson
On 05/20/2010 08:54 AM, Jiri Denemark wrote: We need to be able to assign new def to an existing virDomainObj which is already locked. This patch factors out the relevant code from virDomainAssignDef into virDomainObjAssignDef. --- src/conf/domain_conf.c | 36

Re: [libvirt] [PATCH 3/4] Refactor qemudDomainStart

2010-05-20 Thread Cole Robinson
On 05/20/2010 08:54 AM, Jiri Denemark wrote: We need a common internal function for starting managed domains to be used during autostart. This patch factors out relevant code from qemudDomainStart into qemudDomainObjStart and makes it use the refactored code for domain restore instead of

Re: [libvirt] [RFC PATCH] qemu: Add suport for pci-assign.configfd option

2010-05-20 Thread Chris Wright
* Alex Williamson (alex.william...@redhat.com) wrote: On Wed, 2010-05-19 at 22:34 -0700, Chris Wright wrote: * Alex Williamson (alex.william...@redhat.com) wrote: @@ -1378,6 +1420,9 @@ int qemudExtractVersionInfo(const char *qemu, version, is_kvm, kvm_version)

Re: [libvirt] [PATCH 4/4] Autostart domains using virDomainObjStart

2010-05-20 Thread Cole Robinson
On 05/20/2010 08:54 AM, Jiri Denemark wrote: --- src/qemu/qemu_driver.c | 34 ++ 1 files changed, 18 insertions(+), 16 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 8f5cae1..d40e29a 100644 --- a/src/qemu/qemu_driver.c

Re: [libvirt] VIR_ERROR and VIR_DEBUG normalization

2010-05-20 Thread Eric Blake
On 05/20/2010 01:11 AM, Jim Meyering wrote: Most of the following changes have been induced automatically. The few outliers done manually are marked as such. [PATCH 01/10] maint: use VIR_ERROR0 rather than VIR_ERROR with a bare %s [PATCH 02/10] maint: mark translatable string args of

Re: [libvirt] [PATCH] libvirtd: mark strings for translation, including --help output

2010-05-20 Thread Eric Blake
On 05/20/2010 02:02 AM, Jim Meyering wrote: +++ b/daemon/libvirtd.c @@ -484,8 +484,8 @@ static int daemonForkIntoBackground(void) { if (ret == 1 status != 0) { fprintf(stderr, -error: %s. Check /var/log/messages or run without -

Re: [libvirt] [PATCH] daemon: Export SDL audio environment variables

2010-05-20 Thread Eric Blake
On 05/20/2010 10:04 AM, Cole Robinson wrote: /etc/sysconfig/libvirtd has a few environment variables for configuring libvirt SDL audio. The libvirtd process doesn't see these, however, because they are never exported. Let's export the variables after sourcing the sysconfig script. ACK. --

Re: [libvirt] [PATCH] qemu: Allow using regular audio backends with VNC

2010-05-20 Thread Eric Blake
On 05/20/2010 10:04 AM, Cole Robinson wrote: Currently all host audio backends are disabled if a VM is using VNC, in favor of the QEMU VNC audio extension. Unfortunately no released VNC client supports this extension, so users have no way of getting audio to work if using VNC. Add a new

[libvirt] [V2 PATCH] V2 port-profile ID support using new IFLA_VF_PORTS netlink msg

2010-05-20 Thread Scott Feldman
From: Scott Feldman scofe...@cisco.com Use the new IFLA_VF_PORTS netlink msg to associate/disassociate port-profiles on a virtual port backing the VM device. The new netlink msg type has been accepted by netdev kernel maintainer. Tested with Cisco's 10G Ethernet NIC using example XML:

[libvirt] [PATCH 2/3] storage: Combine some duplicate code

2010-05-20 Thread Cole Robinson
Volume detection in the scsi backend was duplicating code already present in storage_backend.c. Let's drop the duplicate code. Also, change the shared function name to be less generic, and remove some error squashing in the other call site. Signed-off-by: Cole Robinson crobi...@redhat.com ---

[libvirt] [PATCH 3/3] storage: Check for invalid storage mode before opening

2010-05-20 Thread Cole Robinson
If a directory pool contains pipes or sockets, a pool start can fail or hang: https://bugzilla.redhat.com/show_bug.cgi?id=589577 We already try to avoid these special files, but only attempt after opening the path, which is where the problems lie. Unify volume opening into a single function

[libvirt] [PATCH 1/3] storage: mpath: Clean up some error handling

2010-05-20 Thread Cole Robinson
We were squashing error messages in a few cases. Recode to follow common ret = -1 convention. Signed-off-by: Cole Robinson crobi...@redhat.com --- src/storage/storage_backend_mpath.c | 20 1 files changed, 4 insertions(+), 16 deletions(-) diff --git

Re: [libvirt] [PATCH] daemon: A few initscript corrections

2010-05-20 Thread Cole Robinson
On 05/20/2010 02:37 PM, Chris Lalancette wrote: On 05/20/2010 12:04 PM, Cole Robinson wrote: Fedora bug https://bugzilla.redhat.com/show_bug.cgi?id=565238 - Avahi service is called 'avahi-daemon' - chkconfig descriptions must use \ for line continuations Signed-off-by: Cole Robinson

Re: [libvirt] [PATCH v2] qemu: Use ShutdownVMDaemon for all startup cleanup paths

2010-05-20 Thread Cole Robinson
On 05/20/2010 03:01 PM, Eric Blake wrote: On 05/20/2010 09:54 AM, Cole Robinson wrote: The current cleanup: in StartVMDaemon path is a poor duplication. qemuShutdownVMDaemon can handle teardown for inactive VMs, so let's use it. v2: Remove old abort: label, only use cleanup: ACK; looks

Re: [libvirt] [PATCH] storage: Sanitize pool target paths

2010-05-20 Thread Eric Blake
On 05/20/2010 10:04 AM, Cole Robinson wrote: Spurious / in a pool target path makes life difficult for apps using the GetVolByPath, and doing other path based comparisons with pools. This has caused a few issues for virt-manager users: https://bugzilla.redhat.com/show_bug.cgi?id=494005

Re: [libvirt] VIR_ERROR and VIR_DEBUG normalization

2010-05-20 Thread Jim Meyering
Eric Blake wrote: On 05/20/2010 01:11 AM, Jim Meyering wrote: Most of the following changes have been induced automatically. The few outliers done manually are marked as such. [PATCH 01/10] maint: use VIR_ERROR0 rather than VIR_ERROR with a bare %s [PATCH 02/10] maint: mark translatable

Re: [libvirt] [PATCH] libvirtd: mark strings for translation, including --help output

2010-05-20 Thread Jim Meyering
Eric Blake wrote: On 05/20/2010 02:02 AM, Jim Meyering wrote: +++ b/daemon/libvirtd.c @@ -484,8 +484,8 @@ static int daemonForkIntoBackground(void) { if (ret == 1 status != 0) { fprintf(stderr, -error: %s. Check /var/log/messages or

[libvirt] [PATCH] Remove isValidIfname.

2010-05-20 Thread Chris Lalancette
We shouldn't be checking validity in domain_conf, since it can be used by multiple different hosts and hypervisors. Remove the check completely. Signed-off-by: Chris Lalancette clala...@redhat.com --- src/conf/domain_conf.c | 12 ++-- 1 files changed, 2 insertions(+), 10 deletions(-)

[libvirt] [PATCH] Fix failing virGetHostname.

2010-05-20 Thread Chris Lalancette
We've been running into a lot of situations where virGetHostname() is returning localhost, where a plain gethostname() would have returned the correct thing. This is because virGetHostname() is *always* trying to canonicalize the name returned from gethostname(), even when it doesn't have to.

[libvirt] [PATCH] Fix up basic migration.

2010-05-20 Thread Chris Lalancette
Basic live migration was broken by the commit that added non-shared block support. It also added a couple of built-in memory leaks. This patch fixes these problems and allows normal live migration to work again. Signed-off-by: Chris Lalancette clala...@redhat.com --- src/qemu/qemu_driver.c

Re: [libvirt] [PATCH] libvirtd: mark strings for translation, including --help output

2010-05-20 Thread Eric Blake
On 05/20/2010 01:42 PM, Jim Meyering wrote: Should we also do a followup that passes argv[0] to this method, so that the error message can start with the program name? Might as well. patch below. Didn't see any signature change to daemonForkIntoBackground... Missed a string. This should

[libvirt] [PATCH v5] vepa: parsing for 802.1Qb{g|h} XML

2010-05-20 Thread Stefan Berger
Below is David Alan's original patch with lots of changes. In particular, it now parses the following two XML descriptions, one for 802.1Qbg and 802.1Qbh and stored the data internally. The actual triggering of the switch setup protocol has not been implemented here but the relevant code to do

[libvirt] [RFC] [PATCH 1/3] vepa+vsi: Introduce dependency on libnl

2010-05-20 Thread Stefan Berger
This patch introduces a dependency on libnl, which subsequent patches will then use. Signed-off-by: Stefan Berger stef...@us.ibm.com Index: libvirt-acl/configure.ac === --- libvirt-acl.orig/configure.ac +++ libvirt-acl/configure.ac

[libvirt] [RFC] [PATCH 3/3] vepa+vsi: Some experimental code for 802.1Qbh

2010-05-20 Thread Stefan Berger
This patch may get 802.1Qbh devices working. I am adding some code to poll for the status of an 802.1Qbh device and loop for a while until the status indicates success. This part for sure needs more work and testing... I am recycling link_dump from a previous patch. Signed-off-by: Stefan Berger

[libvirt] [RFC] [PATCH 2/3] vepa+vsi: add handling of 802.1Qbg using netlink messages

2010-05-20 Thread Stefan Berger
This is so far a more or less experimental patch that adds code for communicating with the external lldpad daemon using the recently added netlink messages. It's communicating using multicast netlink messages in case of 802.1Qbg and unicast using 802.1Qbh. In the multicast case I am currently

Re: [libvirt] [PATCH v5] vepa: parsing for 802.1Qb{g|h} XML

2010-05-20 Thread Scott Feldman
On 5/20/10 1:10 PM, Stefan Berger stef...@linux.vnet.ibm.com wrote: vsi type='802.1Qbg' Can we use something more generic than vsi/vsi since VSI is a .bg term? Something like virtual_port? -scott -- libvir-list mailing list libvir-list@redhat.com

Re: [libvirt] [RFC] [PATCH 3/3] vepa+vsi: Some experimental code for 802.1Qbh

2010-05-20 Thread Scott Feldman
On 5/20/10 1:25 PM, Stefan Berger stef...@linux.vnet.ibm.com wrote: This patch may get 802.1Qbh devices working. I am adding some code to poll for the status of an 802.1Qbh device and loop for a while until the status indicates success. This part for sure needs more work and testing...

[libvirt] [PATCH 0/3 V2] Fix race in qemu driver wrt vnc port allocation

2010-05-20 Thread Jim Fehlig
Sorry for the delay ... V2 changes noted in the patches. The qemu driver contains a subtle race in the logic to find next available vnc port. Currently it iterates through all available ports and returns the first for which bind(2) succeeds. However it is possible that a previously issued

Re: [libvirt] [PATCH] libvirtd: mark strings for translation, including --help output

2010-05-20 Thread Jim Meyering
Eric Blake wrote: On 05/20/2010 01:42 PM, Jim Meyering wrote: Should we also do a followup that passes argv[0] to this method, so that the error message can start with the program name? Might as well. patch below. Didn't see any signature change to daemonForkIntoBackground... Missed a

[libvirt] [PATCH 2/3] Add defines for QEMU_VNC_PORT_{MIN, MAX} and use them

2010-05-20 Thread Jim Fehlig
--- src/qemu/qemu_driver.c |5 - 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 65ca117..06cf660 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -88,6 +88,9 @@ #define VIR_FROM_THIS VIR_FROM_QEMU

[libvirt] [PATCH 1/3] Add simple bitmap operations to utils

2010-05-20 Thread Jim Fehlig
V2: - Move bitmap impl to src/util/bitmap.[ch] - Use CHAR_BIT instead of explicit '8' - Use size_t instead of unsigned int - Fix calculation of bitmap size in virBitmapAlloc - Ensure bit is within range of map in the set, clear, and get operations - Use bool in virBitmapGetBit -

  1   2   >