Re: [libvirt] [PATCH 1/1] Fix locking for udev device add/remove

2010-02-02 Thread Daniel Veillard
On Tue, Feb 02, 2010 at 02:54:12PM -0500, David Allan wrote: > * The original udev node device backend neglected to lock the driverState > struct containing the device list when adding and removing devices. > --- > src/node_device/node_device_udev.c |6 ++ > 1 files changed, 6 insertions(

[libvirt] [PATCH] interface_conf.c: don't use a negative value as allocation size

2010-02-02 Thread Jim Meyering
Here's one way to solve this. Another would be to change the way virXPathNodeSet works, but there are several other uses of it. >From 75108240911a1ad943e0bde8ba9ade92ea216f60 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Tue, 2 Feb 2010 20:54:01 +0100 Subject: [PATCH] interface_conf.c: don't

Re: [libvirt] JAVA .start() method

2010-02-02 Thread Marc Gonzalez Mateo
I've got confused with the naming yes, as I supposed create was doing the same as it does in virsh api, my mistake. Maybe it would be a good idea to rename that method and others to the virsh naming. thanks a lot guys, 2010/2/2, Bryan Kearney : > On 02/02/2010 05:44 AM, Matthias Bolte wrote: >>

[libvirt] PATCH [0/1] Fix locking in udev node device backend

2010-02-02 Thread David Allan
The initial udev node device backend implementation fails to take the lock on the node device driverState struct when adding and removing devices. The following patch adds the appropriate locking. Dave -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/lib

[libvirt] [PATCH 1/1] Fix locking for udev device add/remove

2010-02-02 Thread David Allan
* The original udev node device backend neglected to lock the driverState struct containing the device list when adding and removing devices. --- src/node_device/node_device_udev.c |6 ++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/src/node_device/node_device_udev.c b/

Re: [libvirt] [PATCH] util: Remove logging handlers in virExec

2010-02-02 Thread Daniel P. Berrange
On Tue, Feb 02, 2010 at 12:15:01PM -0500, Cole Robinson wrote: > On 02/02/2010 11:54 AM, Daniel P. Berrange wrote: > > On Tue, Jan 12, 2010 at 03:26:26PM -0500, Cole Robinson wrote: > >> This allows debug statements and raised errors in hook functions to > >> actually be logged somewhere (stderr).

[libvirt] [PATCH 4/6] Allow a timezone to be specified with localtime clocks

2010-02-02 Thread Daniel P. Berrange
This extends the XML to allow for This is useful if the admin has not configured any timezone on the host OS, but still wants to synchronize a guest to a specific one. * src/conf/domain_conf.h, src/conf/domain_conf.c: Support extra 'timezone' attribute on clock configuration * docs/schemas/

[libvirt] [PATCH 6/6] Expand docs about clock modes

2010-02-02 Thread Daniel P. Berrange
* formatdomain.html.in: Document new clock options --- docs/formatdomain.html.in | 34 +++--- 1 files changed, 31 insertions(+), 3 deletions(-) diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in index ce49f7d..e47a6b7 100644 --- a/docs/formatdomain.ht

[libvirt] [PATCH 3/6] Support variable clock offset mode in QEMU

2010-02-02 Thread Daniel P. Berrange
This allows QEMU guests to be started with an arbitrary clock offset The test case can't actually be enabled, since QEMU argv expects an absolute timestring, and this will obviously change every time the test runs :-( Hopefully QEMU will allow a relative time offset in the future. * src/qemu/qemu

[libvirt] [PATCH 5/6] Allow configurable timezones with QEMU

2010-02-02 Thread Daniel P. Berrange
Allow an arbitrary timezone with QEMU by setting the $TZ environment variable when launching QEMU * src/qemu/qemu_conf.c: Set TZ environment variable if a timezone is requested * tests/qemuxml2argvtest.c: Add test case for timezones * tests/qemuxml2argvdata/qemuxml2argv-clock-france.xml, tests

[libvirt] [PATCH 2/6] Add new clock mode allowing variable adjustments

2010-02-02 Thread Daniel P. Berrange
This introduces a third option for clock offset synchronization, that allows an arbitrary / variable adjustment to be set. In essence the XML contains the time delta in seconds, relative to UTC. The difference from 'utc' mode, is that management apps should track adjustments and preserve them

[libvirt] [PATCH 1/6] Change the internal domain conf representation of localtime/utc

2010-02-02 Thread Daniel P. Berrange
The XML will soon be extended to allow more than just a simple localtime/utc boolean flag. This change replaces the plain 'int localtime' with a separate struct to prepare for future extension * src/conf/domain_conf.c, src/conf/domain_conf.h: Add a new virDomainClockDef structure * src/libvirt_p

[libvirt] [PATCH 0/6] Add more options for clock sync

2010-02-02 Thread Daniel P. Berrange
This series adds two new options for clock synchronization The two current options are: This introduces a way to set a timezone for localtime And a way to set a completely arbitrary time, by giving the number of seconds offset from UTC. It is open to debate whether we need to dis

[libvirt] [PATCH] virStoragePoolSourceListNewSource: avoid unconditional leak

2010-02-02 Thread Jim Meyering
The buffer allocated by VIR_ALLOC here is never used, and the sole pointer to it is overwritten by this stmt: source = &list->sources[list->nsources++]; >From 52cf50def236ab61298ebbba39fcaf89d440f4ec Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Tue, 2 Feb 2010 19:59:14 +0100 Subject:

Re: [libvirt] [PATCH] xen_hypervisor.c: avoid NULL deref for NULL domain argument

2010-02-02 Thread Jim Meyering
Daniel P. Berrange wrote: >> >> Subject: [PATCH] xen_hypervisor.c: avoid NULL deref for NULL domain >> >> argument >> >> >> >> * src/xen/xen_hypervisor.c (xenHypervisorGetVcpus): Don't attempt >> >> to diagnose an unlikely NULL-domain or NULL-domain->conn error. ... >> >> @@ -3475,11 +3475,8 @@ xe

Re: [libvirt] [PATCH] xen_hypervisor.c: avoid NULL deref for NULL domain argument

2010-02-02 Thread Daniel P. Berrange
On Wed, Jan 27, 2010 at 01:39:13PM +0100, Jim Meyering wrote: > Daniel P. Berrange wrote: > > On Tue, Jan 26, 2010 at 08:24:25PM +0100, Jim Meyering wrote: > >> When "domain" is NULL, don't deref NULL. Instead, just return -1, > >> as in many other functions in this file, and as this function did

Re: [libvirt] libvirt: python bindings

2010-02-02 Thread Cole Robinson
On 02/02/2010 09:58 AM, Pierre Riteau wrote: > On 29 janv. 2010, at 10:05, Pierre Riteau wrote: > >> On 28 janv. 2010, at 19:11, Daniel P. Berrange wrote: >> >>> On Thu, Jan 28, 2010 at 05:52:45PM +, Sharadha Prabhakar (3P) wrote: Hi, I'm writing XenServer APIs for libvirt and trying

[libvirt] [PATCH] * src/nodeinfo.c: Read nodeinfo->mhz from cpufreq device file, if detected.

2010-02-02 Thread Thomas Treutner
--- src/nodeinfo.c | 36 1 files changed, 36 insertions(+), 0 deletions(-) diff --git a/src/nodeinfo.c b/src/nodeinfo.c index 7d26b2b..15877ed 100644 --- a/src/nodeinfo.c +++ b/src/nodeinfo.c @@ -55,11 +55,14 @@ #ifdef __linux__ #define CPUINFO_PATH "/pr

[libvirt] Fix wrong nodeinfo->mhz when cpufreq is enabled

2010-02-02 Thread Thomas Treutner
Hi, I've written a little patch to fix wrong nodeinfo->mhz when the Linux kernel module cpufreq and a typical governor like ondemand are loaded. nodeinfo->mhz is then too low as libvirt just reads /proc/cpuinfo, entry "cpu MHz". This patch reads /sys/devices/system/cpu/cpu0/cpufreq/scalin

Re: [libvirt] [PATCH] util: Remove logging handlers in virExec

2010-02-02 Thread Cole Robinson
On 02/02/2010 11:54 AM, Daniel P. Berrange wrote: > On Tue, Jan 12, 2010 at 03:26:26PM -0500, Cole Robinson wrote: >> This allows debug statements and raised errors in hook functions to >> actually be logged somewhere (stderr). Users can enable debugging in the >> daemon and now see more info in /v

Re: [libvirt] [PATCH] util: Remove logging handlers in virExec

2010-02-02 Thread Daniel P. Berrange
On Tue, Jan 12, 2010 at 03:26:26PM -0500, Cole Robinson wrote: > This allows debug statements and raised errors in hook functions to > actually be logged somewhere (stderr). Users can enable debugging in the > daemon and now see more info in /var/log/libvirt/... > > Signed-off-by: Cole Robinson >

Re: [libvirt] [PATCH] Ensure QEMU DAC security driver is activated at all times

2010-02-02 Thread Daniel Veillard
On Tue, Feb 02, 2010 at 04:20:39PM +, Daniel P. Berrange wrote: > If the primary security driver (SELinux/AppArmour) was disabled > then the secondary QEMU DAC security driver was also disabled. > This is mistaken, because the latter must be active at all times > > * src/qemu/qemu_driver.c: En

[libvirt] [PATCH] Ensure QEMU DAC security driver is activated at all times

2010-02-02 Thread Daniel P. Berrange
If the primary security driver (SELinux/AppArmour) was disabled then the secondary QEMU DAC security driver was also disabled. This is mistaken, because the latter must be active at all times * src/qemu/qemu_driver.c: Ensure DAC driver is always active --- src/qemu/qemu_driver.c | 22 ++

Re: [libvirt] JAVA .start() method

2010-02-02 Thread Bryan Kearney
On 02/02/2010 05:44 AM, Matthias Bolte wrote: 2010/2/2 Marc Gonzalez Mateo: Good morning, Testing the new java version (0.4.1) I've noticed that there's no .start() method to start a defined or shuted down domain. Are you working on it or is it a minor feature not to be considered? Thanks in

Re: [libvirt] [PATCH 06/13] Rewrite way QEMU PCI addresses are allocated

2010-02-02 Thread Daniel P. Berrange
On Tue, Feb 02, 2010 at 10:15:24AM +0100, Matthias Bolte wrote: > 2010/2/1 Daniel P. Berrange : > > The current QEMU code allocates PCI addresses incrementally starting > > at 4. This is not satisfactory because the user may have given some > > addresses in their XML config, which need to be skippe

Re: [libvirt] [PATCH 03/13] Introduce internal QEMU monitor APIs for drive + device hotadd

2010-02-02 Thread Daniel P. Berrange
On Tue, Feb 02, 2010 at 10:12:08AM +0100, Matthias Bolte wrote: > 2010/2/1 Daniel P. Berrange : > > The way QEMU is started has been changed to use '-device' and > > the new style '-drive' syntax. This needs to be mirrored in > > the hotplug code, requiring addition of two new APIs. > > > > * src/q

Re: [libvirt] [PATCH 09/13] Remove direct storage of hostnet_name & vlan

2010-02-02 Thread Daniel Veillard
On Tue, Feb 02, 2010 at 03:01:46PM +, Daniel P. Berrange wrote: > On Tue, Feb 02, 2010 at 03:58:19PM +0100, Daniel Veillard wrote: > > On Mon, Feb 01, 2010 at 06:39:38PM +, Daniel P. Berrange wrote: > > > The current way of assigning names to the host network backend and > > > NIC device in

Re: [libvirt] [PATCH 12/13] Fix QEMU hotplug device alias assignment

2010-02-02 Thread Daniel Veillard
On Mon, Feb 01, 2010 at 06:39:41PM +, Daniel P. Berrange wrote: > To allow devices to be hot(un-)plugged it is neccessary to ensure > they all have a unique device aliases. This fixes the hotplug > methods to assign device aliases before invoking the monitor > commands which need them > > * sr

Re: [libvirt] [PATCH 13/13] Tweak USB hostdevice XML handling

2010-02-02 Thread Daniel Veillard
On Mon, Feb 01, 2010 at 06:39:42PM +, Daniel P. Berrange wrote: > When attaching a USB host device based on vendor/product, libvirt > will resolve the vendor/product into a device/bus pair. This means > that when printing XML we should allow device/bus info to be printed > at any time if presen

Re: [libvirt] [PATCH 11/13] Disable QEMU monitor IO debugging by default

2010-02-02 Thread Daniel Veillard
On Mon, Feb 01, 2010 at 06:39:40PM +, Daniel P. Berrange wrote: > --- > src/qemu/qemu_monitor_text.c | 16 +++- > 1 files changed, 15 insertions(+), 1 deletions(-) > > diff --git a/src/qemu/qemu_monitor_text.c b/src/qemu/qemu_monitor_text.c > index b2a0c53..d6cbea8 100644 > ---

Re: [libvirt] [PATCH 10/13] Re-arrange QEMU device alias assignment code

2010-02-02 Thread Daniel Veillard
On Mon, Feb 01, 2010 at 06:39:39PM +, Daniel P. Berrange wrote: > This patch re-arranges the QEMU device alias assignment code to > make it easier to call into the same codeblock when performing > device hotplug. The new code has the ability to skip over already > assigned names to facilitate h

Re: [libvirt] libvirt: python bindings

2010-02-02 Thread Pierre Riteau
On 29 janv. 2010, at 10:05, Pierre Riteau wrote: > On 28 janv. 2010, at 19:11, Daniel P. Berrange wrote: > >> On Thu, Jan 28, 2010 at 05:52:45PM +, Sharadha Prabhakar (3P) wrote: >>> Hi, >>> I'm writing XenServer APIs for libvirt and trying to test it on >>> virt-Manager. >>> I need to build

Re: [libvirt] [PATCH 09/13] Remove direct storage of hostnet_name & vlan

2010-02-02 Thread Daniel Veillard
On Mon, Feb 01, 2010 at 06:39:38PM +, Daniel P. Berrange wrote: > The current way of assigning names to the host network backend and > NIC device in QEMU was over complicated, by varying naming scheme > based on the NIC model and backend type. This simplifies the naming > to simply be 'net0' an

Re: [libvirt] [PATCH 08/13] Remove use of -netdev arg with QEMU

2010-02-02 Thread Daniel Veillard
On Mon, Feb 01, 2010 at 06:39:37PM +, Daniel P. Berrange wrote: > The QEMU 0.12.x tree has the -netdev command line argument, but not > corresponding monitor command. We can't enable the former, without > the latter since it will break hotplug/unplug. Argh, nasty > * src/qemu/qemu_conf.c, s

Re: [libvirt] [PATCH 07/13] Assign PCI addresses before hotplugging devices

2010-02-02 Thread Daniel Veillard
On Mon, Feb 01, 2010 at 06:39:36PM +, Daniel P. Berrange wrote: > PCI disk, disk controllers, net devices and host devices need to > have PCI addresses assigned before they are hot-plugged > > * src/qemu/qemu_conf.c: Add APIs for ensuring a device has an > address and releasing unused addres

Re: [libvirt] [PATCH] udev: Don't let strtoul parse USB busnum and devnum as octal

2010-02-02 Thread Dave Allan
On 02/02/2010 03:52 AM, Matthias Bolte wrote: 2010/2/2 Dave Allan: On 02/01/2010 06:10 PM, Matthias Bolte wrote: udevGetUintProperty was called with base set to 0 for busnum and devnum. With base 0 strtoul parses the number as octal if it start with a 0. But busnum and devnum are decimal and u

Re: [libvirt] [PATCH 06/13] Rewrite way QEMU PCI addresses are allocated

2010-02-02 Thread Daniel Veillard
On Mon, Feb 01, 2010 at 06:39:35PM +, Daniel P. Berrange wrote: > The current QEMU code allocates PCI addresses incrementally starting > at 4. This is not satisfactory because the user may have given some > addresses in their XML config, which need to be skipped over when > allocating addresses

Re: [libvirt] [PATCH 05/13] Introduce generic virDomainDeviceInfo iterator function

2010-02-02 Thread Daniel Veillard
On Mon, Feb 01, 2010 at 06:39:34PM +, Daniel P. Berrange wrote: > The virDomainDeviceInfoIterate() function will provide a > convenient way to iterate over all devices in a domain. > > * src/conf/domain_conf.c, src/conf/domain_conf.h, > src/libvirt_private.syms: Add virDomainDeviceInfoIterat

Re: [libvirt] [PATCH 03/13] Introduce internal QEMU monitor APIs for drive + device hotadd

2010-02-02 Thread Daniel P. Berrange
On Tue, Feb 02, 2010 at 03:15:18PM +0100, Daniel Veillard wrote: > On Mon, Feb 01, 2010 at 06:39:32PM +, Daniel P. Berrange wrote: > > The way QEMU is started has been changed to use '-device' and > > the new style '-drive' syntax. This needs to be mirrored in > > the hotplug code, requiring ad

Re: [libvirt] [PATCH 04/13] Make hotplug use new device_add where possible

2010-02-02 Thread Daniel P. Berrange
On Tue, Feb 02, 2010 at 03:20:43PM +0100, Daniel Veillard wrote: > On Mon, Feb 01, 2010 at 06:39:33PM +, Daniel P. Berrange wrote: > > Since QEMU startup uses the new -device argument, the hotplug > > code needs todo the same. This converts disk, network and > > host device hotplug to use the d

Re: [libvirt] [PATCH 04/13] Make hotplug use new device_add where possible

2010-02-02 Thread Daniel Veillard
On Mon, Feb 01, 2010 at 06:39:33PM +, Daniel P. Berrange wrote: > Since QEMU startup uses the new -device argument, the hotplug > code needs todo the same. This converts disk, network and > host device hotplug to use the device_add command > > * src/qemu/qemu_driver.c: Use new device_add monit

Re: [libvirt] [PATCH 03/13] Introduce internal QEMU monitor APIs for drive + device hotadd

2010-02-02 Thread Daniel Veillard
On Mon, Feb 01, 2010 at 06:39:32PM +, Daniel P. Berrange wrote: > The way QEMU is started has been changed to use '-device' and > the new style '-drive' syntax. This needs to be mirrored in > the hotplug code, requiring addition of two new APIs. > > * src/qemu/qemu_monitor.h, src/qemu/qemu_mon

Re: [libvirt] [PATCH 02/13] Split out QEMU code for building PCI/USB hostdev arg values

2010-02-02 Thread Daniel Veillard
On Mon, Feb 01, 2010 at 06:39:31PM +, Daniel P. Berrange wrote: > To allow for better code reuse from hotplug methods, the code for > generating PCI/USB hostdev arg values is split out into separate > methods > > * qemu/qemu_conf.h, qemu/qemu_conf.c: Introduce new APis for > qemuBuildPCIHost

Re: [libvirt] [PATCH 01/13] Standard internal API syntax for building QEMU command line arguments

2010-02-02 Thread Daniel Veillard
On Mon, Feb 01, 2010 at 06:39:30PM +, Daniel P. Berrange wrote: > All the helper functions for building command line arguments > now return a 'char *', instead of acepting a 'char **' or > virBufferPtr argument > > * qemu/qemu_conf.c: Standardize syntax for building args > * qemu/qemu_conf.h:

Re: [libvirt] [PATCH] libvirtd.c: avoid closing a negative socket file descriptor

2010-02-02 Thread Daniel Veillard
On Tue, Feb 02, 2010 at 11:28:07AM +0100, Jim Meyering wrote: > A lot like the last one... > > >From e32826290b960790b0ec4f50b195f424fa42348f Mon Sep 17 00:00:00 2001 > From: Jim Meyering > Date: Tue, 2 Feb 2010 11:27:25 +0100 > Subject: [PATCH] libvirtd.c: avoid closing a negative socket file de

[libvirt] [PATCH] xs_internal.c: don't use a negative value as allocation size

2010-02-02 Thread Jim Meyering
As the log message says... >From 6d7abfb983328fbe34bd4404d8fafda100e8098f Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Tue, 2 Feb 2010 12:22:17 +0100 Subject: [PATCH] xs_internal.c: don't use a negative value as allocation size * src/xen/xs_internal.c (xenStoreDomainIntroduced): Don't use -

Re: [libvirt] [PATCH] lxc_controller.c: don't ignore failed "accept"

2010-02-02 Thread Jim Meyering
Daniel P. Berrange wrote: > On Tue, Feb 02, 2010 at 11:58:44AM +0100, Jim Meyering wrote: >> coverity complained (rightly) about the risk of closing a negative >> file descriptor. However, the real problem was the missing test >> for a failed "accept" call. I'm not 100% sure that a failed >> acc

Re: [libvirt] [PATCH] lxc_controller.c: don't ignore failed "accept"

2010-02-02 Thread Daniel P. Berrange
On Tue, Feb 02, 2010 at 11:58:44AM +0100, Jim Meyering wrote: > coverity complained (rightly) about the risk of closing a negative > file descriptor. However, the real problem was the missing test > for a failed "accept" call. I'm not 100% sure that a failed > accept call deserves to provoke a "g

Re: [libvirt] [PATCH] storage_backend.c: avoid closing a negative file descriptor

2010-02-02 Thread Jim Meyering
Daniel P. Berrange wrote: > On Tue, Feb 02, 2010 at 11:14:39AM +0100, Jim Meyering wrote: >> This close(fd) is reachable with an "fd" of -1 via >> the "goto cleanup" just before &fd is first set. >> While closing(-1) is not a big problem, it is a failing >> syscall, and would show up on an strace

Re: [libvirt] [PATCH] storage_backend.c: avoid closing a negative file descriptor

2010-02-02 Thread Daniel Veillard
On Tue, Feb 02, 2010 at 11:14:39AM +0100, Jim Meyering wrote: > This close(fd) is reachable with an "fd" of -1 via > the "goto cleanup" just before &fd is first set. > While closing(-1) is not a big problem, it is a failing > syscall, and would show up on an strace audit, not to mention > the cover

[libvirt] [PATCH] lxc_controller.c: don't ignore failed "accept"

2010-02-02 Thread Jim Meyering
coverity complained (rightly) about the risk of closing a negative file descriptor. However, the real problem was the missing test for a failed "accept" call. I'm not 100% sure that a failed accept call deserves to provoke a "goto cleanup", but doing that is consistent with what the nearby code d

Re: [libvirt] [PATCH] libvirtd.c: avoid closing a negative socket file descriptor

2010-02-02 Thread Daniel P. Berrange
On Tue, Feb 02, 2010 at 11:28:07AM +0100, Jim Meyering wrote: > A lot like the last one... > > >From e32826290b960790b0ec4f50b195f424fa42348f Mon Sep 17 00:00:00 2001 > From: Jim Meyering > Date: Tue, 2 Feb 2010 11:27:25 +0100 > Subject: [PATCH] libvirtd.c: avoid closing a negative socket file de

Re: [libvirt] [PATCH] storage_backend.c: avoid closing a negative file descriptor

2010-02-02 Thread Daniel P. Berrange
On Tue, Feb 02, 2010 at 11:14:39AM +0100, Jim Meyering wrote: > This close(fd) is reachable with an "fd" of -1 via > the "goto cleanup" just before &fd is first set. > While closing(-1) is not a big problem, it is a failing > syscall, and would show up on an strace audit, not to mention > the cover

Re: [libvirt] JAVA .start() method

2010-02-02 Thread Matthias Bolte
2010/2/2 Marc Gonzalez Mateo : > Good morning, > > Testing the new java version (0.4.1) I've noticed that there's no .start() > method to start a defined or shuted down domain. > > Are you working on it or is it a minor feature not to be considered? > > Thanks in advance, > Why do you think there

[libvirt] [PATCH] libvirtd.c: avoid closing a negative socket file descriptor

2010-02-02 Thread Jim Meyering
A lot like the last one... >From e32826290b960790b0ec4f50b195f424fa42348f Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Tue, 2 Feb 2010 11:27:25 +0100 Subject: [PATCH] libvirtd.c: avoid closing a negative socket file descriptor * daemon/libvirtd.c (qemudListenUnix): Close socket only if non-

[libvirt] [PATCH] storage_backend.c: avoid closing a negative file descriptor

2010-02-02 Thread Jim Meyering
This close(fd) is reachable with an "fd" of -1 via the "goto cleanup" just before &fd is first set. While closing(-1) is not a big problem, it is a failing syscall, and would show up on an strace audit, not to mention the coverity and maybe-clang warnings. >From c69369c445be53f12ec09a176fd477b9ff1

[libvirt] JAVA .start() method

2010-02-02 Thread Marc Gonzalez Mateo
Good morning, Testing the new java version (0.4.1) I've noticed that there's no .start() method to start a defined or shuted down domain. Are you working on it or is it a minor feature not to be considered? Thanks in advance, Marc Gonzalez Mateo ma...@ac.upc.edu Dept. Arquitectura de Compu

Re: [libvirt] [PATCH] avoid a probable EINVAL from lseek

2010-02-02 Thread Daniel P. Berrange
On Tue, Feb 02, 2010 at 11:01:55AM +0100, Jim Meyering wrote: > Daniel P. Berrange wrote: > > On Tue, Feb 02, 2010 at 10:37:32AM +0100, Jim Meyering wrote: > >> Daniel P. Berrange wrote: > >> > >> > On Mon, Feb 01, 2010 at 10:18:27PM +0100, Jim Meyering wrote: > >> >> > >> >> In src/qemu/qemu_drive

Re: [libvirt] [PATCH] avoid a probable EINVAL from lseek

2010-02-02 Thread Jim Meyering
Daniel P. Berrange wrote: > On Tue, Feb 02, 2010 at 10:37:32AM +0100, Jim Meyering wrote: >> Daniel P. Berrange wrote: >> >> > On Mon, Feb 01, 2010 at 10:18:27PM +0100, Jim Meyering wrote: >> >> >> >> In src/qemu/qemu_driver.c, coverity reports this: >> >> >> >> Event negative_return_fn: Called n

Re: [libvirt] [PATCH] avoid a probable EINVAL from lseek

2010-02-02 Thread Daniel P. Berrange
On Tue, Feb 02, 2010 at 10:37:32AM +0100, Jim Meyering wrote: > Daniel P. Berrange wrote: > > > On Mon, Feb 01, 2010 at 10:18:27PM +0100, Jim Meyering wrote: > >> > >> In src/qemu/qemu_driver.c, coverity reports this: > >> > >> Event negative_return_fn: Called negative-returning function > >> "

Re: [libvirt] [PATCH] avoid a probable EINVAL from lseek

2010-02-02 Thread Jim Meyering
Daniel P. Berrange wrote: > On Mon, Feb 01, 2010 at 10:18:27PM +0100, Jim Meyering wrote: >> >> In src/qemu/qemu_driver.c, coverity reports this: >> >> Event negative_return_fn: Called negative-returning function >> "lseek(logfile, 0L, 2)" >> Event var_assign: NEGATIVE return value of "lseek"

Re: [libvirt] [PATCH] avoid a probable EINVAL from lseek

2010-02-02 Thread Jim Meyering
Daniel Veillard wrote: > On Mon, Feb 01, 2010 at 10:18:27PM +0100, Jim Meyering wrote: >> >> In src/qemu/qemu_driver.c, coverity reports this: >> >> Event negative_return_fn: Called negative-returning function >> "lseek(logfile, 0L, 2)" >> Event var_assign: NEGATIVE return value of "lseek" as

Re: [libvirt] [PATCH] avoid a probable EINVAL from lseek

2010-02-02 Thread Daniel P. Berrange
On Mon, Feb 01, 2010 at 10:18:27PM +0100, Jim Meyering wrote: > > In src/qemu/qemu_driver.c, coverity reports this: > > Event negative_return_fn: Called negative-returning function > "lseek(logfile, 0L, 2)" > Event var_assign: NEGATIVE return value of "lseek" assigned to signed > variable "

Re: [libvirt] [PATCH 13/13] Tweak USB hostdevice XML handling

2010-02-02 Thread Matthias Bolte
2010/2/1 Daniel P. Berrange : > When attaching a USB host device based on vendor/product, libvirt > will resolve the vendor/product into a device/bus pair. This means > that when printing XML we should allow device/bus info to be printed > at any time if present > > * src/conf/domain_conf.c, docs/s

Re: [libvirt] [PATCH 10/13] Re-arrange QEMU device alias assignment code

2010-02-02 Thread Matthias Bolte
2010/2/1 Daniel P. Berrange : > This patch re-arranges the QEMU device alias assignment code to > make it easier to call into the same codeblock when performing > device hotplug. The new code has the ability to skip over already > assigned names to facilitate hotplug > > * src/qemu/qemu_driver.c: C

Re: [libvirt] [PATCH 09/13] Remove direct storage of hostnet_name & vlan

2010-02-02 Thread Matthias Bolte
2010/2/1 Daniel P. Berrange : > The current way of assigning names to the host network backend and > NIC device in QEMU was over complicated, by varying naming scheme > based on the NIC model and backend type. This simplifies the naming > to simply be 'net0' and 'hostnet0', allowing code to easily

Re: [libvirt] [PATCH 11/13] Disable QEMU monitor IO debugging by default

2010-02-02 Thread Matthias Bolte
2010/2/1 Daniel P. Berrange : > --- >  src/qemu/qemu_monitor_text.c |   16 +++- >  1 files changed, 15 insertions(+), 1 deletions(-) > ACK Matthias -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH 12/13] Fix QEMU hotplug device alias assignment

