[libvirt] [PATCH 9/9] Move virRun, virExec*, virFork to util/command

2011-05-13 Thread Cole Robinson
Seems reasonable to have all command wrappers in the same place v2: Dont move SetInherit Signed-off-by: Cole Robinson crobi...@redhat.com --- cfg.mk|2 +- src/libvirt_private.syms |5 +- src/lxc/veth.c

Re: [libvirt] [PATCH 2/9] openvz: Convert virExec usage to virCommand

2011-05-17 Thread Cole Robinson
On 05/13/2011 04:47 PM, Eric Blake wrote: On 05/13/2011 02:10 PM, Cole Robinson wrote: v2: Use virCommand's autocleanup Signed-off-by: Cole Robinson crobi...@redhat.com --- src/openvz/openvz_conf.c | 37 + src/openvz/openvz_driver.c | 55

Re: [libvirt] [PATCH 6/9] storage_backend: Convert virRunWithHook usage to virCommand

2011-05-17 Thread Cole Robinson
On 05/13/2011 06:13 PM, Eric Blake wrote: On 05/13/2011 02:10 PM, Cole Robinson wrote: virRunWithHook is now unused, so we can drop it. Tested w/ raw + qcow2 volume creation and copying. v2: Use opaque data to skip hook second time around Simply command building Signed-off

[libvirt] [PATCH 1/4] qemu: Convert virExec usage to virCommand

2011-05-17 Thread Cole Robinson
v2: Have virCommand cleanup intermediate process for us v3: Preserve original FD closing behavior Signed-off-by: Cole Robinson crobi...@redhat.com --- src/qemu/qemu_driver.c | 26 -- src/qemu/qemu_process.c |2 +- 2 files changed, 13 insertions(+), 15

[libvirt] [PATCH 0/4 v3] More virCommand conversions and cleanups

2011-05-17 Thread Cole Robinson
Addressed Eric's v2 comments Cole Robinson (4): qemu: Convert virExec usage to virCommand util: Remove unused virExec wrapper util: Implement virRun as a wrapper around virCommand Move virRun, virExec*, virFork to util/command cfg.mk|3 +- src

[libvirt] [PATCH 2/4] util: Remove unused virExec wrapper

2011-05-17 Thread Cole Robinson
v3: Remove obsolete comment Signed-off-by: Cole Robinson crobi...@redhat.com --- cfg.mk |1 - src/libvirt_private.syms |1 - src/util/util.c | 35 --- src/util/util.h |8 4 files changed, 0 insertions

[libvirt] [PATCH 3/4] util: Implement virRun as a wrapper around virCommand

2011-05-17 Thread Cole Robinson
v2: Simplify command building Handle command building failure v3: Remove unneeded NULL check Signed-off-by: Cole Robinson crobi...@redhat.com --- src/util/util.c | 73 +++ 1 files changed, 4 insertions(+), 69 deletions(-) diff

[libvirt] [PATCH 4/4] Move virRun, virExec*, virFork to util/command

2011-05-17 Thread Cole Robinson
Seems reasonable to have all command wrappers in the same place v2: Dont move SetInherit v3: Comment spelling fix Adjust WARN0 comment Remove spurious #include movement Don't include sys/types.h Combine virExec enums Signed-off-by: Cole Robinson crobi...@redhat.com

Re: [libvirt] [PATCH 2/9] openvz: Convert virExec usage to virCommand

2011-05-17 Thread Cole Robinson
On 05/17/2011 11:12 AM, Eric Blake wrote: On 05/17/2011 08:24 AM, Cole Robinson wrote: +rc = got; out: VIR_FORCE_CLOSE(outfd); +virCommandFree(cmd); for ( ; got = 0 ; got--) VIR_FREE(names[got]); Oops, this now frees names[] on success. You need to gate

Re: [libvirt] [PATCH] Fix messages using VIR_ERR_XML_ERROR

2011-05-18 Thread Cole Robinson
On 05/13/2011 08:35 AM, Michal Prívozník wrote: On 05/12/2011 11:47 PM, Cole Robinson wrote: This error code has existed since the dawn of time, yet the messages it generates are almost universally busted. Here's a small sampling: src/conf/domain_conf.c:4889 : XML description for missing root

Re: [libvirt] [PATCH] Fix messages using VIR_ERR_XML_ERROR

2011-05-18 Thread Cole Robinson
On 05/18/2011 10:03 AM, Eric Blake wrote: On 05/12/2011 03:47 PM, Cole Robinson wrote: This error code has existed since the dawn of time, yet the messages it generates are almost universally busted. Here's a small sampling: src/conf/domain_conf.c:4889 : XML description for missing root

Re: [libvirt] [PATCH 1/4] Fix error messages codes when TypeFromString fails

2011-05-19 Thread Cole Robinson
On 05/18/2011 11:46 AM, Michal Privoznik wrote: --- src/conf/cpu_conf.c|4 +- src/conf/domain_conf.c | 100 ++- src/conf/interface_conf.c |2 +- src/conf/network_conf.c|2 +-

Re: [libvirt] [PATCH 3/4] Improve incorrect root element error messages

