[libvirt] [PATCH 6/7] LXC: Change the owner of host devices to the root of container

2013-07-15 Thread Gao feng
These host devices are created for container, the owner should be the root user of container. Signed-off-by: Gao feng gaof...@cn.fujitsu.com --- src/lxc/lxc_controller.c | 9 + 1 file changed, 9 insertions(+) diff --git a/src/lxc/lxc_controller.c b/src/lxc/lxc_controller.c index

[libvirt] [PATCH 4/7] LXC: Change the owner of live attached disk device

2013-07-15 Thread Gao feng
The owner of this disk device should be the root user of container. Signed-off-by: Gao feng gaof...@cn.fujitsu.com --- src/lxc/lxc_driver.c | 4 1 file changed, 4 insertions(+) diff --git a/src/lxc/lxc_driver.c b/src/lxc/lxc_driver.c index 1279edf..bd92135 100644 --- a/src/lxc/lxc_driver.c

[libvirt] [PATCH 3/7] LXC: Move virLXCControllerChown to lxc_container.c

2013-07-15 Thread Gao feng
lxc driver will use this function to change the owner of hot added devices. Move virLXCControllerChown to lxc_container.c and Rename it to lxcContainerChown. Signed-off-by: Gao feng gaof...@cn.fujitsu.com --- src/lxc/lxc_container.c | 21 + src/lxc/lxc_container.h | 2 ++

[libvirt] [PATCH 1/7] LXC: Setup disks for container on host side

2013-07-15 Thread Gao feng
Since mknod in container is forbidden, we should setup disks on host side. Signed-off-by: Gao feng gaof...@cn.fujitsu.com --- src/lxc/lxc_container.c | 98 src/lxc/lxc_controller.c | 94 ++ 2 files

[libvirt] [PATCH 5/7] LXC: Create host devices for container on host side

2013-07-15 Thread Gao feng
Otherwise the container will fail to start if we enable user namespace, since there is no rights to do mknod in uninit user namespace. Signed-off-by: Gao feng gaof...@cn.fujitsu.com --- src/lxc/lxc_container.c | 263 --- src/lxc/lxc_controller.c | 313

[libvirt] [PATCH 2/7] LXC: controller: change the owner of disk to the root of container

2013-07-15 Thread Gao feng
These disk devices are created for container, the owner should be the root user of container. Signed-off-by: Gao feng gaof...@cn.fujitsu.com --- src/lxc/lxc_controller.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/lxc/lxc_controller.c b/src/lxc/lxc_controller.c index

[libvirt] [PATCH 7/7] LXC: Change the owner of live attached host devices

2013-07-15 Thread Gao feng
The owner of this host devices should be the root user of container. Signed-off-by: Gao feng gaof...@cn.fujitsu.com --- src/lxc/lxc_driver.c | 9 + 1 file changed, 9 insertions(+) diff --git a/src/lxc/lxc_driver.c b/src/lxc/lxc_driver.c index bd92135..098051b 100644 ---

Re: [libvirt] deadlock in function storageVolLookupByKey and storageVolLookupByPath

2013-07-15 Thread Ján Tomko
Hello, On 07/13/2013 03:59 AM, Caizhifeng wrote: root@cvknode-141:~/libvirt1.1.0# diff storage_driver.c storage_driver-new.c 1364c1364,1365 if (virStorageVolLookupByKeyEnsureACL(conn, driver-pools.objs[i]-def, vol) 0) --- if

Re: [libvirt] [PATCH] lxc: hoist supplemental group detection before clone

2013-07-15 Thread Gao feng
On 07/13/2013 01:35 AM, Eric Blake wrote: Commit 75c1256 states that virGetGroupList must not be called between fork and exec, then commit ee777e99 promptly violated that for lxc. Hoist the group detection to occur before clone. * src/lxc/lxc_container.c (__lxc_child_argv): Add members.

[libvirt] [PATCH] Add virtio-scsi to fallback models of scsi controller

2013-07-15 Thread Martin Kletzander
When user does not specify any model for scsi controller, or worse, no controller at all, but libvirt automatically adds scsi controller with no model, we are not searching for virtio-scsi and thus this can fail for example on qemu which doesn't support lsi logic adapter. This means that when

Re: [libvirt] [PATCH] conf: reject pci-root controllers with non-zero indexes

2013-07-15 Thread Ján Tomko
On 07/12/2013 05:52 PM, Eric Blake wrote: On 07/12/2013 07:08 AM, Ján Tomko wrote: https://bugzilla.redhat.com/show_bug.cgi?id=981261 --- src/conf/domain_conf.c | 7 +++ 1 file changed, 7 insertions(+) ACK Thanks, pushed now. Jan -- libvir-list mailing list libvir-list@redhat.com

Re: [libvirt] [PATCH 0/3] qemu: Fix how files are being opened

2013-07-15 Thread Martin Kletzander
On 06/24/2013 12:19 PM, Martin Kletzander wrote: On 05/24/2013 10:25 PM, Martin Kletzander wrote: There were some places in the code, where files were being opened with uid:gid of the daemon instead of the qemu process related to the file. First patch exposes the parseIds() function in order

[libvirt] [PATCH v3] Make logical pools independent on target path

2013-07-15 Thread Martin Kletzander
When using logical pools, we had to trust the target-path provided. This parameter, however, can be completely ommited and we can get the correct path using 'lvdisplay' command. In order not to omit the target.path completely, we rather default it to '/dev/source.name' which is used to check the

