Re: [libvirt] [PATCH] security:selinux: Fix crash when tcon is NULL

2014-11-10 Thread lhuang
On 11/10/2014 03:57 PM, Martin Kletzander wrote: On Sat, Nov 08, 2014 at 06:17:26PM +0800, Luyao Huang wrote: https://bugzilla.redhat.com/show_bug.cgi?id=1161831 Libvirtd will crash when parameter tcon = NULL in virSecuritySELinuxSetFileconHelper function, because libvirt do not check the

Re: [libvirt] [PATCH v2] phyp: Fix NULL dereference in phypConnectOpen

2014-11-10 Thread Pavel Hrdina
On 11/10/2014 07:41 AM, Martin Kletzander wrote: Coverity found out that commit cd490086 caused a possible NULL pointer dereference. This is due to the fact, that phyp_driver is NULL at the time of closing the socket, instead of connection_data, which kept the socket before the mentioned

Re: [libvirt] [PATCH v2] phyp: Fix NULL dereference in phypConnectOpen

2014-11-10 Thread John Ferlan
On 11/10/2014 01:41 AM, Martin Kletzander wrote: Coverity found out that commit cd490086 caused a possible NULL pointer dereference. This is due to the fact, that phyp_driver is NULL at the time of closing the socket, instead of connection_data, which kept the socket before the mentioned

[libvirt] [PATCH v3 0/2] Numa : Allow specification of memory units

2014-11-10 Thread Prerna Saxena
Present XML specification of NUMA node accepts memory in 'KiB' only. This series adds support for input of cell memory in units of choice. Description: === Patch 1/2 : Export virDomainParseMemory for use outside domain_conf Patch 2/2 : Allow specification of 'units' for NUMA nodes.

[libvirt] [PATCH v3 1/2] Extend virDomainParseMemory for use outside domain_conf

2014-11-10 Thread Prerna Saxena
From 4978c8c2df19bdf738695d6cc64864f11071a08e Mon Sep 17 00:00:00 2001 From: Prerna Saxena pre...@linux.vnet.ibm.com Date: Mon, 10 Nov 2014 14:48:03 +0530 Commit 01b4de2b9f5ca82 abstracts virDomainParseMemory() for use by other functions in domain_conf.c Extend the same for use, for functions

[libvirt] [PATCH v3 2/2] Numa : Allow specification of 'units' for numa nodes.

2014-11-10 Thread Prerna Saxena
From 1ead736712eec3bd098daf222a872c67b67e94ce Mon Sep 17 00:00:00 2001 From: Prerna Saxena pre...@linux.vnet.ibm.com Date: Mon, 3 Nov 2014 07:53:59 +0530 CPU numa topology implicitly allows memory specification in 'KiB'. Enabling this to accept the 'unit' in which memory needs to be specified.

Re: [libvirt] [PATCH v6 0/7] qemu: Introduce support for new the block_set_io_throttle parameters add in the version 1.7 of qemu.

2014-11-10 Thread Matthias Gatto
On Fri, Nov 7, 2014 at 4:56 PM, Michal Privoznik mpriv...@redhat.com wrote: On 29.10.2014 13:15, Matthias Gatto wrote: This series of patches add support for bps_max, bps_rd_max, bps_wr_max, bps_max, bps_rd_max, bps_wr_max, and iops_size in the functions qemuDomainSetBlockIoTune and

[libvirt] [PATCH v7 4/7] qemu: Add bps_max and friends qemu driver

2014-11-10 Thread Matthias Gatto
Add support for bps_max and friends in the driver part. In the part checking if a qemu is running, check if the running binary support bps_max, if not print an error message, if yes add it to info variable This patch follow therse patchs:

[libvirt] [PATCH 2/3] lxc: don't setup cpuset.mems if memory mode in numatune is not 'strict'

2014-11-10 Thread Wang Rui
If the memory mode in numatune is not 'strict', we should not setup cpuset.mems. Before commit 1a7be8c600905aa07ac2d78293336ba8523ad48e we have checked the memory mode in virDomainNumatuneGetNodeset. This patch adds the check as before. Signed-off-by: Wang Rui moon.wang...@huawei.com ---

[libvirt] [PATCH 3/3] qemu: fix domain startup failing with 'strict' mode in numatune

2014-11-10 Thread Wang Rui
If the memory mode is specified as 'strict' and with one node, we get the following error when starting domain. error: Unable to write to '$cgroup_path/cpuset.mems': Device or resource busy XML is configured with numatune as follows: numatune memory mode='strict' nodeset='0'/ /numatune