2011-05-19 Thread Cole Robinson
On 05/18/2011 11:47 AM, Michal Privoznik wrote: --- src/conf/cpu_conf.c |7 --- src/conf/domain_conf.c| 12 src/conf/interface_conf.c |6 -- src/conf/network_conf.c |6 -- src/conf/node_device_conf.c |6 --

[libvirt] [PATCH] storage: List directory volumes for dir/fs/netfs pools

2011-05-26 Thread Cole Robinson
Since directories can be used for filesystem passthrough, they are basically storage volumes. Not sure if anyone has an opinion about not listing directories like ., .., or lost+found, but this patch doesn't do anything explicit with them. --- src/storage/storage_backend.c| 34

[libvirt] [PATCH v2] storage: List directory volumes for dir/fs/netfs pools

2011-05-26 Thread Cole Robinson
Since directories can be used for filesystem passthrough, they are basically storage volumes. v2: Skip ., .., lost+found dirs Signed-off-by: Cole Robinson crobi...@redhat.com --- src/storage/storage_backend.c| 44 +++-- src/storage/storage_backend.h

[libvirt] [PATCH v3] storage: List directory volumes for dir/fs/netfs pools

2011-05-26 Thread Cole Robinson
Since directories can be used for filesystem passthrough, they are basically storage volumes. v2: Skip ., .., lost+found dirs v3: Use gnulib last_component Signed-off-by: Cole Robinson crobi...@redhat.com --- src/storage/storage_backend.c| 45

Re: [libvirt] [PATCH] storage: List directory volumes for dir/fs/netfs pools

2011-05-31 Thread Cole Robinson
On 05/27/2011 08:39 AM, Richard W.M. Jones wrote: On Thu, May 26, 2011 at 01:25:24PM -0600, Eric Blake wrote: On 05/26/2011 12:58 PM, Daniel P. Berrange wrote: On Thu, May 26, 2011 at 02:10:24PM -0400, Cole Robinson wrote: Since directories can be used for filesystem passthrough

[libvirt] [PATCH v4] storage: List directory volumes for dir/fs/netfs pools

2011-05-31 Thread Cole Robinson
Since directories can be used for filesystem passthrough, they are basically storage volumes. v2: Skip ., .., lost+found dirs v3: Use gnulib last_component v4: Use gnulib dirname.h, not system dirname.h Don't skip lost+found Signed-off-by: Cole Robinson crobi...@redhat.com

Re: [libvirt] [PATCH v4] storage: List directory volumes for dir/fs/netfs pools

2011-05-31 Thread Cole Robinson
On 05/31/2011 12:45 PM, Eric Blake wrote: On 05/31/2011 10:03 AM, Cole Robinson wrote: Since directories can be used for filesystem passthrough, they are basically storage volumes. v2: Skip ., .., lost+found dirs v3: Use gnulib last_component v4: Use gnulib dirname.h

Re: [libvirt] [PATCH 4/4] Move virRun, virExec*, virFork to util/command

2011-06-01 Thread Cole Robinson
On 06/01/2011 03:52 PM, Eric Blake wrote: On 05/17/2011 09:06 AM, Cole Robinson wrote: Seems reasonable to have all command wrappers in the same place v2: Dont move SetInherit v3: Comment spelling fix Adjust WARN0 comment Remove spurious #include movement Don't

[libvirt] [PATCH 0/7] lxc: Improve container startup error reporting

2011-06-02 Thread Cole Robinson
the output from the guest logfile, similar to how we do for qemu guests. A few additional error reporting improvements are also included. Cole Robinson (7): lxc: Drop container stdio as late as possible lxc: Don't report error in Wait/SendContinue lxc: Refactor controller command building lxc

[libvirt] [PATCH 5/7] lxc: controller: Improve container error reporting

2011-06-02 Thread Cole Robinson
Add a handshake with the cloned container process to try and detect if it fails to start. Signed-off-by: Cole Robinson crobi...@redhat.com --- src/lxc/lxc_container.c | 18 ++ src/lxc/lxc_container.h |1 + src/lxc/lxc_controller.c | 17 + 3 files changed

[libvirt] [PATCH 2/7] lxc: Don't report error in Wait/SendContinue

2011-06-02 Thread Cole Robinson
We will reuse these shortly, and each use should have a different error message. Signed-off-by: Cole Robinson crobi...@redhat.com --- src/lxc/lxc_container.c | 15 ++- src/lxc/lxc_controller.c |5 - 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/lxc

[libvirt] [PATCH 3/7] lxc: Refactor controller command building

2011-06-02 Thread Cole Robinson
Arranges things similar to the qemu driver. Will allow us to more easilly report command error output. Signed-off-by: Cole Robinson crobi...@redhat.com --- src/lxc/lxc_driver.c | 74 ++--- 1 files changed, 39 insertions(+), 35 deletions(-) diff

[libvirt] [PATCH 7/7] lxc: Ensure container init actually exists

2011-06-02 Thread Cole Robinson
Since we can't really get useful error reporting from virCommandExec since it needs to be the last thing we do. Signed-off-by: Cole Robinson crobi...@redhat.com --- src/lxc/lxc_container.c |7 +++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/src/lxc/lxc_container.c b

[libvirt] [PATCH 4/7] lxc: Improve guest startup error reporting