2010-02-02 Thread Matthias Bolte
2010/2/1 Daniel P. Berrange : > To allow devices to be hot(un-)plugged it is neccessary to ensure > they all have a unique device aliases. This fixes the hotplug > methods to assign device aliases before invoking the monitor > commands which need them > > * src/qemu/qemu_conf.c, src/qemu/qemu_conf.

Re: [libvirt] [PATCH 07/13] Assign PCI addresses before hotplugging devices

2010-02-02 Thread Matthias Bolte
2010/2/1 Daniel P. Berrange : > PCI disk, disk controllers, net devices and host devices need to > have PCI addresses assigned before they are hot-plugged > > * src/qemu/qemu_conf.c: Add APIs for ensuring a device has an >  address and releasing unused addresses > * src/qemu/qemu_driver.c: Ensure a

Re: [libvirt] [PATCH 08/13] Remove use of -netdev arg with QEMU

2010-02-02 Thread Matthias Bolte
2010/2/1 Daniel P. Berrange : > The QEMU 0.12.x tree has the -netdev command line argument, but not > corresponding monitor command. We can't enable the former, without > the latter since it will break hotplug/unplug. > > * src/qemu/qemu_conf.c, src/qemu/qemu_conf.h: Disable -netdev usage >  until

Re: [libvirt] [PATCH 06/13] Rewrite way QEMU PCI addresses are allocated

