Re: [libvirt] [PATCH v2 3/3] qemu: Implement virDomainPMWakeup API

2012-02-27 Thread Michal Privoznik
On 25.02.2012 01:31, Eric Blake wrote: On 02/23/2012 01:44 AM, Michal Privoznik wrote: On 15.02.2012 16:04, Michal Privoznik wrote: using 'system-wakeup' monitor command. It is supported only in JSON, as we are enabling it if possible. Moreover, this command is available in qemu-1.1+ which

Re: [libvirt] [PATCHv2] Error out when using SPICE TLS with spice_tls=0

2012-02-28 Thread Michal Privoznik
On 24.02.2012 11:34, Christophe Fergeau wrote: It's possible to disable SPICE TLS in qemu.conf. When this happens, libvirt ignores any SPICE TLS port or x509 directory that may have been set when it builds the qemu command line to use. However, it's not ignoring the secure channels that may

Re: [libvirt] [PATCH] qemu: Don't emit tls-port spice option if port is -1

2012-02-28 Thread Michal Privoznik
On 28.02.2012 14:16, Jiri Denemark wrote: Bug introduced by commit eda0fc7a. --- src/qemu/qemu_command.c |9 ++--- 1 files changed, 6 insertions(+), 3 deletions(-) ACK Michal -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

[libvirt] [PATCH] docs: Fix libvirt name in qemu commandline namespace URL

2012-02-28 Thread Michal Privoznik
s/libirt/libvirt/g --- Pushed under trivial rule. docs/drvqemu.html.in |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/drvqemu.html.in b/docs/drvqemu.html.in index fc76829..9afae13 100644 --- a/docs/drvqemu.html.in +++ b/docs/drvqemu.html.in @@ -551,7 +551,7 @@ $

[libvirt] [PATCH] storage: fix typo

2012-02-29 Thread Michal Privoznik
* src/storage/storage_driver.c (storageVolumeWipeInternal): s/ pfitzner33/pfitzner33/. --- src/storage/storage_driver.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/storage/storage_driver.c b/src/storage/storage_driver.c index 540e5d7..9130a40 100644 ---

Re: [libvirt] [PATCH] storage: fix typo

2012-02-29 Thread Michal Privoznik
On 29.02.2012 11:53, Daniel P. Berrange wrote: On Wed, Feb 29, 2012 at 11:44:47AM +0100, Michal Privoznik wrote: * src/storage/storage_driver.c (storageVolumeWipeInternal): s/ pfitzner33/pfitzner33/. --- src/storage/storage_driver.c |2 +- 1 files changed, 1 insertions(+), 1

[libvirt] [PATCH 1/2] qemu_conf: Move paths initialization to qemudLoadDriverConfig

2012-03-01 Thread Michal Privoznik
This is needed as next patch allows their modification via qemu.conf. --- src/qemu/qemu_conf.c | 51 - src/qemu/qemu_conf.h |4 +- src/qemu/qemu_driver.c | 101 ++-- 3 files changed, 82 insertions(+), 74 deletions(-)

[libvirt] [PATCH 2/2] qemu_conf: Allow overriding of path for managed-save

2012-03-01 Thread Michal Privoznik
This patch allows users to set different path for managed-save images than under /var/lib/libvirt/qemu/save; Some sysadmins do have small / and thus /var but don't want to compile libvirt on their own just to override this path. --- src/qemu/qemu.conf |7 +++ src/qemu/qemu_conf.c | 15

[libvirt] [PATCH 0/2] Make managed-save path configurable

2012-03-01 Thread Michal Privoznik
this is nice to have feature. We can make more paths configurable if this gains enough fame. Michal Privoznik (2): qemu_conf: Move paths initialization to qemudLoadDriverConfig qemu_conf: Allow overriding of path for managed-save src/qemu/qemu.conf |7 +++ src/qemu/qemu_conf.c | 60

[libvirt] [PATCH] qemu: Don't parse device twice in attach/detach

2012-03-01 Thread Michal Privoznik
Some nits are generated during XML parse (e.g. MAC address of an interface); However, with current implementation, if we are plugging a device both to persistent and live config, we parse given XML twice: first time for live, second for config. This is wrong then as the second time we are not

Re: [libvirt] [PATCH] qemu: Shared or readonly disks are always safe wrt migration

2012-03-05 Thread Michal Privoznik
On 05.03.2012 15:15, Jiri Denemark wrote: No matter what cache mode is used, readonly disks are always safe wrt migration. Shared disks are required to be readonly or to disable host-side cache, which makes them safe as well. --- src/qemu/qemu_migration.c |8 +--- 1 files changed, 5

Re: [libvirt] [PATCH] util: eliminate crash in virNetDevMacVLanCreateWithVPortProfile

2012-03-05 Thread Michal Privoznik
On 05.03.2012 20:42, Laine Stump wrote: From: root r...@vlap.laine.org Commit 723d5c (added after the release of 0.9.10) adds a NetlinkEventClient for each interface sent to virNetDevMacVLanCreateWithVPortProfile. This should only be done if the interface actually *has* a virtPortProfile,

Re: [libvirt] [PATCH 12/17] qemu: refactor hotplug detach of hostdevs