2011-06-02 Thread Cole Robinson
-off-by: Cole Robinson crobi...@redhat.com --- src/lxc/lxc_container.c |2 +- src/lxc/lxc_container.h |1 + src/lxc/lxc_controller.c | 33 +- src/lxc/lxc_driver.c | 107 +- 4 files changed, 137 insertions(+), 6 deletions

[libvirt] [PATCH 6/7] lxc: Verify root fs exists before mounting

2011-06-02 Thread Cole Robinson
Otherwise the following virFileMakePath will create the directory for us and fail further ahead, which probably isn't intended. Signed-off-by: Cole Robinson crobi...@redhat.com --- src/lxc/lxc_controller.c |8 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/src/lxc

Re: [libvirt] [PATCH 4/4] Move virRun, virExec*, virFork to util/command

2011-06-07 Thread Cole Robinson
On 06/01/2011 04:02 PM, Cole Robinson wrote: On 06/01/2011 03:52 PM, Eric Blake wrote: On 05/17/2011 09:06 AM, Cole Robinson wrote: Seems reasonable to have all command wrappers in the same place v2: Dont move SetInherit v3: Comment spelling fix Adjust WARN0 comment

Re: [libvirt] [PATCH 4/7] lxc: Improve guest startup error reporting

2011-06-07 Thread Cole Robinson
On 06/02/2011 04:19 PM, Eric Blake wrote: On 06/02/2011 01:40 PM, Cole Robinson wrote: Add a simple handshake with the lxc_controller process so we can detect process startup failures. We do this by adding a new --handshake cli arg to lxc_controller for passing a file descriptor

Re: [libvirt] [Qemu-devel] [PATCH 6/9] net: Improve layout of 'info network'

2011-06-07 Thread Cole Robinson
On 06/07/2011 03:55 PM, Anthony Liguori wrote: On 06/07/2011 11:45 AM, Jan Kiszka wrote: Improve the layout when listing non-vlan clients via 'info network'. The result looks like this: (qemu) info network Devices not on any VLAN: orphan: net=10.0.2.0, restricted=n virtio-net-pci.0:

[libvirt] [PATCH 2/2] qemu: Fix parsing 'info chardev'

2011-06-08 Thread Cole Robinson
If qemu supports -chardev, our char frontend aliases are ex. 'charserial0' not just 'serial0'. Typically we don't use this code path because the pty's are scraped from stdout. Signed-off-by: Cole Robinson crobi...@redhat.com --- src/qemu/qemu_process.c | 29 ++--- 1

[libvirt] [PATCH 1/2] qemu: Scrape stdout for virtio console pty

2011-06-08 Thread Cole Robinson
Currently we forget to do this and have to fallback to info chardev (which also fails, see following patch) Signed-off-by: Cole Robinson crobi...@redhat.com --- src/qemu/qemu_process.c | 10 ++ 1 files changed, 10 insertions(+), 0 deletions(-) diff --git a/src/qemu/qemu_process.c b

Re: [libvirt] [RFC PATCH] Set and reset MAC for PASSTHROUGH mode

2011-06-08 Thread Cole Robinson
Hi Dirk, Your patch mail is line wrapped. I'd recommend resending your patch using git send-email if possible, will at least increase the chances that someone reviews/comments. Thanks, Cole On 06/08/2011 08:10 AM, D. Herrendoerfer wrote: Hi to all, there is a problem present in libvirt that

Re: [libvirt] Driver development

2011-06-08 Thread Cole Robinson
On 06/08/2011 07:10 AM, Carlos N. A. Corrêa wrote: Hi, I'm interested in developing a new network driver for libvirt (one for the definition and management of OpenVSwitch datapaths). I've read some of the code already, and by now my general directions are: - Change the function

Re: [libvirt] [PATCH 2/2] qemu: Fix parsing 'info chardev'

2011-06-14 Thread Cole Robinson
On 06/13/2011 02:06 PM, Eric Blake wrote: On 06/08/2011 10:36 AM, Cole Robinson wrote: If qemu supports -chardev, our char frontend aliases are ex. 'charserial0' not just 'serial0'. Typically we don't use this code path because the pty's are scraped from stdout. Signed-off-by: Cole Robinson

[libvirt] [PATCH 00/10] python: Implement missing stream/event ops

2011-06-15 Thread Cole Robinson
Currently it isn't possible to implement the equivalent of 'virsh console' with the python bindings. This series implements the missing functionality required to do so. Cole Robinson (10): python: libvirt-override: use simpler debug python: generator: Don't print warning if nothing to warn

[libvirt] [PATCH 05/10] python: Implement virStreamSend/RecvAll helpers

2011-06-15 Thread Cole Robinson
the data in a string pointer. Signed-off-by: Cole Robinson crobi...@redhat.com --- python/generator.py |4 +- python/libvirt-override-virStream.py | 64 ++ 2 files changed, 66 insertions(+), 2 deletions(-) diff --git a/python/generator.py b/python

[libvirt] [PATCH 01/10] python: libvirt-override: use simpler debug

2011-06-15 Thread Cole Robinson
In a couple instances we have to mark a debug variable as ATTRIBUTE_UNUSED to avoid warnings. Signed-off-by: Cole Robinson crobi...@redhat.com --- python/libvirt-override.c | 159 - 1 files changed, 55 insertions(+), 104 deletions(-) diff --git

