Re: [libvirt] [PATCH 06/10] list: Add helper to convert strings separated by ', ' to array

2012-09-06 Thread Eric Blake
On 09/06/2012 08:38 AM, Osier Yang wrote: allow for users to input ',,' for a literal comma that does not separate options? If so, then we should merge in the double comma handling from vshParseSnapshotDiskspec (virsh-snapshot.c) into this function, and have that function also refactored to

Re: [libvirt] broken OpenBSD net/if.h [was: [PATCH] Include some extra headers needed for OpenBSD.]

2012-09-06 Thread Jasper Lievisse Adriaanse
On Tue, Sep 04, 2012 at 11:37:30AM -0600, Eric Blake wrote: On 09/04/2012 11:23 AM, Jasper Lievisse Adriaanse wrote: On Tue, Sep 04, 2012 at 11:08:30AM -0600, Eric Blake wrote: [adding gnulib] Ouch. The POSIX definition of net/if.h doesn't include any interface that needs to use struct

Re: [libvirt] [PATCH 6/7] virsh: Fix a bug of nodedev-list

2012-09-06 Thread Peter Krempa
On 09/05/12 07:34, Osier Yang wrote: output of commands like '%virsh nodedev-list --tree --cap pci' could be empty. Remove the useless checking. --- tools/virsh-nodedev.c |5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-) diff --git a/tools/virsh-nodedev.c b/tools/virsh-nodedev.c

Re: [libvirt] [PATCH 6/7] virsh: Fix a bug of nodedev-list

