[libvirt] [PATCH] virsh: fix change-media bug on disk block type

2013-07-22 Thread Guannan Ren
Resolves:https://bugzilla.redhat.com/show_bug.cgi?id=923053 When cdrom is block type, the virsh change-media failed to insert source info because virsh uses source block='/dev/sdb'/ while the correct name of the attribute for block disks is dev. --- tools/virsh-domain.c | 6 -- 1 file

[libvirt] [test-API][PATCH V3] Modify repos/network/network_list.py and add network_list case to conf

2013-07-22 Thread hongming zhang
Modify the old network_list.py. The new network_list.py covers all flags of listAllNetworks and the following api. and add network_list to basic_network.conf. virNetwork: name() isActive() isPersistent() virConnect: listAllNetworks() V1- V2 1.Change the flag in conf from digit to string 2.Remove

Re: [libvirt] [PATCH 1/4] util: Non-existent string array does not contain any string

2013-07-22 Thread Peter Krempa
On 07/19/13 19:00, Jiri Denemark wrote: Make virStringArrayHasString return false when called on a non-existent string array. --- src/util/virstring.c | 3 +++ 1 file changed, 3 insertions(+) ACK. Peter -- libvir-list mailing list libvir-list@redhat.com

Re: [libvirt] [PATCH 2/4] conf: Make error reporting in virDomainDefFindDevice optional

2013-07-22 Thread Peter Krempa
On 07/19/13 19:00, Jiri Denemark wrote: --- src/conf/domain_conf.c | 11 --- src/conf/domain_conf.h | 3 ++- src/qemu/qemu_process.c | 2 +- 3 files changed, 11 insertions(+), 5 deletions(-) ACK. Peter -- libvir-list mailing list libvir-list@redhat.com

Re: [libvirt] [test-API][PATCH V3] Modify repos/network/network_list.py and add network_list case to conf

2013-07-22 Thread Guannan Ren
On 07/22/2013 03:53 PM, hongming zhang wrote: Modify the old network_list.py. The new network_list.py covers all flags of listAllNetworks and the following api. and add network_list to basic_network.conf. virNetwork: name() isActive() isPersistent() virConnect: listAllNetworks() V1- V2 1.Change

Re: [libvirt] [PATCH 4/4] qemu: Unplug devices that disappeared when libvirtd was down

2013-07-22 Thread Peter Krempa
On 07/19/13 19:00, Jiri Denemark wrote: In case libvirtd is asked to unplug a device but the device is actually unplugged later when libvirtd is not running, we need to detect that and remove such device when libvirtd starts again and reconnects to running domains. --- src/qemu/qemu_domain.c

Re: [libvirt] [PATCH 3/4] qemu: Introduce qemuMonitorGetDeviceAliases

2013-07-22 Thread Peter Krempa
On 07/19/13 19:00, Jiri Denemark wrote: This API provides a NULL-terminated list of devices which are currently attached to a QEMU domain. --- src/qemu/qemu_monitor.c | 21 +++ src/qemu/qemu_monitor.h | 4 +++ src/qemu/qemu_monitor_json.c | 38

Re: [libvirt] [PATCH 5/3] vmware: Fix bogus CPU arch copy

2013-07-22 Thread Peter Krempa
On 07/22/13 00:18, Jiri Denemark wrote: --- src/vmware/vmware_conf.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) ACK. Peter -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [RFC PATCH] qemu: Shorten SCSI hostdev alias to avoid QEMU failure

2013-07-22 Thread Daniel P. Berrange
On Fri, Jul 12, 2013 at 05:13:56PM +0200, Viktor Mihajlovski wrote: The alias for hostdevs of type SCSI can be too long for QEMU if larger LUNs are encountered. Here's a real life example: hostdev mode='subsystem' type='scsi' managed='no' source adapter name='scsi_host0'/

Re: [libvirt] [PATCH 1/3] cpu_x86: Use x86-specific CPU data structure