[libvirt] [PATCH 02/10] python: generator: Don't print warning if nothing to warn about

2011-06-15 Thread Cole Robinson
Signed-off-by: Cole Robinson crobi...@redhat.com --- python/generator.py |8 +--- 1 files changed, 5 insertions(+), 3 deletions(-) diff --git a/python/generator.py b/python/generator.py index 39c3ca7..6ee0ada 100755 --- a/python/generator.py +++ b/python/generator.py @@ -654,9 +654,11

[libvirt] [PATCH 06/10] Promote virEvent*Handle/Timeout to public API

2011-06-15 Thread Cole Robinson
Since we virEventRegisterDefaultImpl is now a public API, callers need a way to invoke the default registered Handle and Timeout functions. We already have general functions for these internally, so promote them to the public API. Signed-off-by: Cole Robinson crobi...@redhat.com --- daemon

[libvirt] [PATCH 07/10] events: Correct virEventAddTimeout docs

2011-06-15 Thread Cole Robinson
Signed-off-by: Cole Robinson crobi...@redhat.com --- src/util/event.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/util/event.c b/src/util/event.c index 4108221..bd781ec 100644 --- a/src/util/event.c +++ b/src/util/event.c @@ -87,11 +87,11 @@ int

[libvirt] [PATCH 04/10] python: Implement virStreamSend/Recv

2011-06-15 Thread Cole Robinson
The return values for the python version are different that the C version of virStreamSend: on success we return a string, an error raises an exception, and if the stream would block we return int(-2). We need to do this since strings aren't passed by reference in python. Signed-off-by: Cole

[libvirt] [PATCH 08/10] python: Add bindings for virEvent*Handle/Timeout

2011-06-15 Thread Cole Robinson
Signed-off-by: Cole Robinson crobi...@redhat.com --- python/generator.py| 11 +-- python/libvirt-override.c | 192 +-- python/libvirt-override.py | 54 3 files changed, 221 insertions(+), 36 deletions(-) diff --git a/python

[libvirt] [PATCH 10/10] python: Mark event callback wrappers as private

2011-06-15 Thread Cole Robinson
These functions aren't intended to be called directly by users, so mark them as private. While we're at it, remove unneeded exception handling, and break some long lines. Signed-off-by: Cole Robinson crobi...@redhat.com --- python/libvirt-override-virConnect.py | 102

[libvirt] [PATCH 09/10] python: events: Fix C-Python handle callback prototype

2011-06-15 Thread Cole Robinson
-by: Cole Robinson crobi...@redhat.com --- examples/domain-events/events-python/event-test.py |6 +--- python/libvirt-override.py | 26 ++- 2 files changed, 26 insertions(+), 6 deletions(-) diff --git a/examples/domain-events/events-python/event-test.py b

Re: [libvirt] [PATCH 03/10] python: Implement bindings for virStreamEventAddCallback

2011-06-15 Thread Cole Robinson
On 06/15/2011 09:23 PM, Cole Robinson wrote: Signed-off-by: Cole Robinson crobi...@redhat.com --- python/generator.py |7 +-- python/libvirt-override-virStream.py | 24 ++ python/libvirt-override.c| 81 ++ python

[libvirt] [PATCH 03/10] python: Implement bindings for virStreamEventAddCallback

2011-06-15 Thread Cole Robinson
Signed-off-by: Cole Robinson crobi...@redhat.com --- python/generator.py |7 +-- python/libvirt-override-virStream.py | 24 ++ python/libvirt-override.c| 81 ++ python/typewrappers.h|1 - 4 files

Re: [libvirt] [PATCH 01/10] python: libvirt-override: use simpler debug

2011-06-20 Thread Cole Robinson
On 06/16/2011 09:43 AM, Daniel Veillard wrote: On Wed, Jun 15, 2011 at 09:23:10PM -0400, Cole Robinson wrote: In a couple instances we have to mark a debug variable as ATTRIBUTE_UNUSED to avoid warnings. Signed-off-by: Cole Robinson crobi...@redhat.com --- python/libvirt-override.c | 159

Re: [libvirt] [PATCH 02/10] python: generator: Don't print warning if nothing to warn about

2011-06-20 Thread Cole Robinson
On 06/16/2011 09:44 AM, Daniel Veillard wrote: On Wed, Jun 15, 2011 at 09:23:11PM -0400, Cole Robinson wrote: Signed-off-by: Cole Robinson crobi...@redhat.com --- python/generator.py |8 +--- 1 files changed, 5 insertions(+), 3 deletions(-) diff --git a/python/generator.py b

Re: [libvirt] [PATCH 03/10] python: Implement bindings for virStreamEventAddCallback

2011-06-20 Thread Cole Robinson
On 06/16/2011 10:33 AM, Daniel Veillard wrote: On Wed, Jun 15, 2011 at 09:23:12PM -0400, Cole Robinson wrote: Signed-off-by: Cole Robinson crobi...@redhat.com --- python/generator.py |7 +-- python/libvirt-override-virStream.py | 24 ++ python/libvirt

Re: [libvirt] [PATCH 09/10] python: events: Fix C-Python handle callback prototype

