Re: [libvirt] [PATCH 0/2] Adjustments for configuring volume lun device

2015-08-04 Thread John Ferlan
On 07/18/2015 07:43 AM, John Ferlan wrote: > Resolve a couple of issues regarding failures seen configuring a disk > to be a type='volume' device='lun'. The doc patch just indicates that > using an NPIV storage/source pool is a valid option. The second patch &

Re: [libvirt] [PATCH v2 12/12] conf: Check for hostdev conflicts when assign default disk address

2015-08-04 Thread John Ferlan
On 08/03/2015 09:57 AM, Ján Tomko wrote: > On Wed, Jul 22, 2015 at 10:54:34AM -0400, John Ferlan wrote: >> https://bugzilla.redhat.com/show_bug.cgi?id=1210587 (completed) >> >> When generating the default drive address for a SCSI device, >> check the generated a

Re: [libvirt] [PATCH] conf: Resolve Coverity FORWARD_NULL

2015-08-04 Thread John Ferlan
On 08/04/2015 11:42 AM, Michal Privoznik wrote: > On 04.08.2015 13:11, John Ferlan wrote: >> The recent changes to perform SCSI device address checks during the >> post parse callbacks ran afoul of the Coverity checker since the changes >> assumed that the

Re: [libvirt] [PATCH 3/3] qemu: Return true pining info when using numad

2015-08-04 Thread John Ferlan
$SUBJ s/pining/pinning Or perhaps - "qemu: Use numad information when getting pin information"" On 07/26/2015 12:57 PM, Martin Kletzander wrote: > Pinning information returned for emulatorpin and vcpupin calls is being > returned from our data without querying cgroups for some time. However, >

Re: [libvirt] [PATCH 3/3] qemu: Return true pining info when using numad

2015-08-07 Thread John Ferlan
On 08/07/2015 06:44 AM, Martin Kletzander wrote: > On Tue, Aug 04, 2015 at 09:27:13PM -0400, John Ferlan wrote: >> $SUBJ >> >> s/pining/pinning >> >> Or perhaps - "qemu: Use numad information when getting pin information"" >> > > OK,

Re: [libvirt] [PATCH v2 12/20] cpu: Align ppc64 CPU data with x86

2015-08-07 Thread John Ferlan
On 08/07/2015 11:39 AM, Andrea Bolognani wrote: > Use a typedef instead of the plain struct and heap allocation. This > will make it easier to extend the ppc64 specific CPU data later on. > --- > src/cpu/cpu.h| 2 +- > src/cpu/cpu_ppc64.c | 86 > +++

Re: [libvirt] [PATCH v2 12/20] cpu: Align ppc64 CPU data with x86