[libvirt] [PATCH 1/3] qemu: don't setup cpuset.mems if memory mode in numatune is not 'strict'

2014-11-10 Thread Wang Rui
If the memory mode in numatune is specified as 'preferred' with one node (such as nodeset='0'), domain's memory is not all in node 0 absolutely. Assumption that node 0 doesn't have enough memory, memory can be allocated on node 1 when qemu process startup. Then if we set cpuset.mems to '0', it may

[libvirt] [PATCH V2 0/3] Fix some problems of numatune

2014-11-10 Thread Wang Rui
Fix startup failing with memory mode(strict, preferred or interleave) in numatune V1: https://www.redhat.com/archives/libvir-list/2014-November/msg00057.html V2 has been revised as Martin' suggestion. Wang Rui (3): qemu: don't setup cpuset.mems if memory mode in numatune is not 'strict'

Re: [libvirt] [PATCH v3 2/2] Numa : Allow specification of 'units' for numa nodes.

2014-11-10 Thread Michal Privoznik
On 10.11.2014 12:52, Prerna Saxena wrote: From 1ead736712eec3bd098daf222a872c67b67e94ce Mon Sep 17 00:00:00 2001 From: Prerna Saxena pre...@linux.vnet.ibm.com Date: Mon, 3 Nov 2014 07:53:59 +0530 CPU numa topology implicitly allows memory specification in 'KiB'. Enabling this to

Re: [libvirt] [PATCH] nodeinfo: report error when failure in nodeSetMemoryParameters

2014-11-10 Thread Pavel Hrdina
On 11/07/2014 11:27 AM, Jincheng Miao wrote: nodeSetMemoryParameters() will call nodeSetMemoryParameterValue() to set parameters. But it just filter the return code '-2' as failure. Indeed we should report error when rc is negative. https://bugzilla.redhat.com/show_bug.cgi?id=1161541

Re: [libvirt] [PATCH v3 1/2] Extend virDomainParseMemory for use outside domain_conf

2014-11-10 Thread Michal Privoznik
On 10.11.2014 12:52, Prerna Saxena wrote: From 4978c8c2df19bdf738695d6cc64864f11071a08e Mon Sep 17 00:00:00 2001 From: Prerna Saxena pre...@linux.vnet.ibm.com Date: Mon, 10 Nov 2014 14:48:03 +0530 Commit 01b4de2b9f5ca82 abstracts virDomainParseMemory() for use by other functions in

Re: [libvirt] [PATCH v3 0/2] Numa : Allow specification of memory units

2014-11-10 Thread Michal Privoznik
On 10.11.2014 12:49, Prerna Saxena wrote: Present XML specification of NUMA node accepts memory in 'KiB' only. This series adds support for input of cell memory in units of choice. Description: === Patch 1/2 : Export virDomainParseMemory for use outside domain_conf Patch 2/2 : Allow

Re: [libvirt] [PATCHv2 1/2] Use UPDATE_CPU when saving domain status

2014-11-10 Thread Pavel Hrdina
On 11/07/2014 10:55 AM, Ján Tomko wrote: We only format cpu model for MODE_CUSTOM in domain status XML, but we always format features if they are present. This is a problem if we have a domain using MODE_HOST_PASSTHROUGH that has been managedsaved, then restored, since it now has a feature list

Re: [libvirt] [PATCHv2 0/2] Fix snapshot-revert and managedsave with host-passthrough CPU mode

2014-11-10 Thread Pavel Hrdina
On 11/07/2014 10:55 AM, Ján Tomko wrote: Ján Tomko (2): Use UPDATE_CPU when saving domain status Ignore missing CPU model for HOST_PASSTHROUGH src/conf/cpu_conf.c| 4 +- src/conf/domain_conf.c | 1 +

[libvirt] Problem with virInterfaceCreate(), IFF_UP, and NetworkManager

2014-11-10 Thread Laine Stump
Due to a checkered past (a myriad of minor issues, changing over time), libvirt's semi-official position on the virInterface*() APIs and NetworkManager is that virInterface*() is only supported if NM is disabled. We do still attempt to make it work as well as possible, but normally I only test

[libvirt] [PATCH] qemu: Always set migration capabilities

2014-11-10 Thread Jiri Denemark
We used to set migration capabilities only when a user asked for them in flags. This is fine when migration succeeds since the QEMU process is killed in the end but in case migration fails or if it's cancelled, some capabilities may remain turned on with no way to turn them off. To fix that,