2011-06-20 Thread Cole Robinson
On 06/19/2011 09:44 PM, Daniel Veillard wrote: On Wed, Jun 15, 2011 at 09:23:18PM -0400, Cole Robinson wrote: If registering our own event loop implementation written in python, any handles or timeouts callbacks registered by libvirt C code must are wrapped in a python function. There is some

Re: [libvirt] [PATCH 04/10] python: Implement virStreamSend/Recv

2011-06-20 Thread Cole Robinson
On 06/16/2011 10:44 AM, Daniel Veillard wrote: On Wed, Jun 15, 2011 at 09:23:13PM -0400, Cole Robinson wrote: The return values for the python version are different that the C version of virStreamSend: on success we return a string, an error raises an exception, and if the stream would block

Re: [libvirt] [PATCH 10/10] python: Mark event callback wrappers as private

2011-06-20 Thread Cole Robinson
On 06/19/2011 09:45 PM, Daniel Veillard wrote: On Wed, Jun 15, 2011 at 09:23:19PM -0400, Cole Robinson wrote: These functions aren't intended to be called directly by users, so mark them as private. Hum, should that be one _ or two __ ? But ACK to cleanup ! Python convention

[libvirt] [PATCH 1/7] python: Implement virStreamSend/Recv

2011-06-20 Thread Cole Robinson
The return values for the python version are different that the C version of virStreamSend: on success we return a string, an error raises an exception, and if the stream would block we return int(-2). We need to do this since strings aren't passed by reference in python. Signed-off-by: Cole

[libvirt] [PATCH 0/7 v2] python: Implement missing stream/event ops

2011-06-20 Thread Cole Robinson
didn't address, if I haven't managed to convince him (or others) with my latest mails I can do another rev of the series. Cole Robinson (7): python: Implement virStreamSend/Recv python: Implement virStreamSend/RecvAll helpers Promote virEvent*Handle/Timeout to public API events

[libvirt] [PATCH 3/7] Promote virEvent*Handle/Timeout to public API

2011-06-20 Thread Cole Robinson
Since we virEventRegisterDefaultImpl is now a public API, callers need a way to invoke the default registered Handle and Timeout functions. We already have general functions for these internally, so promote them to the public API. v2: Actually add APIs to libvirt.h Signed-off-by: Cole

[libvirt] [PATCH 4/7] events: Correct virEventAddTimeout docs

2011-06-20 Thread Cole Robinson
Signed-off-by: Cole Robinson crobi...@redhat.com --- src/util/event.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/util/event.c b/src/util/event.c index 4108221..bd781ec 100644 --- a/src/util/event.c +++ b/src/util/event.c @@ -87,11 +87,11 @@ int

[libvirt] [PATCH 5/7] python: Add bindings for virEvent*Handle/Timeout

2011-06-20 Thread Cole Robinson
Signed-off-by: Cole Robinson crobi...@redhat.com --- python/generator.py| 11 +-- python/libvirt-override.c | 192 +-- python/libvirt-override.py | 54 3 files changed, 221 insertions(+), 36 deletions(-) diff --git a/python

[libvirt] [PATCH 6/7] python: events: Fix C-Python handle callback prototype

2011-06-20 Thread Cole Robinson
-by: Cole Robinson crobi...@redhat.com --- examples/domain-events/events-python/event-test.py |6 +--- python/libvirt-override.py | 26 ++- 2 files changed, 26 insertions(+), 6 deletions(-) diff --git a/examples/domain-events/events-python/event-test.py b

[libvirt] [PATCH 2/7] python: Implement virStreamSend/RecvAll helpers

2011-06-20 Thread Cole Robinson
the data in a string pointer. Signed-off-by: Cole Robinson crobi...@redhat.com --- python/generator.py |4 +- python/libvirt-override-virStream.py | 64 ++ 2 files changed, 66 insertions(+), 2 deletions(-) diff --git a/python/generator.py b/python

[libvirt] [PATCH 7/7] python: Mark event callback wrappers as private

2011-06-20 Thread Cole Robinson
These functions aren't intended to be called directly by users, so mark them as private. While we're at it, remove unneeded exception handling, and break some long lines. Signed-off-by: Cole Robinson crobi...@redhat.com --- python/libvirt-override-virConnect.py | 102

Re: [libvirt] [PATCH 10/10] python: Mark event callback wrappers as private

2011-06-21 Thread Cole Robinson
On 06/20/2011 08:45 PM, Daniel Veillard wrote: On Mon, Jun 20, 2011 at 03:34:07PM -0400, Cole Robinson wrote: On 06/19/2011 09:45 PM, Daniel Veillard wrote: On Wed, Jun 15, 2011 at 09:23:19PM -0400, Cole Robinson wrote: These functions aren't intended to be called directly by users, so mark

[libvirt] [PATCH 1/2] python: Generate virStreamFree but don't expose in bindings

2011-06-21 Thread Cole Robinson
Turns out I was right in removing this the first time :) This is needed in our custom __del__ function, but the C code wasn't being generated. Add new infrastructure to do what we want --- python/generator.py | 11 ++- 1 files changed, 10 insertions(+), 1 deletions(-) diff --git

[libvirt] [PATCH 2/2] lxc: Fail connection attempt if cgroups not mounted