2013-07-22 Thread Peter Krempa
On 07/19/13 19:16, Jiri Denemark wrote: --- src/cpu/cpu.h | 2 +- src/cpu/cpu_x86.c | 271 ++ 2 files changed, 173 insertions(+), 100 deletions(-) ACK, mostly mechanical. Peter -- libvir-list mailing list libvir-list@redhat.com

Re: [libvirt] [PATCH v3 2/7] conf: Introduce new XML tag mode for disk source

2013-07-22 Thread Daniel P. Berrange
On Fri, Jul 19, 2013 at 08:32:28AM -0400, John Ferlan wrote: There are two ways to use a iSCSI LUN as disk source for qemu. * The LUN's path as it shows up on host, e.g. /dev/disk/by-path/ip-$ip:3260-iscsi-$iqn-fc18:iscsi.iscsi0-lun-1 * The libiscsi URI from the storage pool source

Re: [libvirt] [PATCH v3 3/7] conf: Introduce virDomainDiskSourceIsBlockType

2013-07-22 Thread Daniel P. Berrange
On Fri, Jul 19, 2013 at 08:32:29AM -0400, John Ferlan wrote: Introduce a new helper to check if the disk source is of block type --- src/conf/domain_conf.c | 32 src/conf/domain_conf.h | 3 +++ src/libvirt_private.syms | 1 + src/qemu/qemu_command.c |

Re: [libvirt] [PATCH 2/3] Replace union cpuData with virCPUData

2013-07-22 Thread Peter Krempa
On 07/19/13 19:16, Jiri Denemark wrote: --- src/cpu/cpu.c| 22 +-- src/cpu/cpu.h| 51 ++-- src/cpu/cpu_arm.c| 8 +++ src/cpu/cpu_powerpc.c| 8 +++ src/cpu/cpu_s390.c

Re: [libvirt] [RESEND PATCH 2/5] virstring.h/c: Util method for making some find and replace in strings

2013-07-22 Thread Daniel P. Berrange
On Fri, Jul 19, 2013 at 03:56:05PM +0200, Manuel VIVES wrote: --- src/libvirt_private.syms |1 + src/util/virstring.c | 129 ++ src/util/virstring.h |6 +++ 3 files changed, 136 insertions(+) diff --git

Re: [libvirt] [PATCH v3 4/7] qemu: Translate the iscsi pool/volume disk source

2013-07-22 Thread Osier Yang
On 19/07/13 20:32, John Ferlan wrote: The difference with already supported pool types (dir, fs, block) is: there are two modes for iscsi pool (or network pools in future), one can specify it either to use the volume target path (the path showed up on host) with mode='host', or to use the remote

Re: [libvirt] [PATCH 4/3] Remove arch parameter from cpuHasFeature()

2013-07-22 Thread Peter Krempa
On 07/22/13 00:18, Jiri Denemark wrote: --- This patch should be squashed in 3/3. ACK. Peter -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCH 3/3] cpu: Store arch in virCPUData

2013-07-22 Thread Peter Krempa
On 07/19/13 19:16, Jiri Denemark wrote: --- src/cpu/cpu.c| 11 +-- src/cpu/cpu.h| 19 +++ src/cpu/cpu_powerpc.c| 4 ++-- src/cpu/cpu_x86.c| 34 -- src/qemu/qemu_capabilities.c | 2

[libvirt] [PATCH] libxl: Correctly initialize vcpu bitmap

2013-07-22 Thread Stefan Bader
This fixes the basic setup but there is likely more to do if things like manual CPU hirarchy (nodes, cores, threads) to be working. Cross-posting to xen-devel to make sure I am doing things correctly. -Stefan From 1ec5e7ea0d3498b9f61b83e8aed87cc3cae106de Mon Sep 17 00:00:00 2001 From: Stefan

Re: [libvirt] [PATCH v3 5/7] tests: Add various network and volume definitions