[libvirt] [PATCH 0/2] Fix errors on unsuccessful chardev hotplug

2014-11-10 Thread Ján Tomko
Ján Tomko (2): Fix crash after attempting to hotplug a spicevmc channel Display nicer error message for unsupported chardev hotplug src/conf/domain_conf.c | 3 +-- src/qemu/qemu_monitor_json.c | 12 +--- 2 files changed, 10 insertions(+), 5 deletions(-) -- 2.0.4 --

[libvirt] [PATCH 2/2] Display nicer error message for unsupported chardev hotplug

2014-11-10 Thread Ján Tomko
Use the device type name if we know it instead of its number, even if we can't hotplug it: qemuMonitorJSONAttachCharDevCommand:6094 : operation failed: Unsupported char device type '10' --- src/qemu/qemu_monitor_json.c | 12 +--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git

Re: [libvirt] [PATCH] qemu: Always set migration capabilities

2014-11-10 Thread Jiri Denemark
On Mon, Nov 10, 2014 at 16:41:23 +0100, Jiri Denemark wrote: We used to set migration capabilities only when a user asked for them in flags. This is fine when migration succeeds since the QEMU process is killed in the end but in case migration fails or if it's cancelled, some capabilities may

Re: [libvirt] [PATCH v7 4/7] qemu: Add bps_max and friends qemu driver

2014-11-10 Thread Michal Privoznik
On 10.11.2014 16:19, Matthias Gatto wrote: Add support for bps_max and friends in the driver part. In the part checking if a qemu is running, check if the running binary support bps_max, if not print an error message, if yes add it to info variable This patch follow therse patchs:

Re: [libvirt] [PATCH v7 4/7] qemu: Add bps_max and friends qemu driver

2014-11-10 Thread Matthias Gatto
On Mon, Nov 10, 2014 at 5:25 PM, Michal Privoznik mpriv...@redhat.com wrote: On 10.11.2014 16:19, Matthias Gatto wrote: Add support for bps_max and friends in the driver part. In the part checking if a qemu is running, check if the running binary support bps_max, if not print an error

[libvirt] 回复:How do I get the progress of a long operation

2014-11-10 Thread windy
Hi All: In recent days, I have studied the libvirt event model, but found nothing I wanted. In my requirement, I want to get the progress of long operations,especially snapshot taking and revcovering. Today, I studied how virsh migrate command realised, I found that the process of

Re: [libvirt] Problem with virInterfaceCreate(), IFF_UP, and NetworkManager

2014-11-10 Thread Michal Privoznik
On 10.11.2014 16:41, Laine Stump wrote: Due to a checkered past (a myriad of minor issues, changing over time), libvirt's semi-official position on the virInterface*() APIs and NetworkManager is that virInterface*() is only supported if NM is disabled. We do still attempt to make it work as well

Re: [libvirt] [PATCH 2/2] Display nicer error message for unsupported chardev hotplug

2014-11-10 Thread Pavel Hrdina
On 11/10/2014 04:57 PM, Ján Tomko wrote: Use the device type name if we know it instead of its number, even if we can't hotplug it: qemuMonitorJSONAttachCharDevCommand:6094 : operation failed: Unsupported char device type '10' --- src/qemu/qemu_monitor_json.c | 12 +--- 1 file

Re: [libvirt] [PATCH 1/2] Fix crash after attempting to hotplug a spicevmc channel

2014-11-10 Thread Pavel Hrdina
On 11/10/2014 04:56 PM, Ján Tomko wrote: In qemuDomainAttachChrDevice, we add the device to the domain XML, then we fail to construct the JSON command, saying we don't support it. But we don't clean up the device from the domain XML, because virDomainChrEquals returns false when comparing the

Re: [libvirt] 回复:How do I get the progress of a long operation