2011-06-21 Thread Cole Robinson
Currently a user can connect to lxc:/// if cgroups aren't mounted, but they can't do a whole lot: starting and even stopping guests doesn't work (the latter only if cgroups were unmounted behind libvirts back). To make matters worse, even after mounting cgroups, libvirt must be restarted to

Re: [libvirt] [PATCH 1/2] python: Generate virStreamFree but don't expose in bindings

2011-06-23 Thread Cole Robinson
On 06/21/2011 04:39 PM, Eric Blake wrote: On 06/21/2011 10:47 AM, Cole Robinson wrote: Turns out I was right in removing this the first time :) This is needed in our custom __del__ function, but the C code wasn't being generated. Add new infrastructure to do what we want --- python

Re: [libvirt] [PATCH 2/2] lxc: Fail connection attempt if cgroups not mounted

2011-06-23 Thread Cole Robinson
On 06/21/2011 04:49 PM, Eric Blake wrote: On 06/21/2011 10:47 AM, Cole Robinson wrote: Currently a user can connect to lxc:/// if cgroups aren't mounted, but they can't do a whole lot: starting and even stopping guests doesn't work (the latter only if cgroups were unmounted behind libvirts

[libvirt] [PATCH v2] lxc: Fail connection attempt if cgroups not mounted

2011-06-23 Thread Cole Robinson
'privileged' in lxc driver even though it isn't much useful at the moment. If it ever becomes useful we want things to just work. Signed-off-by: Cole Robinson crobi...@redhat.com --- src/lxc/lxc_conf.h |1 + src/lxc/lxc_driver.c | 33 ++--- 2 files changed

[libvirt] remote driver RPC API usage breaks launching ssh askpass

2011-07-19 Thread Cole Robinson
This commit broke launching SSH askpass from virt-manager: http://libvirt.org/git/?p=libvirt.git;a=commit;h=c1b226447781ba8367606f760dde6a88414382a3 Using upstream virt-manager, running python src/virt-manager.py and trying to connect to a remote SSH connection without SSH keys causes a

Re: [libvirt] remote driver RPC API usage breaks launching ssh askpass

2011-07-20 Thread Cole Robinson
On 07/20/2011 07:32 AM, Daniel P. Berrange wrote: On Tue, Jul 19, 2011 at 04:07:17PM -0400, Cole Robinson wrote: This commit broke launching SSH askpass from virt-manager: http://libvirt.org/git/?p=libvirt.git;a=commit;h=c1b226447781ba8367606f760dde6a88414382a3 Using upstream virt-manager

[libvirt] [PATCH] rpc: Pass through DISPLAY so ssh can launch askpass

2011-07-20 Thread Cole Robinson
Though we prefer users to have SSH keys setup, virt-manager users still depend on remote SSH connections to launch a password dialog. This fixes launch ssh-askpass Fix suggested by danpb --- src/rpc/virnetsocket.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git

Re: [libvirt] [PATCH] rpc: Pass through DISPLAY so ssh can launch askpass

2011-07-20 Thread Cole Robinson
On 07/20/2011 02:15 PM, Daniel P. Berrange wrote: On Wed, Jul 20, 2011 at 02:14:43PM -0400, Cole Robinson wrote: Though we prefer users to have SSH keys setup, virt-manager users still depend on remote SSH connections to launch a password dialog. This fixes launch ssh-askpass Fix suggested

[libvirt] SSH URIs invoking askpass + sudo don't play well together

2011-07-22 Thread Cole Robinson
$ cat test.py import os import sys import libvirt def drop_tty(): if os.fork() != 0: os._exit(0) os.setsid() host = sys.argv[1] # Need to drop controlling tty otherwise SSH won't call askpass drop_tty() libvirt.open(qemu+ssh://root@%s/system % host) $ python test.py localhost

[libvirt] [PATCH] docs: Break up 'Basic Resources' XML section

2011-07-23 Thread Cole Robinson
We had a bit too many elements crammed in there. Separate it into different headings: - CPU Allocation (vcpus) - CPU Tuning (cputune) - Memory allocation (memory and currentMemory) - Memory backing (memoryBacking) - Memory tuning (memtune) - Numa tuning (numatune) - Block I/O tuning (blkiotune)

Re: [libvirt] [PATCH] docs: Break up 'Basic Resources' XML section