2013-07-22 Thread Osier Yang
On 19/07/13 20:32, John Ferlan wrote: Although they produce no seclabel data, add some tests for coverage of various network and volume disk definitions --- tests/securityselinuxlabeldata/netdisks.txt | 5 +++ tests/securityselinuxlabeldata/netdisks.xml | 58 +

Re: [libvirt] [PATCH v3 6/7] conf: Ignore the volume type disk if its mode is direct

2013-07-22 Thread Osier Yang
On 19/07/13 20:32, John Ferlan wrote: From: Osier Yang jy...@redhat.com virDomainDiskDefForeachPath is not only used by the security setting helpers, also used by cgroup setting helpers, so this is to ignore the volume type disk with mode=direct for cgroup setting. --- src/conf/domain_conf.c

[libvirt] [PATCH] bridge driver: s/network_driver/virNetworkDriverState/

2013-07-22 Thread Roman Bogorodskiy
This is another cleanup before extracting platform-specific parts from bridge_driver. Rename struct network_driver to _virNetworkDriverState and add appropriate typedefs: virNetworkDriverState and virNetworkDriverStatePtr. This will help us to avoid potential problems when moving this struct to

Re: [libvirt] [PATCH v3 7/7] qemu: Translate the volume type disk source before cgroup setting

2013-07-22 Thread Osier Yang
On 19/07/13 20:32, John Ferlan wrote: From: Osier Yang jy...@redhat.com The translation must be done before both of cgroup and security setting, otherwise since the disk source is not translated yet, it might be skipped on cgroup and security setting. --- src/qemu/qemu_process.c | 13

Re: [libvirt] [PATCH 4/4] qemu: Unplug devices that disappeared when libvirtd was down

2013-07-22 Thread Jiri Denemark
On Mon, Jul 22, 2013 at 11:13:30 +0200, Peter Krempa wrote: On 07/19/13 19:00, Jiri Denemark wrote: In case libvirtd is asked to unplug a device but the device is actually unplugged later when libvirtd is not running, we need to detect that and remove such device when libvirtd starts again

Re: [libvirt] [PATCH] Split up platfrom specifics from bridge driver

2013-07-22 Thread Roman Bogorodskiy
Eric Blake wrote: On 07/18/2013 03:23 AM, Daniel P. Berrange wrote: On Wed, Jul 17, 2013 at 05:41:56PM -0600, Eric Blake wrote: So, although I like the split, I can't help but wonder if your rebase should take the road of adjusting things to use a callback struct, rather than requiring

Re: [libvirt] [PATCH] cpu: Let explicit features override model features

2013-07-22 Thread Peter Krempa
On 07/21/13 14:37, Jiri Denemark wrote: Until now CPU features inherited from a specified CPU model could only be overridden with 'disable' policy. With this patch, any explicitly specified feature always overrides the same feature inherited from a CPU model regardless on the specified policy.

Re: [libvirt] [PATCH 5/3] vmware: Fix bogus CPU arch copy

2013-07-22 Thread Jiri Denemark
On Mon, Jul 22, 2013 at 11:30:33 +0200, Peter Krempa wrote: On 07/22/13 00:18, Jiri Denemark wrote: --- src/vmware/vmware_conf.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) ACK. Thanks, I pushed this series. Jirka -- libvir-list mailing list libvir-list@redhat.com

Re: [libvirt] [PATCH] cpu: Let explicit features override model features

2013-07-22 Thread Jiri Denemark
On Mon, Jul 22, 2013 at 13:41:44 +0200, Peter Krempa wrote: On 07/21/13 14:37, Jiri Denemark wrote: Until now CPU features inherited from a specified CPU model could only be overridden with 'disable' policy. With this patch, any explicitly specified feature always overrides the same feature

[libvirt] [PATCH] doc: Fix copy-paste-error in virNodeGetMemoryStats

2013-07-22 Thread Philipp Hahn
The description seems to be copied from virNodeGetCpuState. Change wrong 'cpu' to 'memory'. Signed-off-by: Philipp Hahn h...@univention.de --- src/libvirt.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libvirt.c b/src/libvirt.c index bc1694a..12f9c41 100644 ---