Re: [libvirt] [PATCHv2 2/2] pci: make virPCIDeviceReset more autonomous

2013-07-15 Thread Martin Kletzander
On 07/01/2013 07:46 PM, Laine Stump wrote: I recently patches the callers to virPCIDeviceReset() to not call it if the current driver for a device was vfio-pci (since that driver will always reset the device itself when appropriate. At the time, Dan Berrange suggested that I could instead

Re: [libvirt] [PATCHv2 1/2] pci: reorder static functions

2013-07-15 Thread Martin Kletzander
On 07/01/2013 07:46 PM, Laine Stump wrote: virPCIDeviceGetDriverPathAndName is a static function that will need to be called by another function that occurs above it in the file. This patch reorders the static functions so that a forward declaration isn't needed. --- src/util/virpci.c | 177

Re: [libvirt] [PATCH v3 00/10] Re-enable memballoon driver statistics reporting

2013-07-15 Thread Jiri Denemark
On Thu, Jul 11, 2013 at 19:55:50 -0400, John Ferlan wrote: This patch set replaces: https://www.redhat.com/archives/libvir-list/2013-July/msg00435.html Changes 07 - 09- Remove the flags, Flags, FLAGS (learned something new!) Just remember to do the same in the subject of those patches

Re: [libvirt] [PATCH 1/6] Introduce new domain create APIs to pass pre-opened FDs to LXC

2013-07-15 Thread Daniel P. Berrange
On Sat, Jul 13, 2013 at 01:35:53PM +0800, Daniel Veillard wrote: On Fri, Jul 12, 2013 at 04:38:27PM +0100, Daniel P. Berrange wrote: From: Daniel P. Berrange berra...@redhat.com With container based virt, it is useful to be able to pass pre-opened file descriptors to the container init

Re: [libvirt] [PATCH] lxc: hoist supplemental group detection before clone

2013-07-15 Thread Daniel P. Berrange
On Mon, Jul 15, 2013 at 03:40:53PM +0800, Gao feng wrote: On 07/13/2013 01:35 AM, Eric Blake wrote: Commit 75c1256 states that virGetGroupList must not be called between fork and exec, then commit ee777e99 promptly violated that for lxc. Hoist the group detection to occur before clone.

Re: [libvirt] [PATCH V2] Expose all CPU features in host definition

2013-07-15 Thread Daniel P. Berrange
On Sun, Jul 14, 2013 at 11:43:57PM -0600, Don Dugger wrote: On Mon, Jul 01, 2013 at 09:43:58AM -0600, Don Dugger wrote: 1. Ultimately, I want to remove the periodic capability update completely. The better technique is to update compute node state when the state

Re: [libvirt] [PATCH] python: return dictionay without value in case of no blockjob

2013-07-15 Thread Guannan Ren
On 07/13/2013 01:36 AM, Michal Privoznik wrote: On 17.05.2013 08:30, Guannan Ren wrote: s/dictionay/dictionary/ in $SUBJ Currently, when there is no blockjob, dom.blockJobInfo('vda') still reports error because it didn't distinguish return value 0 from -1. s/didn't/doesn't/

Re: [libvirt] [PATCH v3 00/10] Re-enable memballoon driver statistics reporting

2013-07-15 Thread John Ferlan
On 07/15/2013 05:57 AM, Jiri Denemark wrote: On Thu, Jul 11, 2013 at 19:55:50 -0400, John Ferlan wrote: This patch set replaces: https://www.redhat.com/archives/libvir-list/2013-July/msg00435.html Changes 07 - 09- Remove the flags, Flags, FLAGS (learned something new!) Just remember to

Re: [libvirt] [PATCH v2 0/7] Support CHAP authentication for iscsi pool

2013-07-15 Thread Osier Yang
On 10/07/13 03:10, John Ferlan wrote: https://bugzilla.redhat.com/show_bug.cgi?id=957294 Since Osier is out temporarily, I was asked to pick up this work since I initially reviewed the changes. thanks for picking these work first. -- libvir-list mailing list libvir-list@redhat.com

Re: [libvirt] [PATCH v2 1/7] storage: Refactor the rng schema for storage pool auth

2013-07-15 Thread Osier Yang
On 10/07/13 03:10, John Ferlan wrote: From: Osier Yang jy...@redhat.com The attributes/elements for auth type chap and ceph are completely different, but the schema didn't reflect that. This patch separates each of the definitions into groups. Changed chap type login and passwd attributes to

Re: [libvirt] [PATCH v5 1/5] qemuBuildChrDeviceCommandLine: Don't leak devstr

2013-07-15 Thread Daniel P. Berrange
On Fri, Jul 12, 2013 at 07:23:58PM +0200, Michal Privoznik wrote: It's caller's responsibility to free return value of qemuBuildChrDeviceStr(). --- src/qemu/qemu_command.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index

Re: [libvirt] [PATCH] security_dac: compute supplemental groups before fork

2013-07-15 Thread Daniel P. Berrange
On Fri, Jul 12, 2013 at 03:13:48PM -0600, Eric Blake wrote: @@ -146,8 +149,12 @@ virSecurityManagerPtr virSecurityManagerNewDAC(const char *virtDriver, if (!mgr) return NULL; -virSecurityDACSetUser(mgr, user); -virSecurityDACSetGroup(mgr, group); +if ((ngroups =

Re: [libvirt] [PATCH v2 2/7] storage: Support username for chap type auth

2013-07-15 Thread Osier Yang
On 10/07/13 22:49, Daniel P. Berrange wrote: On Tue, Jul 09, 2013 at 03:10:46PM -0400, John Ferlan wrote: To be consistent with ceph types for storage auth elements, allow username to be used as an auth attribute name for chap types. Continue to allow login for backwards compatibility when

Re: [libvirt] [PATCH v2 2/7] storage: Support username for chap type auth

2013-07-15 Thread Osier Yang
On 11/07/13 00:04, Daniel P. Berrange wrote: On Wed, Jul 10, 2013 at 11:51:42AM -0400, John Ferlan wrote: On 07/10/2013 10:49 AM, Daniel P. Berrange wrote: On Tue, Jul 09, 2013 at 03:10:46PM -0400, John Ferlan wrote: To be consistent with ceph types for storage auth elements, allow username

Re: [libvirt] [PATCH] Add virtio-scsi to fallback models of scsi controller

2013-07-15 Thread Daniel P. Berrange
On Mon, Jul 15, 2013 at 09:50:45AM +0200, Martin Kletzander wrote: When user does not specify any model for scsi controller, or worse, no controller at all, but libvirt automatically adds scsi controller with no model, we are not searching for virtio-scsi and thus this can fail for example on

Re: [libvirt] [PATCH v3] Make logical pools independent on target path

2013-07-15 Thread Daniel P. Berrange
On Mon, Jul 15, 2013 at 10:30:16AM +0200, Martin Kletzander wrote: When using logical pools, we had to trust the target-path provided. This parameter, however, can be completely ommited and we can get the correct path using 'lvdisplay' command. In order not to omit the target.path completely,

Re: [libvirt] [PATCH v3] Make logical pools independent on target path

2013-07-15 Thread Martin Kletzander
On 07/15/2013 02:27 PM, Daniel P. Berrange wrote: On Mon, Jul 15, 2013 at 10:30:16AM +0200, Martin Kletzander wrote: When using logical pools, we had to trust the target-path provided. This parameter, however, can be completely ommited and we can get the correct path using 'lvdisplay' command.

Re: [libvirt] [PATCH] Add virtio-scsi to fallback models of scsi controller

2013-07-15 Thread Martin Kletzander
On 07/15/2013 02:24 PM, Daniel P. Berrange wrote: On Mon, Jul 15, 2013 at 09:50:45AM +0200, Martin Kletzander wrote: When user does not specify any model for scsi controller, or worse, no controller at all, but libvirt automatically adds scsi controller with no model, we are not searching for

[libvirt] [PATCH v3 1/7] storage_conf: Adjust virStoragePoolAuthType enum

2013-07-15 Thread John Ferlan
Generate and use the virStoragePoolAuthTypeType{To|From}String helpers --- src/conf/storage_conf.c | 19 +++ src/conf/storage_conf.h | 3 +++ 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/src/conf/storage_conf.c b/src/conf/storage_conf.c index 524a4d6..9bcfced

[libvirt] [PATCH v3 3/7] storage_conf: Move auth processing into virStoragePoolDefParseAuth

2013-07-15 Thread John Ferlan
Split processing of auth into its own function --- src/conf/storage_conf.c | 65 +++-- 1 file changed, 41 insertions(+), 24 deletions(-) diff --git a/src/conf/storage_conf.c b/src/conf/storage_conf.c index 9bcfced..1097de8 100644 ---

[libvirt] [PATCH v3 0/7] Support CHAP authentication for iscsi pool

2013-07-15 Thread John Ferlan
Based on review comments of v2 posting (see 2/7 for specifics): https://www.redhat.com/archives/libvir-list/2013-July/msg00554.html I rewrote the storage_conf.c chap parsing code. I think the first 6 patches could be squashed into 1 for a final submit, but figured I'd post in steps to make the

[libvirt] [PATCH v3 2/7] storage_conf: Introduce virStoragePoolAuthSecretPtr

2013-07-15 Thread John Ferlan
Split out the _virStoragePoolAuthSecret data from _virStoragePoolAuthCephx into its own structure --- src/conf/storage_conf.h | 14 +- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/conf/storage_conf.h b/src/conf/storage_conf.h index 98339ef..5fbecf4 100644 ---

[libvirt] [PATCH v3 7/7] storage: Support chap authentication for iscsi pool

2013-07-15 Thread John Ferlan
From: Osier Yang jy...@redhat.com Although the XML for chap authentication with plain password was introduced long ago, the function was never implemented. This patch completes it by performing the authentication during findPoolSources() processing of pools with an authType of

[libvirt] [PATCH v3 5/7] storage_conf: Move username processing into common function

2013-07-15 Thread John Ferlan
Move the auth-username processing into virStoragePoolDefParseAuth save the resulting username into chap/cephx specific data --- src/conf/storage_conf.c | 30 ++ 1 file changed, 14 insertions(+), 16 deletions(-) diff --git a/src/conf/storage_conf.c

[libvirt] [PATCH v3 4/7] storage_pool: Rework chap XML to mimic ceph

2013-07-15 Thread John Ferlan
The existing 'chap' XML logic was never used - just defined. Rather than try to insert a square peg into a round hole, blow it up and rewrite the logic to follow the 'ceph' format. Remove the former chap.login and chap.passwd fields and replace with chap.username and chap.secret in

[libvirt] [PATCH v3 6/7] storage_conf: Merge AuthChap and AuthCephx into AuthSecret

2013-07-15 Thread John Ferlan
Merge virStoragePoolDefParseAuthChap and virStoragePoolDefParseAuthCephx into a common virStoragePoolDefParseAuthSecret. Change the output to be common for both by putting 'type' first followed by 'username'. Need to adjust a test output for that too. --- src/conf/storage_conf.c | 60

Re: [libvirt] [PATCH v3] Make logical pools independent on target path

2013-07-15 Thread Daniel P. Berrange
On Mon, Jul 15, 2013 at 02:39:28PM +0200, Martin Kletzander wrote: On 07/15/2013 02:27 PM, Daniel P. Berrange wrote: On Mon, Jul 15, 2013 at 10:30:16AM +0200, Martin Kletzander wrote: When using logical pools, we had to trust the target-path provided. This parameter, however, can be

Re: [libvirt] [PATCH v5 1/5] qemuBuildChrDeviceCommandLine: Don't leak devstr

2013-07-15 Thread John Ferlan
On 07/15/2013 08:11 AM, Daniel P. Berrange wrote: On Fri, Jul 12, 2013 at 07:23:58PM +0200, Michal Privoznik wrote: It's caller's responsibility to free return value of qemuBuildChrDeviceStr(). --- src/qemu/qemu_command.c | 1 + 1 file changed, 1 insertion(+) diff --git

Re: [libvirt] [PATCH v4 0/4] Add startupPolicy attribute support for hard disks

2013-07-15 Thread Guannan Ren
On 07/02/2013 05:35 PM, Guannan Ren wrote: v3: https://www.redhat.com/archives/libvir-list/2013-June/thread.html v3 to v4: Rebase v2 to v3: Not only check disk source, startupPolicy should work if any backing file is missing. The commit 039a3283 break the limition of

Re: [libvirt] [PATCH v4 1/4] conf: add startupPolicy attribute for harddisk

2013-07-15 Thread Martin Kletzander
On 07/02/2013 11:35 AM, Guannan Ren wrote: Add startupPolicy attribute policy for harddisk with type file, block and dir. The network type disk is still not supported. --- docs/schemas/domaincommon.rng | 6 ++ src/conf/domain_conf.c| 20 +--- 2 files changed, 19

Re: [libvirt] [PATCH v4 2/4] storage: report error rather than warning if backing files doesn't exist

2013-07-15 Thread Martin Kletzander
s/doesn't/don't/ in $SUBJ On 07/02/2013 11:35 AM, Guannan Ren wrote: If one of backing files for disk source doesn't exist, the guest will not be able to find and use the disk even though the disk still exists in guest xml definition. So reporting an error make more sense. Adding

[libvirt] [PATCH 0/2] Seclabel SIGSEGV issue

2013-07-15 Thread Michal Privoznik
There's been a crasher reported just a few days ago: https://www.redhat.com/archives/libvirt-users/2013-July/msg00067.html I'm proposing two patches which I can't decide which one is better. Both fixes the problem, though. Opinions? Michal Privoznik (2): lxcCapsInit: Allocate primary security

[libvirt] [PATCH 1/2] lxcCapsInit: Allocate primary security driver unconditionally

2013-07-15 Thread Michal Privoznik
Currently, if the primary security driver is 'none', we skip initializing caps-host.secModels. This means, later, when LXC domain XML is parsed and seclabel type='none'/ is found (see virSecurityLabelDefsParseXML), the model name is not copied to the seclabel. This leads to subsequent crash in

[libvirt] [PATCH 2/2] virSecurityManagerGenLabel: Skip seclabels without model

2013-07-15 Thread Michal Privoznik
While generating seclabels, we check the seclabel stack if required driver is in the stack. If not, an error is returned. However, it is possible for a seclabel to not have any model set (happens with LXC domains that have just seclabel type='none'). If that's the case, we should just skip the

Re: [libvirt] [PATCH v2 6/7] storage: Support chap authentication for iscsi pool

2013-07-15 Thread Osier Yang
On 10/07/13 03:10, John Ferlan wrote: From: Osier Yang jy...@redhat.com Although the XML for chap authentication with plain password was introduced long ago, the function was never implemented. This patch completes it by performing the authentication during findPoolSources() processing of pools

Re: [libvirt] [PATCHv2 1/2] pci: reorder static functions

2013-07-15 Thread Laine Stump
On 07/15/2013 04:39 AM, Martin Kletzander wrote: On 07/01/2013 07:46 PM, Laine Stump wrote: virPCIDeviceGetDriverPathAndName is a static function that will need to be called by another function that occurs above it in the file. This patch reorders the static functions so that a forward

Re: [libvirt] [PATCH v5 1/5] qemuBuildChrDeviceCommandLine: Don't leak devstr

2013-07-15 Thread Michal Privoznik
On 15.07.2013 15:18, John Ferlan wrote: On 07/15/2013 08:11 AM, Daniel P. Berrange wrote: On Fri, Jul 12, 2013 at 07:23:58PM +0200, Michal Privoznik wrote: It's caller's responsibility to free return value of qemuBuildChrDeviceStr(). --- src/qemu/qemu_command.c | 1 + 1 file changed, 1

[libvirt] [PATCH v4] Make logical pools independent on target path

2013-07-15 Thread Martin Kletzander
When using logical pools, we had to trust the target-path provided. This parameter, however, can be completely ommited and we can use '/dev/source.name' safely and populate it to target.path. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=952973 Signed-off-by: Martin Kletzander

Re: [libvirt] [PATCH v3 03/10] Add qemuMonitorJSONSetObjectProperty() method for QMP qom-set command

2013-07-15 Thread Daniel P. Berrange
On Fri, Jul 12, 2013 at 10:37:12AM -0600, Eric Blake wrote: On 07/12/2013 10:34 AM, John Ferlan wrote: On 07/12/2013 11:57 AM, Eric Blake wrote: On 07/12/2013 06:35 AM, Daniel P. Berrange wrote: On Thu, Jul 11, 2013 at 07:55:53PM -0400, John Ferlan wrote: Add a new

Re: [libvirt] [PATCH v3 7/7] storage: Support chap authentication for iscsi pool

2013-07-15 Thread Osier Yang
On 15/07/13 21:04, John Ferlan wrote: From: Osier Yang jy...@redhat.com Although the XML for chap authentication with plain password was introduced long ago, the function was never implemented. This patch completes it by performing the authentication during findPoolSources() processing of pools

Re: [libvirt] [PATCH v3 1/7] storage_conf: Adjust virStoragePoolAuthType enum

2013-07-15 Thread Daniel P. Berrange
On Mon, Jul 15, 2013 at 09:04:29AM -0400, John Ferlan wrote: Generate and use the virStoragePoolAuthTypeType{To|From}String helpers --- src/conf/storage_conf.c | 19 +++ src/conf/storage_conf.h | 3 +++ 2 files changed, 14 insertions(+), 8 deletions(-) diff --git

Re: [libvirt] [PATCH v3 7/7] storage: Support chap authentication for iscsi pool

2013-07-15 Thread Osier Yang
On 15/07/13 22:47, Osier Yang wrote: On 15/07/13 21:04, John Ferlan wrote: From: Osier Yang jy...@redhat.com Although the XML for chap authentication with plain password was introduced long ago, the function was never implemented. This patch completes it by performing the authentication during

Re: [libvirt] [PATCH v4 1/4] conf: add startupPolicy attribute for harddisk

2013-07-15 Thread Guannan Ren
On 07/15/2013 09:31 PM, Martin Kletzander wrote: On 07/02/2013 11:35 AM, Guannan Ren wrote: Add startupPolicy attribute policy for harddisk with type file, block and dir. The network type disk is still not supported. --- docs/schemas/domaincommon.rng | 6 ++ src/conf/domain_conf.c

Re: [libvirt] [PATCH v3 4/7] storage_pool: Rework chap XML to mimic ceph

2013-07-15 Thread Daniel P. Berrange
On Mon, Jul 15, 2013 at 09:04:32AM -0400, John Ferlan wrote: The existing 'chap' XML logic was never used - just defined. Rather than try to insert a square peg into a round hole, blow it up and rewrite the logic to follow the 'ceph' format. Remove the former chap.login and chap.passwd

Re: [libvirt] [PATCH v3 2/7] storage_conf: Introduce virStoragePoolAuthSecretPtr

2013-07-15 Thread Daniel P. Berrange
On Mon, Jul 15, 2013 at 09:04:30AM -0400, John Ferlan wrote: Split out the _virStoragePoolAuthSecret data from _virStoragePoolAuthCephx into its own structure --- src/conf/storage_conf.h | 14 +- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git

Re: [libvirt] [PATCH v3 6/7] storage_conf: Merge AuthChap and AuthCephx into AuthSecret

2013-07-15 Thread Daniel P. Berrange
On Mon, Jul 15, 2013 at 09:04:34AM -0400, John Ferlan wrote: Merge virStoragePoolDefParseAuthChap and virStoragePoolDefParseAuthCephx into a common virStoragePoolDefParseAuthSecret. Change the output to be common for both by putting 'type' first followed by 'username'. Need to adjust a test

Re: [libvirt] [PATCH v3 3/7] storage_conf: Move auth processing into virStoragePoolDefParseAuth

2013-07-15 Thread Daniel P. Berrange
On Mon, Jul 15, 2013 at 09:04:31AM -0400, John Ferlan wrote: Split processing of auth into its own function --- src/conf/storage_conf.c | 65 +++-- 1 file changed, 41 insertions(+), 24 deletions(-) ACK Daniel -- |: http://berrange.com

Re: [libvirt] [PATCH v3 5/7] storage_conf: Move username processing into common function

2013-07-15 Thread Daniel P. Berrange
On Mon, Jul 15, 2013 at 09:04:33AM -0400, John Ferlan wrote: Move the auth-username processing into virStoragePoolDefParseAuth save the resulting username into chap/cephx specific data --- src/conf/storage_conf.c | 30 ++ 1 file changed, 14 insertions(+), 16

Re: [libvirt] [PATCH v3 7/7] storage: Support chap authentication for iscsi pool

2013-07-15 Thread Daniel P. Berrange
On Mon, Jul 15, 2013 at 09:04:35AM -0400, John Ferlan wrote: From: Osier Yang jy...@redhat.com Although the XML for chap authentication with plain password was introduced long ago, the function was never implemented. This patch completes it by performing the authentication during

Re: [libvirt] [PATCH v2 6/7] storage: Support chap authentication for iscsi pool

2013-07-15 Thread John Ferlan
On 07/15/2013 10:16 AM, Osier Yang wrote: On 10/07/13 03:10, John Ferlan wrote: From: Osier Yang jy...@redhat.com ...snip... diff --git a/src/storage/storage_backend_iscsi.c b/src/storage/storage_backend_iscsi.c index 0a4cd22..673ca16 100644 --- a/src/storage/storage_backend_iscsi.c +++

Re: [libvirt] [PATCH v3 6/7] storage_conf: Merge AuthChap and AuthCephx into AuthSecret

2013-07-15 Thread John Ferlan
On 07/15/2013 11:00 AM, Daniel P. Berrange wrote: On Mon, Jul 15, 2013 at 09:04:34AM -0400, John Ferlan wrote: Merge virStoragePoolDefParseAuthChap and virStoragePoolDefParseAuthCephx into a common virStoragePoolDefParseAuthSecret. Change the output to be common for both by putting 'type'

Re: [libvirt] [PATCH v4 2/4] storage: report error rather than warning if backing files doesn't exist

2013-07-15 Thread Guannan Ren
On 07/15/2013 09:31 PM, Martin Kletzander wrote: s/doesn't/don't/ in $SUBJ On 07/02/2013 11:35 AM, Guannan Ren wrote: If one of backing files for disk source doesn't exist, the guest will not be able to find and use the disk even though the disk still exists in guest xml definition. So

[libvirt] Biweekly upstream qemu-kvm test report - July 15th, 2013

2013-07-15 Thread chandrashekar shastri
Hi, Please find the status of the upstream testing: Kernel : 3.10.0-rc5+ Qemu : 1.5.50 Libvirt : 1.0.6 Bugs filed in this week : 5 Qemu Bugs in Launchpad : --- Bug# 1199416 - Hot-add qcow2 [virtio-scsi] devices doesn't work in SlLES-11-SP2guest

Re: [libvirt] [PATCH] qemu: add macvlan delete to qemuDomainAttachNetDevice cleanup

2013-07-15 Thread Laine Stump
On 07/08/2013 09:08 AM, Viktor Mihajlovski wrote: On 07/02/2013 07:15 PM, Matthew Rosato wrote: On 07/01/2013 06:42 PM, Laine Stump wrote: On 07/01/2013 11:04 AM, Viktor Mihajlovski wrote: From: Matthew Rosato mjros...@linux.vnet.ibm.com This is a good catch, but incomplete. If you search

Re: [libvirt] [PATCH v2 6/7] storage: Support chap authentication for iscsi pool

2013-07-15 Thread Osier Yang
On 15/07/13 23:01, John Ferlan wrote: On 07/15/2013 10:16 AM, Osier Yang wrote: On 10/07/13 03:10, John Ferlan wrote: From: Osier Yang jy...@redhat.com ...snip... diff --git a/src/storage/storage_backend_iscsi.c b/src/storage/storage_backend_iscsi.c index 0a4cd22..673ca16 100644 ---

Re: [libvirt] Biweekly upstream qemu-kvm test report - July 15th, 2013

2013-07-15 Thread Daniel P. Berrange
On Mon, Jul 15, 2013 at 08:36:25PM +0530, chandrashekar shastri wrote: Hi, Please find the status of the upstream testing: As I said last week, please *STOP* spamming the libvirt virt-tools mailing lists with this. The maintainers who want to know about bugs can already subscribe to alerts

Re: [libvirt] [PATCH v4 2/4] storage: report error rather than warning if backing files doesn't exist

2013-07-15 Thread Ján Tomko
On 07/02/2013 11:35 AM, Guannan Ren wrote: If one of backing files for disk source doesn't exist, the guest will not be able to find and use the disk even though the disk still exists in guest xml definition. So reporting an error make more sense. Adding virFileAccessibleAs() to check if the

Re: [libvirt] [PATCH v2 6/7] storage: Support chap authentication for iscsi pool

2013-07-15 Thread John Ferlan
On 07/15/2013 11:11 AM, Osier Yang wrote: On 15/07/13 23:01, John Ferlan wrote: On 07/15/2013 10:16 AM, Osier Yang wrote: On 10/07/13 03:10, John Ferlan wrote: From: Osier Yang jy...@redhat.com ...snip... i think the chap auth iscsi pool won't be able to start with this change,

[libvirt] [PATCH 2/4] cpu: Add virCPUDefUpdateFeature()

2013-07-15 Thread Peter Krempa
This new function updates or adds a feature to a existing cpu model definition. This function will be helpful to allow tuning of host-model features in later patches. --- src/conf/cpu_conf.c | 38 ++ src/conf/cpu_conf.h | 5 +

[libvirt] [PATCH 3/4] cpu: Clean up code style

2013-07-15 Thread Peter Krempa
--- src/conf/cpu_conf.c | 4 ++-- src/cpu/cpu_x86.c | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/conf/cpu_conf.c b/src/conf/cpu_conf.c index 40fed96..1e657ad 100644 --- a/src/conf/cpu_conf.c +++ b/src/conf/cpu_conf.c @@ -357,8 +357,7 @@ virCPUDefParseXML(const

[libvirt] [PATCH 0/4] Add ability to tune host-model cpu flags

2013-07-15 Thread Peter Krempa
This series adds the ability to influence cpu flags that are created when using host-model cpu mode and a cleans up a few places that I went through while fixing the issue. Peter Krempa (4): conf: Clean up error reporting in cpu definition parsing cpu: Add virCPUDefUpdateFeature() cpu:

[libvirt] [PATCH 4/4] cpu: Allow fine tuning of host-model cpu

2013-07-15 Thread Peter Krempa
https://bugzilla.redhat.com/show_bug.cgi?id=799354 Until now, the host-model cpu mode couldn't be influenced. This patch allows to use the feature elements to either enable or disable specific CPU flags. This can be used to force flags that can be emulated even if the host CPU doesn't support

[libvirt] [PATCH 1/4] conf: Clean up error reporting in cpu definition parsing

2013-07-15 Thread Peter Krempa
Use VIR_ERR_XML_ERROR instead of VIR_ERR_INTERNAL_ERROR in XML parsing code and move %s formating strings right after the error code. --- src/conf/cpu_conf.c | 74 ++--- 1 file changed, 37 insertions(+), 37 deletions(-) diff --git

Re: [libvirt] [PATCH v3 00/10] Re-enable memballoon driver statistics reporting

2013-07-15 Thread John Ferlan
On 07/11/2013 07:55 PM, John Ferlan wrote: This patch set replaces: https://www.redhat.com/archives/libvir-list/2013-July/msg00435.html Changes 01 - No change 02 03 - Adjust typecaste to switch() and remove default: 04 - Use unsigned int as requested 05 - Add

Re: [libvirt] [PATCH v3 0/7] Support CHAP authentication for iscsi pool

2013-07-15 Thread John Ferlan
On 07/15/2013 09:04 AM, John Ferlan wrote: Based on review comments of v2 posting (see 2/7 for specifics): https://www.redhat.com/archives/libvir-list/2013-July/msg00554.html I rewrote the storage_conf.c chap parsing code. I think the first 6 patches could be squashed into 1 for a final

[libvirt] [PATCH 09/12] Add virDomainDefFindDevice for looking up a device by its alias

2013-07-15 Thread Jiri Denemark
--- src/conf/domain_conf.c | 41 + src/conf/domain_conf.h | 4 src/libvirt_private.syms | 1 + 3 files changed, 46 insertions(+) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 602c9a6..1520ec5 100644 ---

[libvirt] [PATCH 06/12] qemu: Separate controller removal into a standalone function

2013-07-15 Thread Jiri Denemark
--- src/qemu/qemu_hotplug.c | 26 +++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c index 6db789d..0093245 100644 --- a/src/qemu/qemu_hotplug.c +++ b/src/qemu/qemu_hotplug.c @@ -2139,6 +2139,28 @@

[libvirt] [PATCH 11/12] qemu: Remove devices only after DEVICE_DELETED event

2013-07-15 Thread Jiri Denemark
--- src/qemu/qemu_domain.h | 2 + src/qemu/qemu_hotplug.c | 101 +--- src/qemu/qemu_hotplug.h | 3 ++ src/qemu/qemu_process.c | 41 4 files changed, 142 insertions(+), 5 deletions(-) diff --git a/src/qemu/qemu_domain.h

[libvirt] [PATCH 07/12] qemu: Separate net device removal into a standalone function

2013-07-15 Thread Jiri Denemark
--- src/qemu/qemu_hotplug.c | 101 +--- 1 file changed, 62 insertions(+), 39 deletions(-) diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c index 0093245..26a6d42 100644 --- a/src/qemu/qemu_hotplug.c +++ b/src/qemu/qemu_hotplug.c @@

[libvirt] [PATCH 05/12] qemu: Separate disk device removal into a standalone function

2013-07-15 Thread Jiri Denemark
--- src/qemu/qemu_driver.c | 31 +--- src/qemu/qemu_hotplug.c | 127 ++-- src/qemu/qemu_hotplug.h | 4 +- 3 files changed, 73 insertions(+), 89 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 495867a..436ce6a

[libvirt] [PATCH 04/12] qemu: Add qemuDomainReleaseDeviceAddress to remove any address

2013-07-15 Thread Jiri Denemark
--- src/qemu/qemu_command.c | 35 --- src/qemu/qemu_command.h | 8 +++--- src/qemu/qemu_hotplug.c | 75 - 3 files changed, 47 insertions(+), 71 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index

[libvirt] [PATCH 02/12] examples: Handle VIR_DOMAIN_EVENT_ID_DEVICE_REMOVED event

2013-07-15 Thread Jiri Denemark
--- examples/domain-events/events-c/event-test.c | 23 +- examples/domain-events/events-python/event-test.py | 4 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/examples/domain-events/events-c/event-test.c

[libvirt] [PATCH 00/12] Remove devices only after DEVICE_DELETED event

2013-07-15 Thread Jiri Denemark
This series (partially) fixes a longstanding bug in device unplug from a live domain. We considered the QEMU command used for that to be synchronous and removed the unplugged device from domain definition immediately after the command returned success. This is OK for USB devices but other devices

[libvirt] [PATCH 08/12] qemu: Separate host device removal into a standalone function

2013-07-15 Thread Jiri Denemark
--- src/qemu/qemu_hotplug.c | 240 1 file changed, 142 insertions(+), 98 deletions(-) diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c index 26a6d42..169cce2 100644 --- a/src/qemu/qemu_hotplug.c +++ b/src/qemu/qemu_hotplug.c @@

[libvirt] [PATCH 12/12] qemu: Emit VIR_DOMAIN_EVENT_ID_DEVICE_REMOVED events

2013-07-15 Thread Jiri Denemark
--- src/qemu/qemu_hotplug.c | 22 +- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c index 8c2f756..ea62e71 100644 --- a/src/qemu/qemu_hotplug.c +++ b/src/qemu/qemu_hotplug.c @@ -2105,6 +2105,7 @@

[libvirt] [PATCH 10/12] qemu: Add support for DEVICE_DELETED event

2013-07-15 Thread Jiri Denemark
--- src/qemu/qemu_capabilities.c | 2 ++ src/qemu/qemu_capabilities.h | 1 + src/qemu/qemu_monitor.c | 13 + src/qemu/qemu_monitor.h | 5 + src/qemu/qemu_monitor_json.c | 15 +++ 5 files changed, 36 insertions(+) diff --git a/src/qemu/qemu_capabilities.c

[libvirt] [PATCH 01/12] Add VIR_DOMAIN_EVENT_ID_DEVICE_REMOVED event

2013-07-15 Thread Jiri Denemark
--- daemon/remote.c | 32 + include/libvirt/libvirt.h.in | 18 python/libvirt-override-virConnect.py | 9 python/libvirt-override.c | 52 - src/conf/domain_event.c | 85

[libvirt] [PATCH 03/12] Clarify virDomainDetachDeviceFlags documentation

2013-07-15 Thread Jiri Denemark
--- src/libvirt.c | 12 1 file changed, 12 insertions(+) diff --git a/src/libvirt.c b/src/libvirt.c index 4dc91d7..860188b 100644 --- a/src/libvirt.c +++ b/src/libvirt.c @@ -10825,6 +10825,18 @@ error: * block copy operation on the device being detached; in that case, * use

Re: [libvirt] [PATCH 11/12] qemu: Remove devices only after DEVICE_DELETED event

2013-07-15 Thread Daniel P. Berrange
On Mon, Jul 15, 2013 at 07:11:12PM +0200, Jiri Denemark wrote: --- src/qemu/qemu_domain.h | 2 + src/qemu/qemu_hotplug.c | 101 +--- src/qemu/qemu_hotplug.h | 3 ++ src/qemu/qemu_process.c | 41 4 files changed, 142

[libvirt] Regarding libvirtd crash in virDomainLookupByName(..) similar to bug 903238/915353/924756

2013-07-15 Thread Udayan Bapat (ubapat)
Hello All, I work in Cisco Virtualization team and I found this email list from libvirt.org We are hitting a random libvirtd crash with a traceback during guest shutdown - #3 0x7f4a34a2d4ad in malloc_printerr (action=2, str=0x7f4a34acb682 corrupted double-linked list, ptr=value

Re: [libvirt] [PATCH V2] Expose all CPU features in host definition

2013-07-15 Thread Don Dugger
I think we're getting a little side tracked on how the OpenStack scheduler works (although I'll still respond to issues with my current use case). I still come back to the issue that I feel the API is not returning the proper information (ignoring how that info is used by the caller). Note that

Re: [libvirt] [PATCH 11/12] qemu: Remove devices only after DEVICE_DELETED event

2013-07-15 Thread Jiri Denemark
On Mon, Jul 15, 2013 at 18:25:58 +0100, Daniel Berrange wrote: On Mon, Jul 15, 2013 at 07:11:12PM +0200, Jiri Denemark wrote: --- src/qemu/qemu_domain.h | 2 + src/qemu/qemu_hotplug.c | 101 +--- src/qemu/qemu_hotplug.h | 3 ++

Re: [libvirt] [PATCH] lxc: hoist supplemental group detection before clone

2013-07-15 Thread Eric Blake
On 07/15/2013 03:59 AM, Daniel P. Berrange wrote: On Mon, Jul 15, 2013 at 03:40:53PM +0800, Gao feng wrote: On 07/13/2013 01:35 AM, Eric Blake wrote: Commit 75c1256 states that virGetGroupList must not be called between fork and exec, then commit ee777e99 promptly violated that for lxc.

Re: [libvirt] [PATCH] security_dac: compute supplemental groups before fork

2013-07-15 Thread Eric Blake
On 07/15/2013 06:14 AM, Daniel P. Berrange wrote: On Fri, Jul 12, 2013 at 03:13:48PM -0600, Eric Blake wrote: @@ -146,8 +149,12 @@ virSecurityManagerPtr virSecurityManagerNewDAC(const char *virtDriver, if (!mgr) return NULL; -virSecurityDACSetUser(mgr, user); -

[libvirt] [PATCH v4 0/3] Support CHAP authentication for iscsi pool

2013-07-15 Thread John Ferlan
https://bugzilla.redhat.com/show_bug.cgi?id=957294 Based on reviews of the the v2/v3 changes to the storage backend drivers regarding the call to perform the authentication, see (and followups): https://www.redhat.com/archives/libvir-list/2013-July/msg00910.html I moved the authentication of

[libvirt] [PATCH v4 3/3] storage: Support chap authentication for iscsi pool

2013-07-15 Thread John Ferlan
Although the XML for CHAP authentication with plain password was introduced long ago, the function was never implemented. This patch replaces the login/password mechanism by following the 'ceph' (or RBD) model of using a 'username' with a 'secret' which has the authentication information. This

[libvirt] [PATCH v4 1/3] Add a privileged field to storageDriverState

2013-07-15 Thread John Ferlan
Use the privileged value in order to generate a connection which could be passed to the various storage backend drivers. In particular, the iSCSI driver will need a connect in order to perform pool authentication using the 'chap' secrets. Additionally, the RBD backend utilizes the connection

  1   2   >