2012-03-05 Thread Michal Privoznik
On 28.02.2012 21:14, Laine Stump wrote: This refactoring is necessary to support hotplug detach of type=hostdev network devices, but needs to be in a separate patch to make potential debugging of regressions more practical. Rather than the lowest level functions searching for a matching

Re: [libvirt] [PATCH 14/17] qemu: support type='hostdev' network devices at domain start

2012-03-05 Thread Michal Privoznik
On 28.02.2012 21:14, Laine Stump wrote: This patch makes sure that each network device (interface) of type='hostdev' appears on both the hostdevs list and the nets list of the virDomainDef, and it modifies the qemu driver startup code so that these devices will be presented to qemu on the

Re: [libvirt] [PATCH 15/17] conf: change virDomainNetRemove from static to global

2012-03-05 Thread Michal Privoznik
On 28.02.2012 21:14, Laine Stump wrote: This exact code is duplicated in qemuDomainDetachNetDevice(). --- New patch in V2. (yeah, I just noticed the movement of the virDomainHostdevXX() declarations in this patch; I guess I was rearranging for consistent ordering. If this concerns anyone,

Re: [libvirt] [PATCH 13/17] conf: parse/format type='hostdev' network interfaces

2012-03-05 Thread Michal Privoznik
On 28.02.2012 21:14, Laine Stump wrote: This is the new interface type that sets up a PCI/USB network device to be assigned to the guest with PCI/USB passthrough after initializing some network device-specific things from the config (e.g. MAC address, virtualport profile parameters). Here is

Re: [libvirt] [PATCH 16/17] qemu: use virDomainNetRemove instead of inline code

2012-03-05 Thread Michal Privoznik
On 28.02.2012 21:14, Laine Stump wrote: The code being replaced is exactly identical to the newly global function, right down to the comment. --- New patch in V2 src/qemu/qemu_hotplug.c | 14 +- 1 files changed, 1 insertions(+), 13 deletions(-) ACK definitely. Michal --

Re: [libvirt] [PATCH 17/17] qemu: support type=hostdev network device hotplug attach/detach

2012-03-05 Thread Michal Privoznik
On 28.02.2012 21:14, Laine Stump wrote: qemuDomainAttachNetDevice - re-ordered some things at start of function because networkAllocateActualDevice should always be run and a slot in def-nets always allocated, but host_net_add isn't needed if the actual type is hostdev. -

[libvirt] [PATCH] qemu: Don't parse device twice in attach/detach

2012-03-07 Thread Michal Privoznik
Some nits are generated during XML parse (e.g. MAC address of an interface); However, with current implementation, if we are plugging a device both to persistent and live config, we parse given XML twice: first time for live, second for config. This is wrong then as the second time we are not

[libvirt] [PATCH] qemu: Fix startupPolicy for snapshot-revert

2012-03-07 Thread Michal Privoznik
Currently, startupPolicy='requisite' was determining cold boot by migrateForm != NULL. That means, if domain was started up with migrateForm set we didn't require disk source path and allowed it to be dropped. However, on snapshot-revert domain wasn't migrated but according to documentation,

Re: [libvirt] [PATCH] qemu: Fix startupPolicy for snapshot-revert

2012-03-08 Thread Michal Privoznik
On 07.03.2012 19:36, Eric Blake wrote: On 03/07/2012 11:19 AM, Michal Privoznik wrote: Currently, startupPolicy='requisite' was determining cold boot by migrateForm != NULL. That means, if domain was started up with migrateForm set we didn't require disk source path and allowed s

Re: [libvirt] [PATCH] qemu: Don't parse device twice in attach/detach

2012-03-08 Thread Michal Privoznik
On 07.03.2012 19:46, Laine Stump wrote: On 03/07/2012 12:48 PM, Michal Privoznik wrote: Some nits are generated during XML parse (e.g. MAC address of an interface); However, with current implementation, if we are plugging a device both to persistent and live config, we parse given XML twice

[libvirt] [PATCH] util: Don't overflow on errno in virFileAccessibleAs

2012-03-08 Thread Michal Privoznik
If we need to virFork() to check assess() under different UID+GID we need to translate returned status via WEXITSTATUS(). Otherwise, we may return values greater than 255 which is obviously wrong. --- src/util/util.c |7 ++- 1 files changed, 6 insertions(+), 1 deletions(-) diff --git

[libvirt] [PATCH] qemuProcessStart: Switch to flags instead of bunch booleans

2012-03-08 Thread Michal Privoznik
Currently, we have 3 boolean arguments we have to pass to qemuProcessStart(). As libvirt grows it is harder and harder to remember them and their position. Therefore we should switch to flags instead. --- src/qemu/qemu_driver.c| 45 +

[libvirt] [PATCH] qemuBuildCommandLine: Don't add tlsPort if none set

2012-03-08 Thread Michal Privoznik
If user hasn't supplied any tlsPort we default to setting it to zero in our internal structure. However, when building command line we test it against -1 which is obviously wrong. --- src/qemu/qemu_command.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git

Re: [libvirt] [PATCH] util: Don't overflow on errno in virFileAccessibleAs

2012-03-08 Thread Michal Privoznik
On 08.03.2012 14:08, Eric Blake wrote: On 03/08/2012 03:37 AM, Michal Privoznik wrote: If we need to virFork() to check assess() under different UID+GID we need to translate returned status via WEXITSTATUS(). Otherwise, we may return values greater than 255 which is obviously wrong

Re: [libvirt] [PATCH] qemuBuildCommandLine: Don't add tlsPort if none set

2012-03-09 Thread Michal Privoznik
On 08.03.2012 23:26, Eric Blake wrote: On 03/08/2012 06:30 AM, Michal Privoznik wrote: If user hasn't supplied any tlsPort we default to setting it to zero in our internal structure. However, when building command line we test it against -1 which is obviously wrong. --- src/qemu

[libvirt] [PATCH] qemuxml2argvtest: Pass some additional flags to graphics-spice-agentmouse

2012-03-09 Thread Michal Privoznik
One of the recent commits introduced support for spice agent-mouse. However, test for this feature require some tweaking: pass QEMU_CAPS_CHARDEV_SPICEVMC | QEMU_CAPS_NODEFCONFIG and add -vga cirrus. --- Since we default to '-vga cirrus' when QEMU_CAPS_VGA set, I've added it to XML as well for

Re: [libvirt] [PATCH] conf: eliminate redundant VIR_ALLOC of 1st element of network DNS hosts.

2012-03-09 Thread Michal Privoznik
On 09.03.2012 10:03, Laine Stump wrote: virNetworkDNSHostsDefParseXML was calling VIR_ALLOC(def-hosts) if def-hosts was NULL. This is a waste of time, though, since VIR_REALLOC_N is called a few lines further down, prior to any use of def-hosts. (initializing def-nhosts to 0 is also redundant,

Re: [libvirt] [PATCH RFC 8/8] add qemu cache mutex

2012-03-12 Thread Michal Privoznik
On 11.03.2012 19:56, Lee Schermerhorn wrote: Add a mutex for access to the qemu emulator cache. Not clear that this is actually needed -- driver should be locked across calls [?]. The patch can be dropped if not needed. --- src/qemu/qemu_capabilities.c | 18 +-

[libvirt] [PATCH] graphics: Cleanup port policy

2012-03-12 Thread Michal Privoznik
Even though we say in documentation setting (tls-)port to -1 is legacy compat style for enabling autoport, we're roughly doing this for VNC. However, in case of SPICE auto enable autoport iff both port tlsPort are equal -1 as documentation says autoport plays with both. ---

[libvirt] [PATCH 3/4] storage: Implement jobs for storage driver

2012-03-13 Thread Michal Privoznik
Simply, when we are about to take an action which might take ages, like allocating new volumes, wiping, etc. increment a counter of jobs in pool object and unlock it. We don't want to hold the pool locked during long term actions. --- src/conf/storage_conf.c | 12 ++

[libvirt] [PATCH 1/4] storage: Introduce virStorageVolAbortJob

2012-03-13 Thread Michal Privoznik
This API can be used to terminate long running jobs on a volume like its building, resizing, wiping. Moreover, like virDomainAbortJob() calling this API will block until job has either completed or aborted. --- include/libvirt/libvirt.h.in |3 ++ src/driver.h |5

[libvirt] [PATCH 0/4] Introduce jobs for storage driver

2012-03-13 Thread Michal Privoznik
wasn't very successful with aborting a stream from the daemon site. Michal Privoznik (4): storage: Introduce virStorageVolAbortJob virsh: Expose virStorageVolAbortJob storage: Implement jobs for storage driver storage: Implement virStorageVolAbortJob include/libvirt/libvirt.h.in

[libvirt] [PATCH 2/4] virsh: Expose virStorageVolAbortJob

2012-03-13 Thread Michal Privoznik
via new virsh command 'vol-jobabort'. Currently, it accepts only volume specification as argument. --- tools/virsh.c | 39 +++ 1 files changed, 39 insertions(+), 0 deletions(-) diff --git a/tools/virsh.c b/tools/virsh.c index 630b77f..00668ff 100644 ---

[libvirt] [PATCH 4/4] storage: Implement virStorageVolAbortJob

2012-03-13 Thread Michal Privoznik
This implies breaking up some jobs into cycles during which we check for job abortion request. The virStorageVolAbortJob API will then just set request and wait until job is released. If a job was, however, interrupted it should fail with VIR_ERR_OPERATION_ABORTED error. ---

Re: [libvirt] [PATCH 1/4] storage: Introduce virStorageVolAbortJob

2012-03-13 Thread Michal Privoznik
On 13.03.2012 15:48, Daniel P. Berrange wrote: On Tue, Mar 13, 2012 at 03:35:29PM +0100, Michal Privoznik wrote: This API can be used to terminate long running jobs on a volume like its building, resizing, wiping. Moreover, like virDomainAbortJob() calling this API will block until job has

[libvirt] [PATCH] qemu: Reverse condition in qemuDomainCheckDiskPresence

2012-03-14 Thread Michal Privoznik
With current code, we pass true iff domain is cold booting. However, if disk is inaccessible and startupPolicy for that disk is set to 'requisite' we have to fail iff cold booting. --- src/qemu/qemu_domain.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git

Re: [libvirt] [PATCH v2] virsh: A bit smarter attach-disk

2012-03-15 Thread Michal Privoznik
On 15.03.2012 11:17, Osier Yang wrote: Detects the file type of source path if no --sourcetype and driver is specified, instead of always set the disk type as block. --- tools/virsh.c |7 ++- 1 files changed, 6 insertions(+), 1 deletions(-) ACK Michal -- libvir-list mailing

Re: [libvirt] [PATCH] virsh: A bit smarter attach-disk

2012-03-15 Thread Michal Privoznik
On 15.03.2012 10:13, Osier Yang wrote: Detects the file type of source path if no --sourcetype and driver is specified, instead of always set the disk type as block. And previous virCommandOptString ensures source is not NULL, remove the conditional checking. --- tools/virsh.c | 14

[libvirt] [PATCH] qemuDomainDetachPciDiskDevice: Free allocated cgroup

2012-03-15 Thread Michal Privoznik
This function potentially allocates new virCgroup but never frees it. --- src/qemu/qemu_hotplug.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c index e088a49..f1c1283 100644 --- a/src/qemu/qemu_hotplug.c +++

Re: [libvirt] [PATCH] qemuDomainDetachPciDiskDevice: Free allocated cgroup

2012-03-15 Thread Michal Privoznik
On 15.03.2012 13:04, Peter Krempa wrote: On 03/15/2012 11:49 AM, Michal Privoznik wrote: This function potentially allocates new virCgroup but never frees it. --- ACK. Peter Thanks, pushed. Michal -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman

Re: [libvirt] [PATCH v2 4/5] qemu: Wire up virDomainSuspendForDuration API

2012-03-16 Thread Michal Privoznik
On 16.03.2012 07:52, Osier Yang wrote: On 03/16/2012 07:11 AM, Eric Blake wrote: On 01/26/2012 12:59 PM, Michal Privoznik wrote: This makes use of QEMU guest agent to implement the virDomainSuspendForDuration API. --- src/qemu/qemu_driver.c | 93

[libvirt] [PATCH v2] qemu_agent: Issue guest-sync prior to every command

2012-03-16 Thread Michal Privoznik
If we issue guest command and GA is not running, the issuing thread will block endlessly. We can check for GA presence by issuing guest-sync with unique ID (timestamp). We don't want to issue real command as even if GA is not running, once it is started, it process all commands written to GA

Re: [libvirt] [PATCH v2] Fixed NULL pointer check

2012-03-19 Thread Michal Privoznik
On 19.03.2012 08:55, Martin Kletzander wrote: This patch fixes a NULL pointer check that was causing SegFault on some specific configurations. --- src/util/conf.c |5 - 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/src/util/conf.c b/src/util/conf.c index

Re: [libvirt] [PATCH] snapshot: make quiesce a bit safer

2012-03-19 Thread Michal Privoznik
On 16.03.2012 21:49, Eric Blake wrote: If a guest is paused, we were silently ignoring the quiesce flag, which results in unclean snapshots, contrary to the intent of the flag. Since we can't quiesce without guest agent support, we should instead fail if the guest is not running.

Re: [libvirt] [PATCH v3] Fixed NULL pointer check

2012-03-19 Thread Michal Privoznik
On 19.03.2012 11:05, Martin Kletzander wrote: This patch fixes a NULL pointer check that was causing SegFault on some specific configurations. It also reverts commit 59d0c9801c1ab that was checking for this value in one place. --- v3: - added revert of 59d0c9801c1ab that's not needed

Re: [libvirt] [PATCHv3] python: Avoid memory leaks on libvirt_virNodeGetMemoryStats

2012-03-19 Thread Michal Privoznik
On 17.02.2012 09:15, a...@redhat.com wrote: From: Alex Jia a...@redhat.com Detected by valgrind. Leaks are introduced in commit 17c7795. * python/libvirt-override.c (libvirt_virNodeGetMemoryStats): fix memory leaks and improve codes return value. For details, please see the following

Re: [libvirt] [PATCH] build: drop a painfully long gnulib test

2012-03-21 Thread Michal Privoznik
On 21.03.2012 00:14, Eric Blake wrote: On machines with massive amounts of CPUs, the gnulib 'test-lock' could take minutes, or even appear to deadlock, because of timing interactions between multiple cores. See https://bugzilla.redhat.com/show_bug.cgi?id=797284. For precedence, note that

[libvirt] [PATCH 3/3] qemu: Build activeUsbHostdevs list on process reconnect

2012-03-26 Thread Michal Privoznik
If the daemon is restarted it will loose list of active USB devices assigned to active domains. Therefore we need to rebuild this list on qemuProcessReconnect(). --- src/qemu/qemu_hostdev.c | 40 src/qemu/qemu_hostdev.h |2 ++ src/qemu/qemu_process.c

[libvirt] [PATCH 0/3] qemu: Improve USB devices list handling

2012-03-26 Thread Michal Privoznik
on qemuProcessReconnect. Michal Privoznik (3): qemu: Don't leak temporary list of USB devices qemu: Delete USB devices used by domain on stop qemu: Build activeUsbHostdevs list on process reconnect src/qemu/qemu_hostdev.c | 112 +-- src/qemu/qemu_hostdev.h |2

[libvirt] [PATCH 1/3] qemu: Don't leak temporary list of USB devices

2012-03-26 Thread Michal Privoznik
and add debug message when adding USB device to the list of active devices. --- src/qemu/qemu_hostdev.c | 11 +++ 1 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/qemu/qemu_hostdev.c b/src/qemu/qemu_hostdev.c index 329e3fc..d4d7461 100644 --- a/src/qemu/qemu_hostdev.c

[libvirt] [PATCH 2/3] qemu: Delete USB devices used by domain on stop

2012-03-26 Thread Michal Privoznik
To prevent assigning one USB device to two domains, we keep a list of assigned USB devices. On domain startup - qemuProcessStart() - we insert devices used by domain into the list but remove them only on detach-device. Devices are, however, released on qemuProcessReconnect() as well. ---

Re: [libvirt] [PATCH] qemu: Avoid entering monitor with locked driver

2012-03-27 Thread Michal Privoznik
On 27.03.2012 14:19, Jiri Denemark wrote: This avoids possible deadlock of the qemu driver in case a domain is begin migrated (in Begin phase) and unrelated connection to qemu driver is closed at the right time. I checked all callers of qemuDomainCheckEjectableMedia() and they are calling

Re: [libvirt] [libvirt PATCHv7 1/1] add DHCP snooping

2012-03-27 Thread Michal Privoznik
Stefan was faster, but some nits I've spotted in addition to his. On 26.03.2012 22:25, David L Stevens wrote: This patch adds DHCP snooping support to libvirt. The learning method for IP addresses is specified by setting the ip_learning variable to one of any [default] (existing IP learning

Re: [libvirt] [libvirt PATCHv7 1/1] add DHCP snooping

2012-03-27 Thread Michal Privoznik
Round two On 26.03.2012 22:25, David L Stevens wrote: This patch adds DHCP snooping support to libvirt. The learning method for IP addresses is specified by setting the ip_learning variable to one of any [default] (existing IP learning code), none (static only addresses) or dhcp (DHCP

Re: [libvirt] [PATCH] libvirt: Fix build err

2012-03-29 Thread Michal Privoznik
On 29.03.2012 14:55, ailvpen...@gmail.com wrote: From: Zhou Peng ailvpen...@gmail.com virNetDevMacVLanRestartWithVPortProfile is omitted in src/libvirt_private.syms, which causes link err. --- src/libvirt_private.syms |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff

Re: [libvirt] [PATCH] build: silence recent syntax check violations

2012-03-30 Thread Michal Privoznik
On 30.03.2012 05:23, Eric Blake wrote: An upstream gnulib bug meant that some of our syntax checks weren't being run. Fix up our offenders before we upgrade to a newer gnulib. * src/util/virnetdevtap.c (virNetDevTapCreate): Use flags. * tests/lxcxml2xmltest.c (mymain): Strip useless ().

Re: [libvirt] [PATCH] conf: Prevent crash of libvirtd without channel target name

2012-03-30 Thread Michal Privoznik
On 30.03.2012 11:44, Alex Jia wrote: * src/conf/domain_conf.c (virDomainChannelDefCheckABIStability): avoid crashing libvirtd due to derefing a NULL pointer. For details, please see bug: RHBZ: https://bugzilla.redhat.com/show_bug.cgi?id=808371 Signed-off-by: Alex Jia a...@redhat.com

[libvirt] [PATCH] virnetdevtap: Don't check for flags in virNetDevTapCreateFlags

2012-03-30 Thread Michal Privoznik
With latest gnulib we are checking even the lowest level functions whether they check flags. Moreover, we are shadowing the real error on system without TUNSETIFF support. --- cfg.mk |2 +- src/util/virnetdevtap.c |5 + 2 files changed, 2 insertions(+), 5 deletions(-)

Re: [libvirt] [PATCH] virnetdevtap: Don't check for flags in virNetDevTapCreateFlags

2012-03-30 Thread Michal Privoznik
On 30.03.2012 15:04, Eric Blake wrote: On 03/30/2012 05:49 AM, Michal Privoznik wrote: With latest gnulib we are checking even the lowest level functions whether they check flags. Moreover, we are shadowing the real error on system without TUNSETIFF support. --- cfg.mk

Re: [libvirt] [PATCH] qemu: set default name for SPICE agent channel when generating command

2012-03-30 Thread Michal Privoznik
On 30.03.2012 09:50, Laine Stump wrote: commit b0e2bb33 set a default value for the SPICE agent channel by inserting it during parsing of the channel XML. That method of setting a default is problematic because it makes a format/parse roundtrip unclean, and experience with setting other values

Re: [libvirt] [PATCH v2] qemu_agent: Issue guest-sync prior to every command

2012-03-30 Thread Michal Privoznik
On 30.03.2012 16:31, Jiri Denemark wrote: On Fri, Mar 16, 2012 at 17:35:09 +0100, Michal Privoznik wrote: If we issue guest command and GA is not running, the issuing thread will block endlessly. We can check for GA presence by issuing guest-sync with unique ID (timestamp). We don't want

Re: [libvirt] Start of freeze for libvirt-0.9.11 and availability of rc1

2012-04-02 Thread Michal Privoznik
On 01.04.2012 03:35, Laine Stump wrote: On 03/31/2012 07:56 AM, Daniel Veillard wrote: I just made the second release candidate ftp://libvirt.org/libvirt/libvirt-0.9.11-rc2.tar.gz along with the rpms and tagged the git tree. It seems to work okay in my limited testing. If all goes well

[libvirt] [PATCH] virsh: Clarify escape sequence

2012-04-03 Thread Michal Privoznik
Currently, we put no strains on escape sequence possibly leaving users with console that cannot be terminated. However, not all ASCII characters can be used as escape sequence. Only those falling in @ - _ can be; implement and document this constraint. --- tools/console.c |3 ++-

Re: [libvirt] [PATCH 0/3] qemu: Improve USB devices list handling

2012-04-03 Thread Michal Privoznik
On 26.03.2012 17:39, Michal Privoznik wrote: This patch set fixes two bugs: https://bugzilla.redhat.com/show_bug.cgi?id=806449 https://bugzilla.redhat.com/show_bug.cgi?id=743671 tl;dr - we are only adding to the list, removing only on detach-device. Need to remove on qemuProcessStop too

Re: [libvirt] I need help for use virDomainInterfaceStats

2012-04-03 Thread Michal Privoznik
On 02.04.2012 20:56, siddharth wrote: Фёдор Пранович pr.fedor at gmail.com writes: Hi I want use the virDomainInterfaceStats for get statistic of domain, but I don't now how get path parametr. Please help me! Thanks. Please Help me Too !! Basically, it's

Re: [libvirt] Need Help To Destroy Virtual Machines

2012-04-03 Thread Michal Privoznik
On 03.04.2012 16:42, Ali Raza Memon wrote: Hello...! I am using libvirt-php for controlling my xen virtual machines. For this I have installed libvirt-php along with xampp server. Now I need to create a web based controll panel application which shows me running vms, and some options like

Re: [libvirt] [PATCH] virsh: Clarify escape sequence

2012-04-03 Thread Michal Privoznik
On 03.04.2012 16:39, Eric Blake wrote: On 04/03/2012 07:10 AM, Michal Privoznik wrote: Currently, we put no strains on escape sequence possibly leaving users with console that cannot be terminated. However, not all ASCII characters can be used as escape sequence. Only those falling

[libvirt] [PATCH] news.html.in: Fix /br void tag

2012-04-03 Thread Michal Privoznik
),br/ + cpustats: API, improvements and qemu support (KAMEZAWA Hiroyuki and Eric Blake),br/ + qemu: support type='hostdev' network devices at domain start (Laine Stump),br/ + Introduce virDomainPMWakeup API (Michal Privoznik),br/ + network: support Open vSwitch (Ansis Atteka),br

Re: [libvirt] [PATCH] news.html.in: Fix /br void tag

2012-04-04 Thread Michal Privoznik
On 03.04.2012 17:38, Daniel P. Berrange wrote: On Tue, Apr 03, 2012 at 09:33:43AM -0600, Eric Blake wrote: On 04/03/2012 09:25 AM, Michal Privoznik wrote: Void elements should be written with slash *after* the tag name, not before, so they are not confused with ending tags. --- Pushing

Re: [libvirt] [PATCH 0/3] qemu: Improve USB devices list handling

2012-04-04 Thread Michal Privoznik
On 03.04.2012 15:12, Michal Privoznik wrote: On 26.03.2012 17:39, Michal Privoznik wrote: This patch set fixes two bugs: https://bugzilla.redhat.com/show_bug.cgi?id=806449 https://bugzilla.redhat.com/show_bug.cgi?id=743671 tl;dr - we are only adding to the list, removing only on detach

[libvirt] [PATCH] qemu_ga: Don't overwrite errors on FSThaw

2012-04-06 Thread Michal Privoznik
We can tell qemuDomainSnapshotFSThaw if we want it to report errors or not. However, if we don't want to and an error has been already set by previous qemuReportError() we must keep copy of that error not just a pointer to it. Otherwise, it get overwritten if FSThaw reports an error. ---

Re: [libvirt] [PATCH] qemu_ga: Don't overwrite errors on FSThaw

2012-04-06 Thread Michal Privoznik
On 06.04.2012 13:38, Jiri Denemark wrote: On Fri, Apr 06, 2012 at 12:58:02 +0200, Michal Privoznik wrote: We can tell qemuDomainSnapshotFSThaw if we want it to report errors or not. However, if we don't want to and an error has been already set by previous qemuReportError() we must keep copy

[libvirt] [PATCH] qemuOpenFile: Don't force chown on NFS

2012-04-11 Thread Michal Privoznik
If dynamic_ownership is off and we are creating a file on NFS we force chown. This will fail as chown/chmod are not supported on NFS. However, with no dynamic_ownership we are not required to do any chown. --- src/qemu/qemu_driver.c | 10 -- 1 files changed, 8 insertions(+), 2

[libvirt] [PATCH] qemu_agent: Report error class at least

2012-04-12 Thread Michal Privoznik
Currently, qemu GA is not providing 'desc' field for errors like we are used to from qemu monitor. Therefore, we fall back to this general 'unknown error' string. However, GA is reporting 'class' which is not perfect, but much more helpful than generic error string. Thus we should fall back to

Re: [libvirt] virsh list hangs

2012-04-12 Thread Michal Privoznik
On 12.04.2012 10:40, Qian Zhang wrote: Hi, I am using RHEL 6.2 64bit, and the libvirt shipped in it is libvirt-0.9.4-23.el6.x86_64. I found sometimes the command virsh list hangs forever, and same issue for virt-manager which is always in Connecting status. But after restarting the libvirtd

Re: [libvirt] [PATCH] qemuOpenFile: Don't force chown on NFS

2012-04-12 Thread Michal Privoznik
On 12.04.2012 13:16, Laine Stump wrote: On 04/11/2012 04:21 PM, Laine Stump wrote: ACK to the idea, but NACK to the exact placement of the fix. On further examination (and actually doing a couple tests), I withdraw my NACK on the placement. I had mixed up usage of qemuOpenFile and

Re: [libvirt] [PATCH] qemu_agent: Report error class at least

2012-04-12 Thread Michal Privoznik
On 12.04.2012 14:14, Daniel P. Berrange wrote: On Thu, Apr 12, 2012 at 02:06:21PM +0200, Michal Privoznik wrote: Currently, qemu GA is not providing 'desc' field for errors like we are used to from qemu monitor. Therefore, we fall back to this general 'unknown error' string. However, GA

[libvirt] [PATCH v2] qemu_agent: Report error class at least

2012-04-12 Thread Michal Privoznik
Currently, qemu GA is not providing 'desc' field for errors like we are used to from qemu monitor. Therefore, we fall back to this general 'unknown error' string. However, GA is reporting 'class' which is not perfect, but much more helpful than generic error string. Thus we should fall back to

Re: [libvirt] [PATCH] blockjob: add virsh blockjob --wait

2012-04-13 Thread Michal Privoznik
On 12.04.2012 21:59, Eric Blake wrote: I'm tired of shell-scripting to wait for completion of a block pull, when virsh can be taught to do the same. I couldn't quite reuse vshWatchJob, as this is not a case of a long-running command where a second thread must be used to probe job status (at

[libvirt] [PATCH 0/3] Couple of cleanups in qemu code

2012-04-13 Thread Michal Privoznik
Michal Privoznik (3): qemu: Fix mem leak in qemuProcessInitCpuAffinity gitignore: Reorder alphabetically qemu: Split if condition in qemuDomainSnapshotUndoSingleDiskActive .gitignore |6 +++--- src/qemu/qemu_driver.c |9 +++-- src/qemu/qemu_process.c | 23

[libvirt] [PATCH 2/3] gitignore: Reorder alphabetically

2012-04-13 Thread Michal Privoznik
Recent git reorders .gitignore alphabetically. However, changes are not committed and I am tired of discarding these changes from my patches. --- .gitignore |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 5aa9c9b..14a21d0 100644 ---

[libvirt] [PATCH 1/3] qemu: Fix mem leak in qemuProcessInitCpuAffinity

2012-04-13 Thread Michal Privoznik
If placement mode is AUTO, on some return paths char *cpumap or char *nodeset are leaked. --- src/qemu/qemu_process.c | 23 +-- 1 files changed, 13 insertions(+), 10 deletions(-) diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index 19569cf..692fc32 100644

[libvirt] [PATCH 3/3] qemu: Split if condition in qemuDomainSnapshotUndoSingleDiskActive

2012-04-13 Thread Michal Privoznik
Since compilers are trying to optimize code they are allowed to reorder evaluation of conditions in if statement (okay, not in all cases, but they can in this one). Therefore if we do: if (stat(file, st) == 0 unlink(file) 0) after compiler chews this it may get feeling that swapping order is

[libvirt] [PATCH 4/3] conf: Avoid double assignment in virDomainDiskRemove

2012-04-13 Thread Michal Privoznik
Although it should be harmless to do: disk = disk = def-disks[i] some not-so-wise compilers may fool around. Besides, such assignment is useless here. --- src/conf/domain_conf.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/conf/domain_conf.c

Re: [libvirt] [PATCH 1/3] qemu: Fix mem leak in qemuProcessInitCpuAffinity

2012-04-13 Thread Michal Privoznik
On 13.04.2012 12:24, Osier Yang wrote: On 04/13/2012 05:12 PM, Michal Privoznik wrote: If placement mode is AUTO, on some return paths char *cpumap or char *nodeset are leaked. --- src/qemu/qemu_process.c | 23 +-- 1 files changed, 13 insertions(+), 10 deletions

Re: [libvirt] [PATCH 4/3] conf: Avoid double assignment in virDomainDiskRemove

2012-04-13 Thread Michal Privoznik
On 13.04.2012 12:25, Osier Yang wrote: On 04/13/2012 05:24 PM, Michal Privoznik wrote: Although it should be harmless to do: disk = disk = def-disks[i] some not-so-wise compilers may fool around. Besides, such assignment is useless here. --- src/conf/domain_conf.c |2 +- 1

Re: [libvirt] [PATCH 2/3] gitignore: Reorder alphabetically

2012-04-13 Thread Michal Privoznik
On 13.04.2012 14:28, Osier Yang wrote: On 04/13/2012 05:12 PM, Michal Privoznik wrote: Recent git reorders .gitignore alphabetically. However, changes are not committed and I am tired of discarding these changes from my patches. --- .gitignore |6 +++--- 1 files changed, 3 insertions

Re: [libvirt] [PATCH] docs: fix path to openvz network configuration file

2012-04-16 Thread Michal Privoznik
On 16.04.2012 16:21, Guido Günther wrote: It's vznet.conf not vznetctl.conf, see e.g.: http://git.openvz.org/?p=vzctl;a=blob;f=bin/vznetcfg.in;h=e91f5c4a0744c1ea149e1b8c241b666052e10b12;hb=HEAD --- docs/drvopenvz.html.in |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Qualifies

[libvirt] [PATCH RESEND] qemuProcessStart: Switch to flags instead of bunch booleans

2012-04-16 Thread Michal Privoznik
Currently, we have 3 boolean arguments we have to pass to qemuProcessStart(). As libvirt grows it is harder and harder to remember them and their position. Therefore we should switch to flags instead. --- This is just rebased version of:

[libvirt] [PATCH v2] qemuProcessStart: Switch to flags instead of bunch booleans

2012-04-16 Thread Michal Privoznik
Currently, we have 3 boolean arguments we have to pass to qemuProcessStart(). As libvirt grows it is harder and harder to remember them and their position. Therefore we should switch to flags instead. --- diff to v1: -fix a test for START_PAUSED flag src/qemu/qemu_driver.c| 45

Re: [libvirt] [PATCH v2] qemuProcessStart: Switch to flags instead of bunch booleans

2012-04-16 Thread Michal Privoznik
On 16.04.2012 17:26, Daniel P. Berrange wrote: On Mon, Apr 16, 2012 at 05:09:59PM +0200, Michal Privoznik wrote: Currently, we have 3 boolean arguments we have to pass to qemuProcessStart(). As libvirt grows it is harder and harder to remember them and their position. Therefore we should

Re: [libvirt] [RFC][PATCH] Revision for message payload encoding error when adding a large mount of virtio disks

2012-04-19 Thread Michal Privoznik
On 19.04.2012 08:25, Chen Hanxiao wrote: From: Chen Hanxiao chenhanx...@cn.fujitsu.com When adding a large number of virtio storage devices to virtual machine by using 'virsh edit' command, there is a problem: When we added more than 190 virtio disks by 'virsh edit' command, we got a

Re: [libvirt] [RFC][PATCH] Revision for message payload encoding error when adding a large mount of virtio disks

2012-04-19 Thread Michal Privoznik
On 19.04.2012 14:45, Richard W.M. Jones wrote: On Thu, Apr 19, 2012 at 02:25:16PM +0800, Chen Hanxiao wrote: * This is an arbitrary limit designed to stop the decoder from trying * to allocate unbounded amounts of memory when fed with a bad message. */ -const REMOTE_STRING_MAX = 65536;

[libvirt] [libvirt-glib][PATCH] test-domain-create: Don't shadow global variable

2012-04-24 Thread Michal Privoznik
In function create_usb_controller variable 'index' shadows a global declaration. --- libvirt-gconfig/tests/test-domain-create.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libvirt-gconfig/tests/test-domain-create.c b/libvirt-gconfig/tests/test-domain-create.c

Re: [libvirt] [libvirt-glib][PATCH] test-domain-create: Don't shadow global variable

2012-04-24 Thread Michal Privoznik
On 24.04.2012 14:48, Daniel P. Berrange wrote: On Tue, Apr 24, 2012 at 02:03:15PM +0200, Michal Privoznik wrote: In function create_usb_controller variable 'index' shadows a global declaration. --- libvirt-gconfig/tests/test-domain-create.c |4 ++-- 1 files changed, 2 insertions(+), 2

[libvirt] [PATCH] docs: Update libvirt-daemon-arch figure

2012-04-24 Thread Michal Privoznik
Currently, we are showing libvirt client contains qemu and lxc drivers. This is not correct as qemu and lxc drivers are always accessed via remote driver. Therefore we need to substitute those two so we don't confuse users. I've chosen vbox and vmware. --- docs/libvirt-daemon-arch.fig | 62

[libvirt] [PATCH] virNetDevMacVLanVPortProfileRegisterCallback: Fix segfault

2012-04-24 Thread Michal Privoznik
Currently, we are calling memcpy(virtPortProfile, ...) unconditionally. Which means if virtPortProfile is NULL we SIGSEGV. Therefore, add check to call memcpy() conditionally. (gdb) bt #0 virNetDevMacVLanVPortProfileRegisterCallback (ifname=0x73f1ee60 macvtap0, macaddress=0x7fffe8096e34 RT,

Re: [libvirt] [PATCH] virNetDevMacVLanVPortProfileRegisterCallback: Fix segfault

2012-04-24 Thread Michal Privoznik
On 24.04.2012 17:52, Michal Privoznik wrote: Currently, we are calling memcpy(virtPortProfile, ...) unconditionally. Which means if virtPortProfile is NULL we SIGSEGV. Therefore, add check to call memcpy() conditionally. (gdb) bt #0 virNetDevMacVLanVPortProfileRegisterCallback (ifname

  1   2   3   4   5   6   7   8   9   10   >