Re: [libvirt] [PATCH 2/2] Add API for calling systemd-machined's DBus API

2013-07-22 Thread Daniel P. Berrange
On Thu, Jul 18, 2013 at 05:11:45PM -0600, Eric Blake wrote: Ah, this hunk probably belongs in 1/2. In fact, it fixes compilation, so I was able to run 'make check', but the test from 1/2 fails: TEST: virdbustest Failed to round-trip byte '0' to '200' !..Failed to round-trip byte '0'

Re: [libvirt] [PATCH] bridge driver: s/network_driver/virNetworkDriverState/

2013-07-22 Thread Michal Privoznik
On 22.07.2013 13:08, Roman Bogorodskiy wrote: This is another cleanup before extracting platform-specific parts from bridge_driver. Rename struct network_driver to _virNetworkDriverState and add appropriate typedefs: virNetworkDriverState and virNetworkDriverStatePtr. This will help us

Re: [libvirt] [PATCH] Make locking more debuggable from logs

2013-07-22 Thread Daniel P. Berrange
On Mon, Jul 22, 2013 at 03:44:04PM +0200, Martin Kletzander wrote: With this patch, there is new ./configure option '--enable-lock-debug' which controls whether we want to turn on debugging locks. This feature is exposed as a ./configure option due to its huge overhead in speed/log size and

[libvirt] [PATCH] tests: Free test at the end of GetDeviceAliases JSON test

2013-07-22 Thread Jiri Denemark
Commit 58b147ad07c9432b53e66ca20aff74d812647c57 added a test for qemuMonitorGetDeviceAliases but forgot to free the test object at the end which causes all sort of weird errors and failures when new tests are added after the GetDeviceAliases. --- tests/qemumonitorjsontest.c | 1 + 1 file changed,

[libvirt] [PATCH 2/4] Move pool XML out of storagevolxml2argvdata

2013-07-22 Thread Ján Tomko
Reuse the pool definition from storagepoolxml2xmlin. --- tests/storagevolxml2argvdata/pool-dir.xml | 18 -- tests/storagevolxml2argvtest.c| 2 +- 2 files changed, 1 insertion(+), 19 deletions(-) delete mode 100644 tests/storagevolxml2argvdata/pool-dir.xml diff --git

[libvirt] [PATCH 4/4] Add inputpool to storagevolxml2argvtest

2013-07-22 Thread Ján Tomko
This allows testing the command line for cloning file-based volumes into logical volumes and vice versa. --- .../storagevolxml2argvdata/logical-from-qcow2.argv | 2 + .../storagevolxml2argvdata/qcow2-from-logical.argv | 2 + tests/storagevolxml2argvtest.c | 90

[libvirt] [PATCH 3/4] Move volume XMLs out of storagevolxml2argvdata

2013-07-22 Thread Ján Tomko
Reuse the XML files in storagevolxml2xmlin. (This requires changing a few backing files to /dev/null, since virStorageBackendCreateQemuImgCmd checks for its presence) --- tests/storagevolxml2argvdata/vol-file.xml | 20 -- tests/storagevolxml2argvdata/vol-qcow2-1.1.xml |

[libvirt] [PATCH 0/4] Test logical volume cloning in storagevolxml2argvtest

2013-07-22 Thread Ján Tomko
Ján Tomko (4): Use separate macros for failure/success in vol-to-argv test Move pool XML out of storagevolxml2argvdata Move volume XMLs out of storagevolxml2argvdata Add inputpool to storagevolxml2argvtest .../storagevolxml2argvdata/logical-from-qcow2.argv | 2 +

[libvirt] [PATCH 1/4] Use separate macros for failure/success in vol-to-argv test