2010-02-02 Thread Matthias Bolte
2010/2/1 Daniel P. Berrange : > The current QEMU code allocates PCI addresses incrementally starting > at 4. This is not satisfactory because the user may have given some > addresses in their XML config, which need to be skipped over when > allocating addresses to remaining devices. > > It is thus

Re: [libvirt] [PATCH 02/13] Split out QEMU code for building PCI/USB hostdev arg values

2010-02-02 Thread Matthias Bolte
2010/2/1 Daniel P. Berrange : > To allow for better code reuse from hotplug methods, the code for > generating PCI/USB hostdev arg values is split out into separate > methods > > * qemu/qemu_conf.h, qemu/qemu_conf.c: Introduce new APis for >  qemuBuildPCIHostdevPCIDevStr, qemuBuildUSBHostdevUsbDevS

Re: [libvirt] [PATCH 01/13] Standard internal API syntax for building QEMU command line arguments

2010-02-02 Thread Matthias Bolte
2010/2/1 Daniel P. Berrange : > All the helper functions for building command line arguments > now return a 'char *', instead of acepting a 'char **' or > virBufferPtr argument > > * qemu/qemu_conf.c: Standardize syntax for building args > * qemu/qemu_conf.h: Export all functions for building args

Re: [libvirt] [PATCH 04/13] Make hotplug use new device_add where possible