2011-07-25 Thread Cole Robinson
On 07/25/2011 01:58 AM, Daniel Veillard wrote: On Sat, Jul 23, 2011 at 10:12:22PM -0400, Cole Robinson wrote: We had a bit too many elements crammed in there. Separate it into different headings: - CPU Allocation (vcpus) - CPU Tuning (cputune) - Memory allocation (memory and currentMemory

[libvirt] [PATCH] python: Handle embedded NULL in stream.send data

2011-07-25 Thread Cole Robinson
Otherwise things like volume upload are only useful with text data. --- python/libvirt-override.c |5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/python/libvirt-override.c b/python/libvirt-override.c index 9d1dac2..70e0238 100644 --- a/python/libvirt-override.c +++

Re: [libvirt] [PATCH] python: Handle embedded NULL in stream.send data

2011-07-25 Thread Cole Robinson
On 07/25/2011 04:28 PM, Eric Blake wrote: On 07/25/2011 09:45 AM, Cole Robinson wrote: NULL refers to the pointer (4 or 8 bytes), NUL refers to the character (1 byte). Therefore, in the subject line: s/NULL/NUL/ Otherwise things like volume upload are only useful with text data

[libvirt] [PATCH] python: Properly report errors if virStreamRecv fails

2011-07-26 Thread Cole Robinson
We only want to raise the special value -2. -1 should return None which tells the bindings to throw an exception. --- python/libvirt-override.c |4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/python/libvirt-override.c b/python/libvirt-override.c index 70e0238..bdff0e9

Re: [libvirt] [PATCH] python: Properly report errors if virStreamRecv fails

2011-07-26 Thread Cole Robinson
On 07/26/2011 07:27 PM, Eric Blake wrote: On 07/26/2011 05:26 PM, Cole Robinson wrote: We only want to raise the special value -2. -1 should return None which tells the bindings to throw an exception. --- python/libvirt-override.c |4 +++- 1 files changed, 3 insertions(+), 1 deletions

Re: [libvirt] [virt-tools-list] virt-manager/libvirt backwards compatibility problem?

2011-07-27 Thread Cole Robinson
On 07/27/2011 12:28 PM, Whit Blauvelt wrote: Looks like my real problem may be not incorporating a Debian/Ubuntu patch before building 0.9.x, since netcat differs: https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/517478 Hmm, what was the error message you were getting? We've made

[libvirt] ANNOUNCE: virt-manager 0.9.0 and virtinst 0.600.0 released

2011-07-28 Thread Cole Robinson
I'm happy to announce two new releases: virt-manager 0.9.0: virt-manager is a desktop application for managing KVM and Xen virtual machines via libvirt. virtinst 0.600.0: virtinst is a collection of command line tools for provisioning libvirt virtual machines, including virt-install and

Re: [libvirt] [virt-tools-list] ANNOUNCE: virt-manager 0.9.0 and virtinst 0.600.0 released

2011-08-01 Thread Cole Robinson
On 07/30/2011 01:15 PM, Richard W.M. Jones wrote: On Thu, Jul 28, 2011 at 12:31:10PM -0400, Cole Robinson wrote: - Use libguestfs to show guest packagelist and more (Richard W.M. Jones) I had one complaint that the dependency on python-libguestfs pulls in qemu (from someone using virt

Re: [libvirt] [libvirt-users] virt-manager - how to add /dev/mapper as a storage pool

2011-08-09 Thread Cole Robinson
On 08/09/2011 12:31 PM, Marc Haber wrote: On Tue, Aug 09, 2011 at 11:09:06AM -0400, Cole Robinson wrote: On 08/08/2011 04:37 PM, Marc Haber wrote: I would like to be able to configure VMs running off dm-crypt devices that were unlocked in the host. Unlocked dm-crypt devices show up in /dev

Re: [libvirt] [PATCH] Add qemuhelptest to .gitignore

2009-06-16 Thread Cole Robinson
On 06/16/2009 05:33 AM, Daniel P. Berrange wrote: On Mon, Jun 15, 2009 at 06:11:04PM -0400, Cole Robinson wrote: Signed-off-by: Cole Robinson crobi...@redhat.com --- tests/.gitignore |1 + 1 files changed, 1 insertions(+), 0 deletions(-) ACK, but don't modify .gitignore files yourself

Re: [libvirt] [PATCH] Fix logging in libvirt_lxc controller

2009-06-16 Thread Cole Robinson
On 06/16/2009 01:35 PM, Amy Griffis wrote: The lxc controller can't see libvirtd's log level setting so it needs to re-query it from the environment. The parsing code has a few users now, so I added a new function to the internal API, virLogParseDefaultPriority() along the lines of the other

Re: [libvirt] [PATCH] Allow USB hostdev product to be 0x0000

2009-06-16 Thread Cole Robinson
On 06/16/2009 05:54 AM, Daniel Veillard wrote: On Mon, Jun 15, 2009 at 06:11:09PM -0400, Cole Robinson wrote: Product = 0 is a valid value based on this bug report: https://www.redhat.com/archives/libvir-list/2009-May/msg00368.html Looks fine, ACK. I was wondering about the vendor ID

Re: [libvirt] [PATCH] Fix qemu command flags fetching

2009-06-16 Thread Cole Robinson
On 06/16/2009 05:38 AM, Daniel Veillard wrote: On Mon, Jun 15, 2009 at 06:11:03PM -0400, Cole Robinson wrote: New function qemudParseHelpStr was being called with arguments in the wrong order, so command flags == kvm_version :/ Urgh ! ACK ! Daniel Thanks, I've pushed

Re: [libvirt] [PATCH] Fix logging in libvirt_lxc controller

2009-06-16 Thread Cole Robinson
On 06/16/2009 06:12 PM, Amy Griffis wrote: Cole Robinson wrote: [Tue Jun 16 2009, 02:44:28PM EDT] On 06/16/2009 01:35 PM, Amy Griffis wrote: The lxc controller can't see libvirtd's log level setting so it needs to re-query it from the environment. The parsing code has a few users now, so I

[libvirt] [PATCH] Fix memory reporting for inactive domains in the qemu driver.

2009-06-18 Thread Cole Robinson
Currently, 'info' will always report that mem = max mem. Make sure we actually return the correct mem value. Signed-off-by: Cole Robinson crobi...@redhat.com --- src/qemu_driver.c | 24 +++- 1 files changed, 15 insertions(+), 9 deletions(-) diff --git a/src/qemu_driver.c b

[libvirt] [PATCH] test driver: Fix domain ID after redefining a running VM

2009-06-18 Thread Cole Robinson
The ID of the existing VM was being unconditionally set to -1, which was upsetting virt-manager. Signed-off-by: Cole Robinson crobi...@redhat.com --- src/test.c |8 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/test.c b/src/test.c index 7dc0840..2a672a3 100644

[libvirt] [PATCH] Fix raw storage volume creation for allocation capacity.

2009-06-18 Thread Cole Robinson
hasn't been tested with anything but the broken behavior. Signed-off-by: Cole Robinson crobi...@redhat.com --- src/storage_backend_fs.c |2 +- src/storage_driver.c |5 + 2 files changed, 6 insertions(+), 1 deletions(-) diff --git a/src/storage_backend_fs.c b/src/storage_backend_fs.c

[libvirt] Re: [PATCH] Fix raw storage volume creation for allocation capacity.

2009-06-18 Thread Cole Robinson
Cole Robinson wrote: CreateXMLFrom changes accidentally caused all raw volume creation to be fully allocated (as though allocation == capacity). Fix this. Also force CreateXMLFrom to maintain the previous behavior: sparseness should still be maintained since we search for holes when copying

Re: [libvirt] KVM root mac address

2009-06-19 Thread Cole Robinson
On 06/19/2009 06:52 AM, Daniel P. Berrange wrote: On Thu, Jun 18, 2009 at 11:27:50AM +0200, Paul Reeves wrote: A quick question - What is the correct root for dynamically generated KVM mac addresses? The docs (man virt-install) say 54:52:00 and I've seen Ubuntu docs on-line that say

[libvirt] [PATCH] Fix segfault if storage pool has no type attribute (possibly others)

2009-06-19 Thread Cole Robinson
virEnumFromString doesn't check for a NULL string, and will segfault if passed one. Lots of calling code protects against this, but at least /pool/@type parsing does not. Signed-off-by: Cole Robinson crobi...@redhat.com --- src/util.c |3 +++ 1 files changed, 3 insertions(+), 0 deletions

[libvirt] [PATCH] Activate virtual networks initialized in custom test driver.

2009-06-19 Thread Cole Robinson
If specifying a custom test driver, virtual networks were not 'activated' on driver init. This differs from the behavior of domains and storage pools, so fix it. Also improve a couple error messages in that area. Signed-off-by: Cole Robinson crobi...@redhat.com --- src/test.c |7 +-- 1

[libvirt] [PATCH] Fix storage handling for custom test driver.

2009-06-19 Thread Cole Robinson
If using a custom test driver, storage pool file parsing was broken, and storage volume parsing was never implemented. Fix these issues, and add some examples in docs/ Signed-off-by: Cole Robinson crobi...@redhat.com --- docs/testnode.xml |3 ++ docs/testpool.xml | 15 + docs

Re: [libvirt] [PATCH] Refactor storage XML parsing to be consistent with domain/network conf.

2009-06-19 Thread Cole Robinson
On 06/19/2009 01:09 PM, Daniel P. Berrange wrote: On Fri, Jun 19, 2009 at 12:37:11PM -0400, Cole Robinson wrote: The storage driver arranges its parsing routines in a way that make them difficult to use in the test driver for non-default file parsing. This refactoring moves things

Re: [libvirt] Re: [PATCH] Fix raw storage volume creation for allocation capacity.

2009-06-22 Thread Cole Robinson
Daniel Veillard wrote: On Thu, Jun 18, 2009 at 03:13:06PM -0400, Cole Robinson wrote: Cole Robinson wrote: CreateXMLFrom changes accidentally caused all raw volume creation to be fully allocated (as though allocation == capacity). Fix this. Also force CreateXMLFrom to maintain the previous

Re: [libvirt] [PATCH] Refactor storage XML parsing to be consistent with domain/network conf.

2009-06-22 Thread Cole Robinson
Cole Robinson wrote: On 06/19/2009 01:09 PM, Daniel P. Berrange wrote: On Fri, Jun 19, 2009 at 12:37:11PM -0400, Cole Robinson wrote: The storage driver arranges its parsing routines in a way that make them difficult to use in the test driver for non-default file parsing. This refactoring

[libvirt] [PATCH] Fix reading storage pool defs on driver startup

2009-06-24 Thread Cole Robinson
The recent storage refactoring I committed broke reading pool definitions from disk on driver startup: the result was that none of your pools would be defined. Frankly not sure how I managed to miss the brokenness, sorry about that! Also refactor the startup code to match the existing network and

Re: [libvirt] virStorageVolCreateXMLFrom

2009-06-26 Thread Cole Robinson
Kenneth Nagin wrote: Daniel P. Berrange berra...@redhat.com wrote on 22/06/2009 12:08:39: On Mon, Jun 22, 2009 at 09:59:00AM +0300, Kenneth Nagin wrote: I'd like to get a better understanding of the virStorageVolCreateXMLFrom api Its name and signature imply that it is a cloning operation

<    1   2   3   4   5   6   7   8   9   10   >