2014-11-10 Thread Eric Blake
On 11/10/2014 09:37 AM, windy wrote: Hi All: [please don't top-post on technical lists; also, please configure your mailer to wrap long lines] In recent days, I have studied the libvirt event model, but found nothing I wanted. In my requirement, I want to get the progress of long

Re: [libvirt] Problem with virInterfaceCreate(), IFF_UP, and NetworkManager

2014-11-10 Thread Daniel P. Berrange
On Mon, Nov 10, 2014 at 10:41:26AM -0500, Laine Stump wrote: On a seemingly unrelated note, a few months ago mprivozn pushed a patch that makes it an error to call virInterfaceCreate() (i.e. ifup) for an interface that is already active. (the active state of an interface is determined by

[libvirt] LSN-2014-0007: CVE-2014-7823 virDomainGetXMLDesc leaks VNC passwords

2014-11-10 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Libvirt Security Notice: LSN-2014-0007 == Summary: virDomainGetXMLDesc leaks VNC passwords Reported on: 20141031 Published on: 20141105 Fixed on: 20141106 Reported by: Eric

Re: [libvirt] [PATCH] network: Add bandwidth support to ethernet interface

2014-11-10 Thread Anirban Chakraborty
On 11/3/14, 2:58 AM, Michal Privoznik mpriv...@redhat.com wrote: On 30.10.2014 00:56, Anirban Chakraborty wrote: snip +static inline bool virNetDevSupportBandwidth(virDomainNetType type) +{ +switch (type) { +case VIR_DOMAIN_NET_TYPE_BRIDGE: +case VIR_DOMAIN_NET_TYPE_NETWORK:

[libvirt] [PATCH v2 5/5] storage: Introduce 'managed' for the fchost parent

2014-11-10 Thread John Ferlan
https://bugzilla.redhat.com/show_bug.cgi?id=1160926 Introduce a 'managed' attribute to allow libvirt to decide whether to delete a vHBA vport created via external means such as nodedev-create. The code currently decides whether to delete the vHBA based solely on whether the parent was provided at

[libvirt] [PATCH v2 3/5] storage: Don't use a stack copy of the adapter

2014-11-10 Thread John Ferlan
https://bugzilla.redhat.com/show_bug.cgi?id=1160926 Passing a copy of the storage pool adapter to a function just changes the copy of the fields in the particular function and then when returning to the caller those changes are discarded. While not yet biting us in the storage clean-up case, it

[libvirt] [PATCH v2 4/5] storage: Introduce virStoragePoolSaveConfig

2014-11-10 Thread John Ferlan
https://bugzilla.redhat.com/show_bug.cgi?id=1160926 Introduce the ability to save a configuration of a persistent configuration that may be changed by storage pool backend activity, such as start or stop Signed-off-by: John Ferlan jfer...@redhat.com --- src/conf/storage_conf.c | 37

[libvirt] [PATCH v2 2/5] storage: Ensure fc_host parent matches wwnn/wwpn

2014-11-10 Thread John Ferlan
https://bugzilla.redhat.com/show_bug.cgi?id=1160565 The existing code assumed that the configuration of a 'parent' attribute was correct for the createVport path. As it turns out, that may not be the case which leads errors during the deleteVport path because the wwnn/wwpn isn't associated with

[libvirt] [PATCH v2 1/5] storage: Check for valid fc_host parent at startup

2014-11-10 Thread John Ferlan
https://bugzilla.redhat.com/show_bug.cgi?id=1160565 If a 'parent' attribute is provided for the fchost, then at startup time check to ensure it is a vport capable scsi_host. If the parent is not vport capable, then disallow the startup. The following is the expected results: error: Failed to

[libvirt] [PATCH v2 0/5] Resolve fc_host startup, shutdown issues

2014-11-10 Thread John Ferlan
This series will replace: http://www.redhat.com/archives/libvir-list/2014-November/msg00197.html There are two bugs being fixed here and having them reviewed together makes things easier in the long run as the last 3 patches depended upon the first 2 being present.

Re: [libvirt] [PATCH] network: Add bandwidth support to ethernet interface

2014-11-10 Thread Eric Blake
On 11/10/2014 03:41 PM, Anirban Chakraborty wrote: BTW: it would be nice if you can version you patches. I mean, this is what, 4th or 5th version? Say that in subject explicitly please. You know, in the prefix: [PATCH v5] network: ... Using 'git send-email -v5' will do that for you. I was

[libvirt] [PATCH] Fix invalid log, misused option types and a typo

2014-11-10 Thread Hao Liu
This patch fixes the following issues. 1) When an invalid wwn is introduced, libvirt reports Malformed wwn: %s. The template won't be replaced. 2) target option for dompmsuspend and xml option for save-image-define are required options and should use VSH_OT_DATA instead of

Re: [libvirt] [PATCH v3 0/2] Numa : Allow specification of memory units

2014-11-10 Thread Prerna Saxena
On Monday 10 November 2014 07:36 PM, Michal Privoznik wrote: On 10.11.2014 12:49, Prerna Saxena wrote: Present XML specification of NUMA node accepts memory in 'KiB' only. This series adds support for input of cell memory in units of choice. Description: === Patch 1/2 : Export