2012-09-06 Thread Eric Blake
On 09/06/2012 03:43 PM, Peter Krempa wrote: On 09/05/12 07:34, Osier Yang wrote: output of commands like '%virsh nodedev-list --tree --cap pci' could be empty. The moment you introduce filtering, --tree output no longer makes sense (if a child has --cap pci but the parent does not, then you've

Re: [libvirt] [PATCH 7/7] list: Use virConnectListAllNodeDevices in virsh

2012-09-06 Thread Peter Krempa
On 09/05/12 07:34, Osier Yang wrote: tools/virsh-nodedev.c: * vshNodeDeviceSorter to sort node devices by name * vshNodeDeviceListFree to free the node device objects list. * vshNodeDeviceListCollect to collect the node device objects, trying to use new API first, fall back to

Re: [libvirt] [PATCH 7/7] list: Use virConnectListAllNodeDevices in virsh

2012-09-06 Thread Eric Blake
On 09/06/2012 04:05 PM, Peter Krempa wrote: +if (cap_str) { +ncaps = vshStringToArray((char *)cap_str, caps); You shouldn't modify const strings. Indeed; that argues that your earlier patch for vshStringToArray should be modified to take 'const char *' as the string to split,

Re: [libvirt] [PATCH] nwfilter: drop use of awk

2012-09-06 Thread Eric Blake
On 09/04/2012 06:13 AM, Daniel Veillard wrote: On Fri, Aug 31, 2012 at 03:56:58PM -0700, Eric Blake wrote: Commit 2a41bc9 dropped a dependency on gawk, but we can go one step further and avoid awk altogether. * src/nwfilter/nwfilter_ebiptables_driver.c (iptablesLinkIPTablesBaseChain):

Re: [libvirt] [PATCH] Don't assume use of /sys/fs/cgroup

2012-09-06 Thread Eric Blake
On 09/06/2012 08:23 AM, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com The introduction of /sys/fs/cgroup came in fairly recent kernels. Prior to that time distros would pick a custom directory like /cgroup or /dev/cgroup. We need to auto-detect where this is, rather

Re: [libvirt] [PATCH] Fix location of SELinux mount during RPM builds

2012-09-06 Thread Eric Blake
On 09/06/2012 08:24 AM, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com When building RPMs the host kernel cannot be assumed to match the target OS kernel. Thus auto-detecting /selinux vs /sys/fs/selinux based on the host kernel can result in the wrong choice (eg F18

Re: [libvirt] [PATCHv3 3/4] util: Add helper to assign typed params from string

2012-09-06 Thread Eric Blake
On 09/06/2012 08:01 AM, Peter Krempa wrote: This patch adds a helper to deal with assigning values to virTypedParameter structures from strings. The helper parses the value from the string and assigns it to the corresponding union value. --- New in series. +case VIR_TYPED_PARAM_ULLONG:

Re: [libvirt] [PATCHv3 0/4] Add range checking for scheduler tunables

2012-09-06 Thread Eric Blake
On 09/06/2012 08:01 AM, Peter Krempa wrote: This version improves virsh so that it doesn't update all tunables but only those that changed (and now correctly). This series contains a new patch that adds a helper to deal with typed parameters. Regarding typed parameters: Shouldn't we make

Re: [libvirt] [PATCH 1/4] Fix docs for PM event callbacks

2012-09-06 Thread Doug Goldstein
On Thu, Sep 6, 2012 at 10:09 AM, Jiri Denemark jdene...@redhat.com wrote: PM{Suspend,Wakeup} event callbacks were designed with a reason parameter which could be used in the future. However, we do not transfer the reason over RPC and thus we can never use it in the future. Make it explicit in

Re: [libvirt] [PATCH 2/4] Fix PMSuspend and PMWakeup events

2012-09-06 Thread Doug Goldstein
On Thu, Sep 6, 2012 at 10:09 AM, Jiri Denemark jdene...@redhat.com wrote: The unused reason parameter of PM{Suspend,Wakeup} event callbacks was completely ignored in lot of places and those events were not actually working at all. --- daemon/remote.c | 2 ++

Re: [libvirt] [PATCH 4/4] examples: Fix event detail printing in python test

2012-09-06 Thread Doug Goldstein
On Thu, Sep 6, 2012 at 10:09 AM, Jiri Denemark jdene...@redhat.com wrote: If there is only one detail string for a particular event, we need to pu comma after the string otherwise the string itself will be taken as a list and only its first character will be printed out. For example,

Re: [libvirt] [PATCH 3/4] Add PMSUSPENDED life cycle event

2012-09-06 Thread Doug Goldstein
On Thu, Sep 6, 2012 at 10:09 AM, Jiri Denemark jdene...@redhat.com wrote: While PMSUSPENDED state was added a long time ago, we didn't have corresponding life cycle event. --- examples/domain-events/events-c/event-test.c | 10 ++

Re: [libvirt] [PATCH 1/4] Fix docs for PM event callbacks

2012-09-06 Thread Eric Blake
On 09/06/2012 05:29 PM, Doug Goldstein wrote: On Thu, Sep 6, 2012 at 10:09 AM, Jiri Denemark jdene...@redhat.com wrote: PM{Suspend,Wakeup} event callbacks were designed with a reason parameter which could be used in the future. However, we do not transfer the reason over RPC and thus we can

Re: [libvirt] [PATCH 4/4] examples: Fix event detail printing in python test

2012-09-06 Thread Eric Blake
On 09/06/2012 05:31 PM, Doug Goldstein wrote: On Thu, Sep 6, 2012 at 10:09 AM, Jiri Denemark jdene...@redhat.com wrote: If there is only one detail string for a particular event, we need to pu s/pu/put a/ comma after the string otherwise the string itself will be taken as a list and only its

Re: [libvirt] [PATCH] Refactor ESX storage driver and add iSCSI support

2012-09-06 Thread Ata Bohra
Just wondering if someone would be interested in reviewing the below patch. Thanks for the support. Ata From: ata.hus...@hotmail.com To: libvir-list@redhat.com CC: ata.hus...@hotmail.com Subject: [libvirt] [PATCH] Refactor ESX storage driver and add iSCSI support Date: Mon, 20 Aug 2012

Re: [libvirt] [PATCH v0] qemu: Add sandbox support.

2012-09-06 Thread Daniel Veillard
On Mon, Sep 03, 2012 at 02:03:39PM +0200, Ján Tomko wrote: QEMU (since 1.2-rc0) supports setting up a syscall whitelist through libseccomp on linux kernel from 3.5-rc1. This is enabled by specifying -sandbox on on qemu command line. This patch detects this capability by searching for

Re: [libvirt] [PATCH v0] qemu: Add sandbox support.

2012-09-06 Thread Daniel Veillard
On Thu, Sep 06, 2012 at 11:53:06AM -0400, Corey Bryant wrote: On 09/06/2012 02:45 AM, Daniel Veillard wrote: On Thu, Sep 06, 2012 at 02:27:19PM +0800, Daniel Veillard wrote: On Mon, Sep 03, 2012 at 02:03:39PM +0200, Ján Tomko wrote: QEMU (since 1.2-rc0) supports setting up a syscall

Re: [libvirt] RFC: APIs to manage KSM

2012-09-06 Thread Osier Yang
On 2012年08月31日 23:00, Eric Blake wrote: On 08/31/2012 07:57 AM, Daniel P. Berrange wrote: some more generic name. eg virNodeSetMemorySharingParameters likewise for all the enum/constant names. For that matter, why can't we reuse the existing virDomainSetMemoryParameters() for the

Re: [libvirt] [PATCH v2 1/9] fix bug in qemuSetupCgroupForEmulator

2012-09-06 Thread Eric Blake
On 09/06/2012 04:13 AM, Hu Tao wrote: Should not return 0 when failed to setup cgroup. --- src/qemu/qemu_cgroup.c |8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) ACK with one nit. diff --git a/src/qemu/qemu_cgroup.c b/src/qemu/qemu_cgroup.c index 5b42793..c95cc77 100644

Re: [libvirt] [PATCH v2 2/9] New functions for virBitmap

2012-09-06 Thread Eric Blake
On 09/06/2012 04:13 AM, Hu Tao wrote: In many places we store bitmap info in a chunk of data (pointed to by a char *), and have redundant codes to set/unset bits. This patch extends virBitmap, and convert those codes to use virBitmap in subsequent patches. --- struct _virBitmap { -

Re: [libvirt] [PATCH v2 2/9] New functions for virBitmap

2012-09-06 Thread Eric Blake
On 09/06/2012 11:17 PM, Eric Blake wrote: On 09/06/2012 04:13 AM, Hu Tao wrote: In many places we store bitmap info in a chunk of data (pointed to by a char *), and have redundant codes to set/unset bits. This patch extends virBitmap, and convert those codes to use virBitmap in subsequent

<    1   2