2010-02-02 Thread Matthias Bolte
2010/2/1 Daniel P. Berrange : > Since QEMU startup uses the new -device argument, the hotplug > code needs todo the same. This converts disk, network and > host device hotplug to use the device_add command > > * src/qemu/qemu_driver.c: Use new device_add monitor APIs >  whereever possible > --- AC

Re: [libvirt] [PATCH 05/13] Introduce generic virDomainDeviceInfo iterator function

2010-02-02 Thread Matthias Bolte
2010/2/1 Daniel P. Berrange : > The virDomainDeviceInfoIterate() function will provide a > convenient way to iterate over all devices in a domain. > > * src/conf/domain_conf.c, src/conf/domain_conf.h, >  src/libvirt_private.syms: Add virDomainDeviceInfoIterate() >  function. > --- ACK Matthias -

Re: [libvirt] [PATCH 03/13] Introduce internal QEMU monitor APIs for drive + device hotadd

2010-02-02 Thread Matthias Bolte
2010/2/1 Daniel P. Berrange : > The way QEMU is started has been changed to use '-device' and > the new style '-drive' syntax. This needs to be mirrored in > the hotplug code, requiring addition of two new APIs. > > * src/qemu/qemu_monitor.h, src/qemu/qemu_monitor.c: Define APIs >  qemuMonitorAddDe

Re: [libvirt] [PATCH] avoid a probable EINVAL from lseek

2010-02-02 Thread Daniel Veillard
On Mon, Feb 01, 2010 at 10:18:27PM +0100, Jim Meyering wrote: > > In src/qemu/qemu_driver.c, coverity reports this: > > Event negative_return_fn: Called negative-returning function > "lseek(logfile, 0L, 2)" > Event var_assign: NEGATIVE return value of "lseek" assigned to signed > variable "

Re: [libvirt] [PATCH] udev: Don't let strtoul parse USB busnum and devnum as octal

2010-02-02 Thread Matthias Bolte
2010/2/2 Dave Allan : > On 02/01/2010 06:10 PM, Matthias Bolte wrote: >> >> udevGetUintProperty was called with base set to 0 for busnum and devnum. >> With base 0 strtoul parses the number as octal if it start with a 0. But >> busnum and devnum are decimal and udev returns them padded with leading