2013-07-22 Thread Ján Tomko
Reindent them to put the input volume on a separate line. --- tests/storagevolxml2argvtest.c | 64 +- 1 file changed, 44 insertions(+), 20 deletions(-) diff --git a/tests/storagevolxml2argvtest.c b/tests/storagevolxml2argvtest.c index 89c233f..4f4bf7d

Re: [libvirt] [PATCH] doc: Fix copy-paste-error in virNodeGetMemoryStats

2013-07-22 Thread Ján Tomko
On 07/22/2013 01:58 PM, Philipp Hahn wrote: The description seems to be copied from virNodeGetCpuState. Change wrong 'cpu' to 'memory'. Signed-off-by: Philipp Hahn h...@univention.de --- src/libvirt.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ACK and pushed. This has

Re: [libvirt] [PATCH] tests: Free test at the end of GetDeviceAliases JSON test

2013-07-22 Thread Jiri Denemark
On Mon, Jul 22, 2013 at 16:19:18 +0200, Michal Privoznik wrote: On 22.07.2013 15:57, Jiri Denemark wrote: Commit 58b147ad07c9432b53e66ca20aff74d812647c57 added a test for qemuMonitorGetDeviceAliases but forgot to free the test object at the end which causes all sort of weird errors and

[libvirt] [PATCH] Make locking more debuggable from logs

2013-07-22 Thread Martin Kletzander
With this patch, there is new ./configure option '--enable-lock-debug' which controls whether we want to turn on debugging locks. This feature is exposed as a ./configure option due to its huge overhead in speed/log size and is only meant to be used with this in mind. It is designed in a way

[libvirt] [PATCH] tests: PCI controller checks

2013-07-22 Thread Ján Tomko
Check if PCI bridges with duplicate indexes are rejected. PCI root controllers with non-zero indexes or addresses should also be rejected. --- .../qemuxml2argv-pci-bridge-duplicate-index.xml | 16 tests/qemuxml2argvdata/qemuxml2argv-pci-root-address.xml | 16

Re: [libvirt] [PATCH v3 5/7] tests: Add various network and volume definitions

2013-07-22 Thread John Ferlan
On 07/22/2013 07:06 AM, Osier Yang wrote: On 19/07/13 20:32, John Ferlan wrote: Although they produce no seclabel data, add some tests for coverage of various network and volume disk definitions --- tests/securityselinuxlabeldata/netdisks.txt | 5 +++

Re: [libvirt] [PATCH] tests: Free test at the end of GetDeviceAliases JSON test

2013-07-22 Thread Michal Privoznik
On 22.07.2013 15:57, Jiri Denemark wrote: Commit 58b147ad07c9432b53e66ca20aff74d812647c57 added a test for qemuMonitorGetDeviceAliases but forgot to free the test object at the end which causes all sort of weird errors and failures when new tests are added after the GetDeviceAliases. ---

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

2013-07-22 Thread Eric Blake
On 07/20/2013 07:40 AM, Doug Goldstein wrote: On Wed, Jul 17, 2013 at 5:10 AM, Daniel P. Berrange berra...@redhat.com wrote: On Mon, Jul 15, 2013 at 03:58:28PM +0200, Michal Privoznik wrote: While generating seclabels, we check the seclabel stack if required driver is in the stack. If not,

Re: [libvirt] [PATCH] virsh: fix change-media bug on disk block type

2013-07-22 Thread Eric Blake
On 07/22/2013 01:40 AM, Guannan Ren wrote: Resolves:https://bugzilla.redhat.com/show_bug.cgi?id=923053 When cdrom is block type, the virsh change-media failed to insert source info because virsh uses source block='/dev/sdb'/ while the correct name of the attribute for block disks is dev. ---

[libvirt] [PATCH] bridge driver: use more general function names

2013-07-22 Thread Roman Bogorodskiy
Continue preparation for extracting platform-specific parts from bridge_driver: s/Iptables/Firewall/ for firewall related function names. --- src/network/bridge_driver.c | 70 ++--- 1 file changed, 35 insertions(+), 35 deletions(-) diff --git