2015-08-07 Thread John Ferlan
>> static virCPUDataPtr >> ppc64DriverNodeData(virArch arch) >> { >> -virCPUDataPtr cpuData; >> +virCPUDataPtr nodeData; >> +virCPUppc64Data *data; >> >> -if (VIR_ALLOC(cpuData) < 0) >> -return NULL; >> +if (VIR_ALLOC(nodeData) < 0) >> +goto error; >> >>

Re: [libvirt] [PATCHv3 00/13] Add new PCIe controllers

2015-08-10 Thread John Ferlan
On 08/09/2015 01:39 PM, Laine Stump wrote: > On 08/03/2015 08:33 AM, John Ferlan wrote: >> Like Martin noted, I've been looking through this series as well. I >> too haven't had a ton of time to devote to it over the last week or so >> since I'm in the midd

Re: [libvirt] [PATCH] lib: fix no zero arg check for iothread_id

2015-08-10 Thread John Ferlan
On 08/10/2015 05:23 AM, Peter Krempa wrote: > On Mon, Aug 10, 2015 at 17:06:31 +0800, Luyao Huang wrote: >> https://bugzilla.redhat.com/show_bug.cgi?id=1251886 >> >> We do not allow delete an iothread which id is 0 in >> virDomainDelIOThread, but allow it in virDomainAddIOThread, >> Also we will

Re: [libvirt] [PATCH 2/9] virNetDevBandwidthUpdateRate: turn class_id into integer

2015-08-10 Thread John Ferlan
On 08/03/2015 02:39 AM, Michal Privoznik wrote: > This is no functional change. It's just that later in the series we > will need to pass class_id as an integer. > > Signed-off-by: Michal Privoznik > --- > src/network/bridge_driver.c | 4 ++-- > src/util/virnetdevbandwidth.c | 10 +++---

Re: [libvirt] [PATCH 3/9] bridge_driver: Introduce networkBandwidthChangeAllowed

2015-08-10 Thread John Ferlan
On 08/03/2015 02:39 AM, Michal Privoznik wrote: > When a domain vNIC's bandwidth is to be changed (at runtime) it is > possible that guaranteed minimal bandwidth (@floor) will change too. > Well, so far it is, because we still don't have an implementation that > allows setting it dynamically, so

Re: [libvirt] [PATCH 2/9] virNetDevBandwidthUpdateRate: turn class_id into integer

2015-08-10 Thread John Ferlan
On 08/03/2015 02:39 AM, Michal Privoznik wrote: > This is no functional change. It's just that later in the series we > will need to pass class_id as an integer. > > Signed-off-by: Michal Privoznik > --- > src/network/bridge_driver.c | 4 ++-- > src/util/virnetdevbandwidth.c | 10 +++---

Re: [libvirt] [PATCH 4/9] bridge_driver: Introduce networkBandwidthUpdate

2015-08-10 Thread John Ferlan
On 08/03/2015 02:39 AM, Michal Privoznik wrote: > So, if a domain vNIC's bandwidth has been successfully set, it's > possible that because @floor is set on network's bridge, this > part may need updating too. And that's exactly what this function > does. While the previous commit introduced a fun

Re: [libvirt] [PATCH 5/9] qemuDomainSetInterfaceParameters: Use new functions to update bandwidth

2015-08-10 Thread John Ferlan
On 08/03/2015 02:39 AM, Michal Privoznik wrote: > As sketched in previous commits, imagine the following scenario: > > virsh # domiftune gentoo vnet0 > inbound.average: 100 > inbound.peak : 0 > inbound.burst : 0 > outbound.average: 100 > outbound.peak : 0 > outbound.burst : 0 >

Re: [libvirt] [PATCH 6/9] virsh: Rework parseRateStr

2015-08-10 Thread John Ferlan
On 08/03/2015 02:39 AM, Michal Privoznik wrote: > The function is used to parse a tuple delimited by commas into > virNetDevBandwidth structure. So far only three out of fore > fields are supported: average, peak and burst. The single missing > field is floor. Well, the parsing works, but I think

Re: [libvirt] [PATCH 8/9] virsh: Implement VIR_DOMAIN_BANDWIDTH_IN_FLOOR

2015-08-10 Thread John Ferlan
On 08/03/2015 02:39 AM, Michal Privoznik wrote: > We have a function parseRateStr() that parses --inbound and > --outbound arguments to both attach-interface and domiftune. > Now that we have all virTypedParams macros needed for QoS, > lets parse even floor attribute. The extended format for the

Re: [libvirt] [PATCH 9/9] qemu: Implement VIR_DOMAIN_BANDWIDTH_IN_FLOOR

2015-08-10 Thread John Ferlan
On 08/03/2015 02:39 AM, Michal Privoznik wrote: > Well, there are just two places that needs adjustment: > > qemuDomainGetInterfaceParameters - to report the @floor > qemuDomainSetInterfaceParameters - now that the function has been > fixed, we can allow updating @floor too. > > Signed-off-by:

Re: [libvirt] [PATCH 1/9] virNetDevParseMcast: Avoid magic constant

2015-08-10 Thread John Ferlan
On 08/03/2015 02:39 AM, Michal Privoznik wrote: > There is no guarantee that an enum start it mapped onto a value > of zero. However, we are guaranteed that enum items are > consecutive integers. Moreover, it's a pity to define an enum to > avoid using magical constants but then using them anyway

Re: [libvirt] [PATCH 7/9] Introduce VIR_DOMAIN_BANDWIDTH_IN_FLOOR

2015-08-10 Thread John Ferlan
On 08/03/2015 02:39 AM, Michal Privoznik wrote: > This macro represents the single missing field we don't expose > yet within QoS: inbound.floor. > > Signed-off-by: Michal Privoznik > --- > include/libvirt/libvirt-domain.h | 7 +++ > 1 file changed, 7 insertions(+) > ACK, John -- libvi

Re: [libvirt] [PATCH 8/9] virsh: Implement VIR_DOMAIN_BANDWIDTH_IN_FLOOR

2015-08-11 Thread John Ferlan
On 08/11/2015 06:08 AM, Michal Privoznik wrote: > On 11.08.2015 03:25, John Ferlan wrote: >> >> >> On 08/03/2015 02:39 AM, Michal Privoznik wrote: >>> We have a function parseRateStr() that parses --inbound and >>> --outbound arguments to both attach-interf

Re: [libvirt] [PATCHv2] util: don't overwrite stack when getting ethtool gfeatures

2015-08-11 Thread John Ferlan
On 08/11/2015 02:05 PM, Laine Stump wrote: > This fixes the crash described here: > > https://www.redhat.com/archives/libvir-list/2015-August/msg00162.html > > In short, we were calling ioctl(SIOCETHTOOL) pointing to a too-short > object that was a local on the stack, resulting in the memory p

Re: [libvirt] [PATCH] qemu: fix qemuDomainSupportsPCI() for ARM machines of "virt" machinetype

2015-08-11 Thread John Ferlan
On 08/11/2015 03:03 PM, Laine Stump wrote: > Commit e8d5517 updated the domain post-parse to automatically add > pcie-root et al for certain ARM "virt" machinetypes, but didn't update > the function qemuDomainSupportsPCI() which is called later on when we > are auto-assigning PCI addresses and de

Re: [libvirt] [PATCH] nodedev: Fix gfeature size to be according to running kernel

2015-08-11 Thread John Ferlan
ferent GFEATURE_SIZE values... .. >> virNetDevSendEthtoolIoctl() logs an error message, but it looks like you want >> for an error to be swallowed here (just returning size = 0). If that's the >> case >> then virNetDevSendEthtoolIoctl() needs to be reworked to not log er

Re: [libvirt] [PATCH] domain: Fix crash if trying to live update disk

2015-08-11 Thread John Ferlan
On 08/10/2015 07:33 PM, Cole Robinson wrote: > If you pass XML to UpdateDevice, and the original device > didn't have a block, libvirtd crashes trying to read the original > NULL serial string. > > Use _NULLABLE string comparisons to avoid the crash. A couple other > properties needed the chan

Re: [libvirt] [PATCH] nodedev: Fix gfeature size to be according to running kernel

2015-08-11 Thread John Ferlan
On 08/11/2015 05:24 PM, Moshe Levi wrote: > > >> -Original Message----- >> From: John Ferlan [mailto:jfer...@redhat.com] >> Sent: Wednesday, August 12, 2015 12:01 AM >> To: Moshe Levi; Laine Stump; libvir-list@redhat.com >> Subject: Re: [libvirt] [PAT

Re: [libvirt] [PATCH] domain: Fix crash if trying to live update disk

2015-08-11 Thread John Ferlan
On 08/11/2015 05:28 PM, Cole Robinson wrote: > On 08/11/2015 05:25 PM, John Ferlan wrote: >> >> >> On 08/10/2015 07:33 PM, Cole Robinson wrote: >>> If you pass XML to UpdateDevice, and the original device >>> didn't have a block, libvirtd crashes

Re: [libvirt] [PATCH 2/3] networkBandwidthGenericChecks: Drop useless check

2015-08-12 Thread John Ferlan
On 08/12/2015 05:13 AM, Michal Privoznik wrote: > There's a check right at the beginning of the function that > shortcuts if the function was called over all NULL arguments. > However, this was meant just as a fool-proof check so that we > don't crash if function is used in a bad manner. Anyway,

Re: [libvirt] [PATCH 0/3] Follow up patches for QoS

2015-08-12 Thread John Ferlan
On 08/12/2015 05:13 AM, Michal Privoznik wrote: > Thanks to Peter who made me test this more and find some corner > cases. And even take a look on Coverity output. > > Michal Privoznik (3): > networkBandwidthUpdate: Don't blindly dereference pointers > networkBandwidthGenericChecks: Drop use

[libvirt] [PATCH] conf: Remove 'vmdef' from virDomainHostdevDefParseXML

2015-08-12 Thread John Ferlan
Since it's not used, let's remove it to avoid any future usage. Signed-off-by: John Ferlan --- src/conf/domain_conf.c | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index b743bdd..f66fccd 100644 ---

Re: [libvirt] [PATCH v2 12/12] conf: Check for hostdev conflicts when assign default disk address

2015-08-12 Thread John Ferlan
... >> After looking through the code and thinking more about this - using >> virDomainDefPostParse won't work for the hotplug case since it's only >> going through virDomainDeviceDefParse and virDomainDeviceDefPostParse >> code in order to validate whether the address (whether provided or >> gen

[libvirt] [PATCH] conf: Check for attach disk usage of iothread=0

2015-08-12 Thread John Ferlan
Since iothreadid = 0 is invalid, we need to check for it when attempting to add a disk; otherwise, someone would think/believe their attempt to add an IOThread to the disk would succeed. Luckily other code ignored things when ->iothread == 0... Signed-off-by: John Ferlan --- src/c

Re: [libvirt] [PATCH 6/9] Add functions for adding usb controllers to addrs

2015-08-12 Thread John Ferlan
On 08/12/2015 10:52 AM, Ján Tomko wrote: > --- > src/conf/domain_addr.c | 88 > > src/conf/domain_addr.h | 4 +++ > src/libvirt_private.syms | 1 + > 3 files changed, 93 insertions(+) > Ran the series through Coverity as a first pass...

Re: [libvirt] [PATCH 9/9] Assign addresses on USB device hotplug

2015-08-12 Thread John Ferlan
On 08/12/2015 10:52 AM, Ján Tomko wrote: > USB disks, redirected devices, host devices and serial devices > are supported. > --- > src/conf/domain_addr.c | 34 +++ > src/conf/domain_addr.h | 4 +++ > src/libvirt_private.sym

Re: [libvirt] [PATCH v3 1/4] qemu: Fix segfault when parsing private domain data

2015-08-13 Thread John Ferlan
On 08/13/2015 04:18 AM, Martin Kletzander wrote: > When parsing private domain data, there are two paths that are flawed. > They are both error paths, just from different parts of the function. > One of them can call free() on an uninitialized pointer. Initialization > to NULL is enough here. T

Re: [libvirt] [PATCHv2] nodedev: Fix gfeature size to be according to running kernel

2015-08-13 Thread John Ferlan
On 08/13/2015 06:23 AM, Moshe Levi wrote: > This patch add virNetDevGetGFeaturesSize to get the supported > gfeature size from the kernel > --- > src/util/virnetdev.c | 79 - > 1 files changed, 71 insertions(+), 8 deletions(-) > > diff --git a/s

[libvirt] [PATCH 2/3] api: Adjust comment for virDomainAddIOThread

2015-08-13 Thread John Ferlan
djustments" to the API in the review phase. Signed-off-by: John Ferlan --- src/libvirt-domain.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/libvirt-domain.c b/src/libvirt-domain.c index 9ec66df..405962d 100644 --- a/src/libvirt-domain.c +++ b/src/libvirt-doma

[libvirt] [PATCH 0/3] Some minor IOThread API adjustments/checks

2015-08-13 Thread John Ferlan
othread_id = 0 in qemuDomainPinIOThread since both the live and config paths will first search for the iothread_id value and fail if not found in the iothreadid list. I'm not opposed to adding a specific error message if so desired... John Ferlan (3): api: Remove check o

[libvirt] [PATCH 1/3] api: Remove check on iothread_id arg in virDomainPinIOThread

2015-08-13 Thread John Ferlan
Allow 0 as an iothread_id and force the hypervisor to handle. The qemuDomainPinIOThread API will look up the iothread_id of 0 and not find it and message that anyway. Signed-off-by: John Ferlan --- src/libvirt-domain.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/libvirt-domain.c b

[libvirt] [PATCH 3/3] qemu: Add check for invalid iothread_id in qemuDomainChgIOThread

2015-08-13 Thread John Ferlan
0 was added and that isn't good. It seems during many reviews/edits to the code the check for iothread_id = 0 being invalid was lost - it could have originally been in the API code, but requested to be moved - I cannot remember. Signed-off-by: John Ferlan --- src/qemu/qemu_driver.c | 6

Re: [libvirt] [PATCH 1/9] Remove dead code from qemuDomainAttachControllerDevice

2015-08-13 Thread John Ferlan
On 08/12/2015 10:52 AM, Ján Tomko wrote: > We only support hotplugging SCSI controllers, > USB and virtio-serial related code is useless here. > --- > src/qemu/qemu_hotplug.c | 18 -- > 1 file changed, 18 deletions(-) > It's true that we only call this from two places currently

Re: [libvirt] [PATCH 2/9] Remove unused virDomainVirtioSerialAddrSetRemoveController

2015-08-13 Thread John Ferlan
On 08/12/2015 10:52 AM, Ján Tomko wrote: > This function was never used. > I think that portion could have been removed in 1/9 since that's when you removed the unreachable 'external' call to it. > Also mark virDomainVirtioSerialAddrSetAddController as static. And this just becomes 2/9 > --

Re: [libvirt] [PATCH 3/9] Store USB port path as an array of integers

2015-08-13 Thread John Ferlan
On 08/12/2015 10:52 AM, Ján Tomko wrote: > In preparation to tracking which USB addresses are occupied. > Introduce two helper functions for printing the port path > as a string and appending it to a virBuffer. > --- > src/conf/domain_addr.c | 25 + > src/conf/domain_ad

Re: [libvirt] [PATCH 4/9] Add newDomain parameter to qemuDomainAssignAddresses

2015-08-13 Thread John Ferlan
On 08/12/2015 10:52 AM, Ján Tomko wrote: > To differentiate a new domain from an existing one. > --- > src/qemu/qemu_command.c | 5 - > src/qemu/qemu_command.h | 3 ++- > src/qemu/qemu_driver.c | 22 +++--- > src/qemu/qemu_process.c | 6 +++--- > tests/qemuhotplugtest

[libvirt] [PATCH] qemu: Resolve Coverity UNINIT

2015-08-15 Thread John Ferlan
Coverity complained that 'vm' wasn't initialized before jumping to cleanup: and calling virDomainObjEndAPI if the VIR_STRDUP fails. Rather than initialize vm = NULL, I moved the VIR_STRDUP closer to usage and used endjob for goto. Signed-off-by: John Ferlan --- src/qemu/qe

Re: [libvirt] [PATCH] qemu: Resolve Coverity UNINIT

2015-08-15 Thread John Ferlan
On 08/15/2015 10:54 AM, Martin Kletzander wrote: > On Sat, Aug 15, 2015 at 09:18:14AM -0400, John Ferlan wrote: >> Coverity complained that 'vm' wasn't initialized before jumping to >> cleanup: and calling virDomainObjEndAPI if the VIR_STRDUP fails. >> Rathe

Re: [libvirt] [PATCH 0/2] 2 small fix for domrename

2015-08-17 Thread John Ferlan
On 08/17/2015 01:21 AM, Luyao Huang wrote: > *** BLURB HERE *** > > Luyao Huang (2): > virsh: fix always return false in domrename > libvirt-domain: forbid use virDomainRename in readonly connection > > src/libvirt-domain.c | 1 + > tools/virsh-domain.c | 2 +- > 2 files changed, 2 inserti

Re: [libvirt] [PATCH 0/5] Make sure internal blkiotune values are in sync

2015-08-18 Thread John Ferlan
On 08/03/2015 10:50 AM, Martin Kletzander wrote: > We were blindly setting blkiotune values for devices, but kernel can > throw some of them away. This series reworks the logic the same > wayother tuning values are updated. That is, after the value gets > set, it is read back again to make sure

Re: [libvirt] [PATCH 3/5] util: Add getters for cgroup block device I/O throttling

2015-08-18 Thread John Ferlan
On 08/03/2015 10:50 AM, Martin Kletzander wrote: > Since now they were not needed, but I sense they will be in a short > while. > > Signed-off-by: Martin Kletzander > --- > src/libvirt_private.syms | 5 + > src/util/vircgroup.c | 277 > ++- >

Re: [libvirt] [PATCH] qemu: fix not update weight in def after success

2015-08-18 Thread John Ferlan
On 08/12/2015 09:53 PM, Luyao Huang wrote: > https://bugzilla.redhat.com/show_bug.cgi?id=1253107 > > Update the weight in vm def to fix this. > > Signed-off-by: Luyao Huang > --- > src/qemu/qemu_driver.c | 2 ++ > 1 file changed, 2 insertions(+) > Considering the series I recently ACK from

Re: [libvirt] [PATCH] qemu: fix the error cover issue in qemuDomainAddCgroupForThread

2015-08-18 Thread John Ferlan
On 08/14/2015 02:59 AM, Luyao Huang wrote: > Just like commit 704cf06, the error already will be set in > virCgroup* function, and virCgroupAddTask will return -1, > so We will always report error "Operation not permitted" > in this place. > > Signed-off-by: Luyao Huang > --- > src/qemu/qemu_d

Re: [libvirt] [PATCH] conf: Check for attach disk usage of iothread=0

2015-08-18 Thread John Ferlan
On 08/12/2015 05:27 PM, John Ferlan wrote: > Since iothreadid = 0 is invalid, we need to check for it when attempting > to add a disk; otherwise, someone would think/believe their attempt to > add an IOThread to the disk would succeed. Luckily other code ignored > things when -&g

Re: [libvirt] [PATCH] storage: only run safezero if allocation is > 0

2015-08-24 Thread John Ferlan
On 08/24/2015 05:44 AM, Martin Kletzander wrote: > On Sun, Aug 23, 2015 at 10:14:29PM +0200, Guido Günther wrote: >> While a zero allocation in safezero should be fine it isn't when we use >> posix_fallocate which returns EINVAL on a zero allocation. >> >> While we could skip the zero allocation

Re: [libvirt] [PATCH 2/2] Rename page about vz driver

2015-08-25 Thread John Ferlan
On 08/21/2015 05:44 PM, Sergey Bronnikov wrote: > --- > docs/{drvparallels.html.in => drvvirtuozzo.html.in} | 0 > 1 file changed, 0 insertions(+), 0 deletions(-) > rename docs/{drvparallels.html.in => drvvirtuozzo.html.in} (100%) > > diff --git a/docs/drvparallels.html.in b/docs/drvvirtuozzo.

Re: [libvirt] [PATCH 1/2] Parallels driver was renamed to Virtuozzo. Replace old name by new one on libvirt site

2015-08-25 Thread John Ferlan
On 08/21/2015 05:43 PM, Sergey Bronnikov wrote: > --- > docs/api.html.in | 2 +- > docs/drivers.html.in | 2 +- > docs/drvparallels.html.in | 24 > docs/formatdomain.html.in | 6 +++--- > docs/index.html.in| 2 +- > docs/sche

Re: [libvirt] [PATCHv2] utils: Remove the logging of errors from virNetDevSendEthtoolIoctl

2015-08-25 Thread John Ferlan
On 08/18/2015 04:58 PM, Moshe Levi wrote: > This patch remove the logging of errors of ioctl api and instead > let the caller to choose what errors to log > --- > src/util/virnetdev.c | 56 ++--- > 1 files changed, 16 insertions(+), 40 deletions(-) >

Re: [libvirt] [PATCHv2] qemu: fix not update weight in def after success

2015-08-25 Thread John Ferlan
On 08/18/2015 11:56 PM, Luyao Huang wrote: > https://bugzilla.redhat.com/show_bug.cgi?id=1253107 > > Call virCgroupGetBlkioWeight to re-read blkio.weight right > after it are set in order to keep our internal structures > up-to-date. > > Signed-off-by: Luyao Huang > --- > src/qemu/qemu_driver

Re: [libvirt] [PATCH] Fix link to page for Virtuozzo driver

2015-08-26 Thread John Ferlan
On 08/26/2015 07:34 AM, Sergey Bronnikov wrote: > --- > docs/index.html.in | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > Ugh... missed that ;-) ACK and pushed. John -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [PATCHv2 0/2] qemu: fix the audit log is not correct for memory device

2015-08-26 Thread John Ferlan
On 08/13/2015 10:15 AM, Luyao Huang wrote: > First review: > http://www.redhat.com/archives/libvir-list/2015-July/msg00982.html > > Change in v2: > - split it to two patches > - fix some small mistake in hot-unplug part > > I change the code in qemuDomainAttachMemory like what we do in other at

Re: [libvirt] [python PATCH] examples: small fix for nodestats.py example

2015-08-26 Thread John Ferlan
On 07/30/2015 10:19 PM, Luyao Huang wrote: > Add nodestats.py in MANIFEST.in and add a > small description for nodestats.py in README > > Signed-off-by: Luyao Huang > --- > MANIFEST.in | 1 + > examples/README | 3 +++ > 2 files changed, 4 insertions(+) > ACK and pushed. John -- libvir

Re: [libvirt] [PATCH] virsh: Remove when changing cdrom media source

2015-08-26 Thread John Ferlan
On 07/28/2015 09:56 AM, Peter Krempa wrote: > Since the code is changing the source image path by modifying the > existing XML snippet the element does not get dropped. > > The element is ignored though but it might start being used in the > future. > > Before this patch, you'd get: > $ virsh

Re: [libvirt] [PATCH v3] lxc: Inherit namespace feature

2015-08-27 Thread John Ferlan
On 08/14/2015 08:09 AM, Daniel P. Berrange wrote: > From: Imran Khan > > This patch adds feature for lxc containers to inherit namespaces. > This is very similar to what lxc-tools or docker provides. Look > for "man lxc-start" and you will find that you can pass command > args as [ --share-[ne

[libvirt] [PATCH] lxc: Resolve Coverity RESOURCE_LEAK

2015-08-27 Thread John Ferlan
Commit id 'c27553b6e' added a return -1 in a failure path without also VIR_FREE(stack) Signed-off-by: John Ferlan --- src/lxc/lxc_container.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lxc/lxc_container.c b/src/lxc/lxc_container.c index feb8fad..125e1c8 100644 ---

Re: [libvirt] [PATCH 3/4] lxc_container: Turn lxcAttachNS into calling virProcessSetNamespaces

2015-08-28 Thread John Ferlan
On 08/26/2015 09:06 PM, Michal Privoznik wrote: > Now that virProcessSetNamespaces() does accept FD list in the > correct format, we can simply turn lxcAttachNS into calling > virProcessSetNamespaces(). > > Signed-off-by: Michal Privoznik > --- > src/lxc/lxc_container.c | 22 +++---

Re: [libvirt] [PATCH 5/9] Introduce virDomainUSBAddressSet

2015-08-28 Thread John Ferlan
Picking up where I left off (more or less) before KVM Forum... I think I need a virtual whiteboard... I tried reviewing patches 5 -> 7 together - going back and forth. Hopefully I haven't left (m)any disjoint thoughts... I have left some thoughts on the way through - some just to make sure I'm fo

Re: [libvirt] [PATCH 6/9] Add functions for adding usb controllers to addrs

2015-08-28 Thread John Ferlan
Perhaps needs a bit more meat/description for the commit message... On 08/12/2015 10:52 AM, Ján Tomko wrote: > --- > src/conf/domain_addr.c | 88 > > src/conf/domain_addr.h | 4 +++ > src/libvirt_private.syms | 1 + > 3 files changed, 93 in

Re: [libvirt] [PATCH 7/9] Reserve existing USB addresses

2015-08-28 Thread John Ferlan
On 08/12/2015 10:52 AM, Ján Tomko wrote: > If USB addresses have been provided for all USB devices, > or we are defining a new domain, reserve the addresses. > > Check if they fit on the USB controllers the domain has, > and error out if two devices try to use the same address. > > Do not error

Re: [libvirt] [PATCH 8/9] Assign addresses to USB devices

2015-08-28 Thread John Ferlan
On 08/12/2015 10:52 AM, Ján Tomko wrote: > Automatically assign addresses to USB devices. > > Just like reserving, this is only done for newly defined domains. > > https://bugzilla.redhat.com/show_bug.cgi?id=1215968 > --- > src/conf/domain_addr.c | 88 > +++

Re: [libvirt] [PATCH 9/9] Assign addresses on USB device hotplug

2015-08-28 Thread John Ferlan
On 08/12/2015 10:52 AM, Ján Tomko wrote: > USB disks, redirected devices, host devices and serial devices > are supported. > --- > src/conf/domain_addr.c | 34 +++ > src/conf/domain_addr.h | 4 +++ > src/libvirt_private.sym

[libvirt] [PATCH] qemu: Need to check for machine.os when using ADDRESS_TYPE_CCW

2015-08-31 Thread John Ferlan
inactive guest, an addition followed by a start would cause the startup to fail after qemu_command builds the command line and attempts to start the guest. For an active guest, libvirtd would crash. Signed-off-by: John Ferlan --- NOTE: For 'rng' in qemu_command - rather than change each

[libvirt] [PATCH 0/4] Resolve a few NFS root-squash related issues

2015-09-01 Thread John Ferlan
e last 3 patches are very much so related and intertwined. Fortunately it's a very limited environment. John Ferlan (4): virfile: Add error for root squash change mode failure virfile: Introduce virFileUnlink storage: Correct the 'mode' check storage: Handle failur

[libvirt] [PATCH 4/4] storage: Handle failure from refreshVol

2015-09-01 Thread John Ferlan
n the server and cause a libvirtd crash because 'voldef' would be in the pool list, but the cleanup code would free it. Signed-off-by: John Ferlan --- src/storage/storage_driver.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/storage/storage_driver.

[libvirt] [PATCH 1/4] virfile: Add error for root squash change mode failure

2015-09-01 Thread John Ferlan
This will only be seen when debugging, but in order to help determine whether a virFileOpenForceOwnerMode failed during an NFS root-squash volume/file creation, add an error message from the child. Signed-off-by: John Ferlan --- src/util/virfile.c | 7 ++- 1 file changed, 6 insertions(+), 1

[libvirt] [PATCH 2/4] virfile: Introduce virFileUnlink

2015-09-01 Thread John Ferlan
ommand under the uid/gid of the child. Unlike the other two, don't retry on EACCES (that's why we're here doing this now). Signed-off-by: John Ferlan --- src/libvirt_private.syms | 1 + src/storage/storage_backend_fs.c | 3 +- src

[libvirt] [PATCH 3/4] storage: Correct the 'mode' check

2015-09-01 Thread John Ferlan
d value. This patch fixes the issue to check if the 'mode' was provided in the XML and use that value. Signed-off-by: John Ferlan --- src/storage/storage_backend.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/storage/storage_backend.c b/src/storage/s

Re: [libvirt] [PATCH 4/4] storage: Handle failure from refreshVol

2015-09-02 Thread John Ferlan
On 09/02/2015 08:25 AM, Ján Tomko wrote: > On Tue, Sep 01, 2015 at 08:55:58PM -0400, John Ferlan wrote: >> In an NFS root-squash environment it was possible that if the just >> created volume from XML wasn't properly created with the right >> uid/gid and/or mode, th

Re: [libvirt] [PATCH] qemu: Check address when attaching a virtio disk with an invalid address.

2015-09-02 Thread John Ferlan
On 09/02/2015 04:50 AM, rbian wrote: > https://bugzilla.redhat.com/show_bug.cgi?id=1257844 > > Attach-device can hotplug a virtio disk device with any address now. > It need to validate the address before the attachment. This patch > fix the problem. > > Signed-off-by: rbian > --- > src/qemu/

[libvirt] [PATCH v2 0/2] Need to perform address checks for ccw/s390

2015-09-03 Thread John Ferlan
a network device there is/was none of the set the default address if undefined code added. John Ferlan (2): qemu: Introduce qemuDomainMachineIsS390CCW qemu: Need to check for machine.os when using ADDRESS_TYPE_CCW src/qemu/qemu_command.c | 55

[libvirt] [PATCH v2 2/2] qemu: Need to check for machine.os when using ADDRESS_TYPE_CCW

2015-09-03 Thread John Ferlan
correct machine.os and emulator. For an inactive guest, an addition followed by a start would cause the startup to fail after qemu_command builds the command line and attempts to start the guest. For an active guest, libvirtd would crash. Signed-off-by: John Ferlan --- src/qemu/qemu_command.c

[libvirt] [PATCH v2 1/2] qemu: Introduce qemuDomainMachineIsS390CCW

2015-09-03 Thread John Ferlan
Rather than have different usages of STR function in order to determine whether the domain is s390-ccw or s390-ccw-virtio, make a single API which will check the machine.os prefix. Then use the function. Signed-off-by: John Ferlan --- src/qemu/qemu_command.c | 4 ++-- src/qemu/qemu_domain.c

Re: [libvirt] [PATCH v2 2/2] virsh: Enhance the detailed output of domblklist for networked source

2015-09-03 Thread John Ferlan
On 09/02/2015 11:58 AM, Michal Privoznik wrote: > From: Lin Ma > > Format & output more detailed information about networked source > > e.g: The output without the patch: > $ virsh domblklist $DOMAIN --details > Type Device Target Source >

Re: [libvirt] [PATCH V2] libxl: don't overwrite error from virNetSocketNewConnectTCP()

2015-09-03 Thread John Ferlan
On 09/03/2015 01:40 PM, Jim Fehlig wrote: > Remove redundant error reporting in libxlDomainMigrationPerform(). > virNetSocketNewConnectTCP() is perfectly capable of reporting > sensible errors. > > Signed-off-by: Jim Fehlig > --- > > V2: > Actually try to compile the code and find saved_errno

Re: [libvirt] [PATCH v2 2/2] virsh: Enhance the detailed output of domblklist for networked source

2015-09-04 Thread John Ferlan
On 09/04/2015 04:26 AM, Michal Privoznik wrote: > On 03.09.2015 22:47, John Ferlan wrote: >> >> >> On 09/02/2015 11:58 AM, Michal Privoznik wrote: >>> From: Lin Ma >>> >>> Format & output more detailed information about networked source &g

[libvirt] [PATCH 2/5] lxc: Avoid Coverity SIZEOF_MISMATCH

2015-09-04 Thread John Ferlan
Commit id '692e9fac7' used virProcessSetNamespaces instead of inlining the similar functionality; however, Coverity notes that the function prototype expects a size_t value and not an enum and complains. So, just pass as a size_t to avoid the noise. Signed-off-by: John Ferlan --

[libvirt] [PATCH 1/5] qemu: Check virGetLastError return value for migration finish failure

2015-09-04 Thread John Ferlan
Commit id '2e7cea243' added a check for an error from Finish instead of 'unexpected error'; however, if for some reason there wasn't an error, then virGetLastError could return NULL resulting in the NULL pointer deref to err->domain. Signed-off-by: John Ferlan --- s

[libvirt] [PATCH 5/5] conf: Remove need for a couple of sa_asserts

2015-09-04 Thread John Ferlan
Remove the need for a couple of sa_asserts. Signed-off-by: John Ferlan --- src/conf/domain_conf.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index f95190f..6df1618 100644 --- a/src/conf/domain_conf.c +++ b/src

[libvirt] [PATCH 4/5] util: Avoid Coverity FORWARD_NULL

2015-09-04 Thread John Ferlan
Coverity claims it could be possible to call virDBusTypeStackFree with *stack == NULL and although the two API's that call it don't appear to allow that - I suppose it's better to be safe than sorry Signed-off-by: John Ferlan --- src/util/virdbus.c | 4 1 file change

[libvirt] [PATCH 3/5] virfile: Avoid Coverity IDENTICAL_BRANCHES error

2015-09-04 Thread John Ferlan
In virFileNBDDeviceFindUnused if virFileNBDDeviceIsBusy returns 0, then both branches jumped to cleanup, so just use ignore_value since the function returns NULL or some memory and the caller handles the error. Signed-off-by: John Ferlan --- src/util/virfile.c | 3 +-- 1 file changed, 1

[libvirt] [PATCH 0/5] Resolve some Coverity related errors

2015-09-04 Thread John Ferlan
y desired, but it was just easier to keep as one. John Ferlan (5): qemu: Check virGetLastError return value for migration finish failure lxc: Avoid Coverity SIZEOF_MISMATCH virfile: Avoid Coverity IDENTICAL_BRANCHES error util: Avoid Coverity FORWARD_NULL conf: Remove need for a couple of s

Re: [libvirt] [PATCH 2/5] lxc: Avoid Coverity SIZEOF_MISMATCH

2015-09-04 Thread John Ferlan
On 09/04/2015 01:41 PM, Laine Stump wrote: > On 09/04/2015 10:30 AM, John Ferlan wrote: >> Commit id '692e9fac7' used virProcessSetNamespaces instead of inlining >> the similar functionality; however, Coverity notes that the function >> prototype expects a s

Re: [libvirt] [PATCH] util: Add win32 version of virFileUnlink

2015-09-08 Thread John Ferlan
On 09/07/2015 04:25 AM, Martin Kletzander wrote: > Commit 35847860f65f Added the virFileUnlink function, but failed to add > a version for mingw build, causing the following error: > > Cannot export virFileUnlink: symbol not defined > > Signed-off-by: Martin Kletzander > --- > src/util/virf

[libvirt] [PATCH] qemu: Check for existence of auto-generated socket path before removing

2015-09-15 Thread John Ferlan
e attemping the directory delete for existence. Signed-off-by: John Ferlan --- src/qemu/qemu_process.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index ce2c70c..b55eb52 100644 --- a/src/qemu/qemu_process.c +++ b/src/qemu

Re: [libvirt] [PATCH] libxl: open libxl log stream with libvirtd log_level

2015-09-15 Thread John Ferlan
On 09/15/2015 01:21 PM, Jim Fehlig wrote: > Daniel P. Berrange wrote: >> On Tue, Sep 15, 2015 at 10:57:50AM -0600, Jim Fehlig wrote: >> >>> Daniel P. Berrange wrote: >>> On Tue, Sep 15, 2015 at 09:26:23AM -0600, Jim Fehlig wrote: > Instead of a hardcoded DEBUG

Re: [libvirt] [PATCH v2] virsh: Teach attach-interface to --print-xml

2015-09-16 Thread John Ferlan
On 09/10/2015 04:31 AM, Michal Privoznik wrote: > We have the same argument to many other commands that produce an > XML based on what user typed. But unfortunately attach-interface > was missing it. Maybe nobody had needed it yet. Well, I did > just now. > > Signed-off-by: Michal Privoznik > -

Re: [libvirt] [PATCH] qemu: Check for existence of auto-generated socket path before removing

2015-09-16 Thread John Ferlan
On 09/16/2015 09:05 AM, Michal Privoznik wrote: > On 15.09.2015 23:03, John Ferlan wrote: >> Commit id 'f1f68ca33' added code to remove the directory paths for >> auto-generated sockets, but that code could be called before the >> paths were created resulting in

[libvirt] [PATCH v2] virfile: Check for existence of dir in virFileDeleteTree

2015-09-16 Thread John Ferlan
quot; all callers to make the non-NULL and existence checks, modify the virFileDeleteTree API to silently ignore NULL on input and non-existent directory trees. Signed-off-by: John Ferlan --- Difference over v1: Add checks in virFileDeleteTree src/qemu/qemu_process.c | 6 ++ src/util/virfile.c

Re: [libvirt] [PATCH v2 01/12] migration: refactor: get rid of use_params p2p_full

2015-09-16 Thread John Ferlan
FWIW: I figured I'd at least take a look - it's not my area of expertise though. I also ran the changes through my Coverity checker. The first pass found an issue in patch 10, which seems to be a result of some changes in patch 2 and perhaps patch 3... On 09/10/2015 09:20 AM, Nikolay Shirokovski

Re: [libvirt] [PATCH v2 02/12] migration: refactor: reuse p2p url check

2015-09-16 Thread John Ferlan
On 09/10/2015 09:20 AM, Nikolay Shirokovskiy wrote: > As promised in previous patch. Update commit message to say what's being done from patch 1: "Common uri check we factor out in different patch for clarity." Or for me ;-) "Refactor dconnuri local server URI check to common API" > > Sign

Re: [libvirt] [PATCH v2 03/12] migration: move implementation check to branches in p2p

2015-09-16 Thread John Ferlan
On 09/10/2015 09:20 AM, Nikolay Shirokovskiy wrote: > This is more structured code so it will be easier to add branch for _PARAMS > protocol here. It is not a pure refactoring strictly speaking as we remove > scenarios for broken cases when driver defines V3 feature and implements > perform funct

Re: [libvirt] [PATCH v2 04/12] migration: remove direct migration dependency on version1 of driver

2015-09-16 Thread John Ferlan
On 09/10/2015 09:20 AM, Nikolay Shirokovskiy wrote: > From: Michal Privoznik > > Direct migration should work if *perform3 is present but *perform > is not. This is situation when driver migration is implemented > after new version of driver function is introduced. We should not > be forced to

Re: [libvirt] [PATCH v2 05/12] migration: refactor: merge direct and p2p into unmanaged

2015-09-16 Thread John Ferlan
On 09/10/2015 09:20 AM, Nikolay Shirokovskiy wrote: > p2p plain and direct function are good candidates for code reuse. Their main > function is same - to branch among different versions of migration protocol > and > implementation of this function is also same. Also they have other common > fun

<    1   2   3   4   5   6   7   8   9   10   >