[libvirt] [PATCH] Add virDBusMessage(Encode,Decode) stubs

2013-07-22 Thread Roman Bogorodskiy
Commit 834c9c94 introduced virDBusMessageEncode and virDBusMessageDecode functions, however corresponding stubs were not added to !WITH_DBUS section, therefore 'make check' started to fail when compiled w/out dbus support like that: Expected symbol virDBusMessageDecode is not in ELF library ---

Re: [libvirt] [Qemu-devel] [Question] why x2apic's set by default without host support(on Nehalem CPU).

2013-07-22 Thread Eduardo Habkost
On Mon, Jul 22, 2013 at 07:24:24PM +0800, Peter Huang(Peng) wrote: Hi, Everyone I have been encountered a problem recently. My box uses Nehalem E5520 CPU, and this model doesn't support x2apic feature. I created a VM on KVM, and uses cpu mode=pass-through, I can get the right cpu model from

Re: [libvirt] [PATCH v3 0/7] Support to use iscsi storage in domain conf

2013-07-22 Thread John Ferlan
On 07/19/2013 08:32 AM, John Ferlan wrote: An update to yesterday's posting: https://www.redhat.com/archives/libvir-list/2013-July/msg01213.html Changes in v3 over v2 * Update patch 1 per code review * Use 'direct' instead of 'uri' and supporting documentaiton * In patch 4, use

Re: [libvirt] [Xen-devel] [PATCH] libxl: Correctly initialize vcpu bitmap

2013-07-22 Thread Konrad Rzeszutek Wilk
On Mon, Jul 22, 2013 at 12:51:05PM +0200, Stefan Bader wrote: This fixes the basic setup but there is likely more to do if things like manual CPU hirarchy (nodes, cores, threads) to be working. Cross-posting to xen-devel to make sure I am doing things correctly. -Stefan From

[libvirt] [PATCH v5 1/5] qemu: Add source pool auth info to virDomainDiskDef for iSCSI

2013-07-22 Thread John Ferlan
During qemuTranslateDiskSourcePool() execution, if the srcpool has been defined with authentication information, then for iSCSI pools copy the authentication and host information to virDomainDiskDef. --- src/qemu/qemu_conf.c | 55 1 file

[libvirt] [PATCH v5 5/5] Adjust 'ceph' authentication secret usage for rbd pool.

2013-07-22 Thread John Ferlan
Update virStorageBackendRBDOpenRADOSConn() to use the internal API to the secret driver in order to get the secret value instead of the external virSecretGetValue() path. Without the flag VIR_SECRET_GET_VALUE_INTERNAL_CALL there is no way to get the value of private secret. This also requires

[libvirt] [PATCH v5 2/5] qemu: Create a common qemuGetSecretString

2013-07-22 Thread John Ferlan
Make the secret fetching code common for qemuBuildRBDString() and qemuBuildDriveURIString() using the virDomainDiskDef. --- src/qemu/qemu_command.c | 157 +--- 1 file changed, 81 insertions(+), 76 deletions(-) diff --git a/src/qemu/qemu_command.c

[libvirt] [PATCH v5 3/5] qemu_common: Create qemuBuildVolumeString() to process storage pool

2013-07-22 Thread John Ferlan
Split out into its own separate routine --- src/qemu/qemu_command.c | 108 1 file changed, 64 insertions(+), 44 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 5bd8e87..ac275c3 100644 --- a/src/qemu/qemu_command.c

[libvirt] [PATCH v5 0/5] Support CHAP authentication for iscsi pool

2013-07-22 Thread John Ferlan
This is a reworking and reposting of the authentication patches originally posted as part of my v3 reworking of Osier's original patches, see: https://www.redhat.com/archives/libvir-list/2013-July/msg00894.html Patch 7/7 was noted to be incorrect since the authentication was in the wrong place

[libvirt] [PATCH v5 4/5] storage: Support chap authentication for iscsi pool

2013-07-22 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