Re: [libvirt] [PATCH v5 07/13] conf: Introduce parser, formatter for uid and fid

2018-09-24 Thread Yi Min Zhao
在 2018/9/20 下午4:28, Andrea Bolognani 写道: On Wed, 2018-09-19 at 16:59 +0800, Yi Min Zhao wrote: 在 2018/9/13 下午9:58, Andrea Bolognani 写道: I realize now that virPCIDeviceAddressIsValid() and virPCIDeviceAddressIsEmpty() are *not* in util/virpci, though I swear that I posted patches moving them

Re: [libvirt] [PATCH v2 1/8] docs: add documentation of arch element of capabilities.xml

2018-09-24 Thread Jim Fehlig
On 9/18/18 6:50 PM, Marek Marczykowski-Górecki wrote: Specifically, list sub-elements and where they can be used. In addition, describe supported machine types for Xen. Signed-off-by: Marek Marczykowski-Górecki --- Changes in v2: - clarify type@domain description, add a link to domain xml

Re: [libvirt] [PATCH v2 0/8] libxl: PVHv2 support

2018-09-24 Thread Jim Fehlig
On 9/18/18 6:50 PM, Marek Marczykowski-Górecki wrote: This is a respin of my old PVHv1 patch[1], converted to PVHv2. Should the code use "PVH" name (as libxl does internally), or "PVHv2" as in many places in Xen documentation? I've chosen the former, but want to confirm it. From libvirt's

Re: [libvirt] [PATCH 10/10] xenconfig: add support for type="pvh"

2018-09-24 Thread Jim Fehlig
On 9/14/18 5:41 PM, Marek Marczykowski-Górecki wrote: On Fri, Sep 14, 2018 at 05:21:17PM -0600, Jim Fehlig wrote: On 8/5/18 3:48 PM, Marek Marczykowski-Górecki wrote: Handle PVH domain type in both directions (xen-xl->xml, xml->xen-xl). And add a test for it. Signed-off-by: Marek

Re: [libvirt] [PATCH v2 5/8] libxl: add support for PVH

2018-09-24 Thread Jim Fehlig
On 9/18/18 6:50 PM, Marek Marczykowski-Górecki wrote: Since this is something between PV and HVM, it makes sense to put the setting in place where domain type is specified. To enable it, use It is also included in capabilities.xml, for every supported HVM guest type - it doesn't seems to be

Re: [libvirt] [PATCH 20/47] vircgroup: extract virCgroupV1SetOwner

2018-09-24 Thread Ján Tomko
On Tue, Sep 18, 2018 at 05:45:41PM +0200, Pavel Hrdina wrote: Signed-off-by: Pavel Hrdina --- src/util/vircgroup.c| 54 +- src/util/vircgroupbackend.h | 7 src/util/vircgroupv1.c | 65 + 3 files changed, 73

Re: [libvirt] [PATCH 19/47] vircgroup: extract virCgroupV1BindMount

2018-09-24 Thread Ján Tomko
On Tue, Sep 18, 2018 at 05:45:40PM +0200, Pavel Hrdina wrote: Signed-off-by: Pavel Hrdina --- src/util/vircgroup.c| 102 +--- src/util/vircgroupbackend.h | 6 ++ src/util/vircgroupv1.c | 113 3 files changed, 120

Re: [libvirt] [PATCH 17/47] vircgroup: extract virCgroupV1AddTask

2018-09-24 Thread Ján Tomko
On Tue, Sep 18, 2018 at 05:45:38PM +0200, Pavel Hrdina wrote: Signed-off-by: Pavel Hrdina --- src/util/vircgroup.c| 48 + src/util/vircgroupbackend.h | 12 ++ src/util/vircgrouppriv.h| 5 src/util/vircgroupv1.c | 31

Re: [libvirt] [PATCH 18/47] vircgroup: extract virCgroupV1HasEmptyTasks

2018-09-24 Thread Ján Tomko
On Tue, Sep 18, 2018 at 05:45:39PM +0200, Pavel Hrdina wrote: Signed-off-by: Pavel Hrdina --- src/util/vircgroup.c| 13 + src/util/vircgroupbackend.h | 5 + src/util/vircgroupv1.c | 20 3 files changed, 26 insertions(+), 12 deletions(-)

Re: [libvirt] [PATCH 16/47] vircgroup: extract virCgroupV1Remove

2018-09-24 Thread Ján Tomko
On Tue, Sep 18, 2018 at 05:45:37PM +0200, Pavel Hrdina wrote: Signed-off-by: Pavel Hrdina --- src/util/vircgroup.c| 35 ++--- src/util/vircgroupbackend.h | 4 src/util/vircgrouppriv.h| 2 ++ src/util/vircgroupv1.c | 39

Re: [libvirt] [PATCH 15/47] vircgroup: extract virCgroupV1MakeGroup

2018-09-24 Thread Ján Tomko
On Tue, Sep 18, 2018 at 05:45:36PM +0200, Pavel Hrdina wrote: Signed-off-by: Pavel Hrdina --- src/util/vircgroup.c| 141 ++-- src/util/vircgroupbackend.h | 15 src/util/vircgrouppriv.h| 20 + src/util/vircgroupv1.c | 132

Re: [libvirt] [PATCH 14/47] vircgroup: extract virCgroupV1PathOfController

2018-09-24 Thread Ján Tomko
On Tue, Sep 18, 2018 at 05:45:35PM +0200, Pavel Hrdina wrote: Signed-off-by: Pavel Hrdina --- src/util/vircgroup.c| 22 +- src/util/vircgroupbackend.h | 7 +++ src/util/vircgroupv1.c | 31 +++ 3 files changed, 39 insertions(+), 21

Re: [libvirt] [PATCH 13/47] vircgroup: extract virCgroupV1GetAnyController

2018-09-24 Thread Ján Tomko
On Tue, Sep 18, 2018 at 05:45:34PM +0200, Pavel Hrdina wrote: Signed-off-by: Pavel Hrdina --- src/util/vircgroup.c| 16 src/util/vircgroupbackend.h | 4 src/util/vircgroupv1.c | 22 ++ 3 files changed, 30 insertions(+), 12 deletions(-)

Re: [libvirt] [PATCH 12/47] vircgroup: extract virCgroupV1HasController

2018-09-24 Thread Ján Tomko
On Tue, Sep 18, 2018 at 05:45:33PM +0200, Pavel Hrdina wrote: Signed-off-by: Pavel Hrdina --- src/util/vircgroup.c| 3 ++- src/util/vircgroupbackend.h | 5 + src/util/vircgroupv1.c | 9 + 3 files changed, 16 insertions(+), 1 deletion(-) Reviewed-by: Ján Tomko Jano

Re: [libvirt] [PATCH 12/47] vircgroup: extract virCgroupV1HasController

2018-09-24 Thread Ján Tomko
On Tue, Sep 18, 2018 at 05:45:33PM +0200, Pavel Hrdina wrote: Signed-off-by: Pavel Hrdina --- src/util/vircgroup.c| 3 ++- src/util/vircgroupbackend.h | 5 + src/util/vircgroupv1.c | 9 + 3 files changed, 16 insertions(+), 1 deletion(-) Reviewed-by: Ján Tomko Jano

Re: [libvirt] [PATCH 11/47] vircgroup: extract virCgroupV1DetectControllers

2018-09-24 Thread Ján Tomko
On Tue, Sep 18, 2018 at 05:45:32PM +0200, Pavel Hrdina wrote: Signed-off-by: Pavel Hrdina --- src/util/vircgroup.c| 66 + src/util/vircgroupbackend.h | 5 +++ src/util/vircgroupv1.c | 65 3 files changed, 71

Re: [libvirt] [PATCH 10/47] vircgroup: extract virCgroupV1GetPlacement

2018-09-24 Thread Ján Tomko
On Tue, Sep 18, 2018 at 05:45:31PM +0200, Pavel Hrdina wrote: Signed-off-by: Pavel Hrdina --- src/util/vircgroup.c| 3 +-- src/util/vircgroupbackend.h | 4 src/util/vircgroupv1.c | 12 3 files changed, 17 insertions(+), 2 deletions(-) diff --git

Re: [libvirt] [PATCH 09/47] vircgroup: extract virCgroupV1ValidatePlacement

2018-09-24 Thread Ján Tomko
On Tue, Sep 18, 2018 at 05:45:30PM +0200, Pavel Hrdina wrote: Signed-off-by: Pavel Hrdina --- src/util/vircgroup.c| 32 +--- src/util/vircgroupbackend.h | 5 + src/util/vircgroupv1.c | 31 +++ 3 files changed, 37

Re: [libvirt] [PATCH 08/47] vircgroup: extract virCgroupV1CopyPlacement

2018-09-24 Thread Ján Tomko
On Tue, Sep 18, 2018 at 05:45:29PM +0200, Pavel Hrdina wrote: Signed-off-by: Pavel Hrdina --- src/util/vircgroup.c| 38 + src/util/vircgroupbackend.h | 6 ++ src/util/vircgroupv1.c | 37 3 files changed, 44

Re: [libvirt] [PATCH 07/47] vircgroup: extract v1 detect functions

2018-09-24 Thread Ján Tomko
On Tue, Sep 18, 2018 at 05:45:28PM +0200, Pavel Hrdina wrote: Signed-off-by: Pavel Hrdina --- src/util/vircgroup.c| 138 ++- src/util/vircgroupbackend.h | 14 src/util/vircgroupv1.c | 158 3 files changed, 180

Re: [libvirt] [PATCH 06/47] vircgroup: extract virCgroupV1CopyMounts

2018-09-24 Thread Ján Tomko
On Tue, Sep 18, 2018 at 05:45:27PM +0200, Pavel Hrdina wrote: Signed-off-by: Pavel Hrdina --- src/util/vircgroup.c| 23 +-- src/util/vircgroupbackend.h | 5 + src/util/vircgroupv1.c | 22 ++ 3 files changed, 28 insertions(+), 22

Re: [libvirt] [PATCH 06/47] vircgroup: extract virCgroupV1CopyMounts

2018-09-24 Thread Ján Tomko
On Tue, Sep 18, 2018 at 05:45:27PM +0200, Pavel Hrdina wrote: Signed-off-by: Pavel Hrdina --- src/util/vircgroup.c| 23 +-- src/util/vircgroupbackend.h | 5 + src/util/vircgroupv1.c | 22 ++ 3 files changed, 28 insertions(+), 22

Re: [libvirt] [PATCH 05/47] vircgroup: extract virCgroupV1ValidateMachineGroup

2018-09-24 Thread Ján Tomko
On Tue, Sep 18, 2018 at 05:45:26PM +0200, Pavel Hrdina wrote: Signed-off-by: Pavel Hrdina --- src/util/vircgroup.c| 85 + src/util/vircgroupbackend.h | 7 +++ src/util/vircgrouppriv.h| 2 + src/util/vircgroupv1.c | 84

Re: [libvirt] [PATCH 04/47] vircgroup: detect available backend for cgroup

2018-09-24 Thread Ján Tomko
On Tue, Sep 18, 2018 at 05:45:25PM +0200, Pavel Hrdina wrote: We need to update one test-case because now new cgroup object will be created only if there is any cgroup backend available. Signed-off-by: Pavel Hrdina --- src/util/vircgroup.c | 18 ++ src/util/vircgrouppriv.h |

Re: [libvirt] [PATCH 03/47] vircgroup: extract virCgroupV1Available

2018-09-24 Thread Ján Tomko
On Tue, Sep 18, 2018 at 05:45:24PM +0200, Pavel Hrdina wrote: Signed-off-by: Pavel Hrdina --- src/util/vircgroup.c| 28 +--- src/util/vircgroupbackend.h | 7 +++ src/util/vircgroupv1.c | 35 +++ 3 files changed, 51

Re: [libvirt] [PATCH 02/47] vircgroup: introduce cgroup v1 backend files

2018-09-24 Thread Ján Tomko
On Tue, Sep 18, 2018 at 05:45:23PM +0200, Pavel Hrdina wrote: Signed-off-by: Pavel Hrdina --- src/Makefile.am | 1 + src/libvirt_private.syms| 3 ++ src/util/Makefile.inc.am| 2 ++ src/util/vircgroupbackend.c | 2 ++ src/util/vircgroupv1.c | 55

Re: [libvirt] [PATCH 01/47] util: introduce vircgroupbackend files

2018-09-24 Thread Ján Tomko
On Tue, Sep 18, 2018 at 05:45:22PM +0200, Pavel Hrdina wrote: We will need to extract current cgroup v1 implementation into separate backend because there will be new cgroup v2 implementation and both will have to co-exit. Signed-off-by: Pavel Hrdina --- src/Makefile.am | 1 +

Re: [libvirt] [PATCH v2 9/9] vircgrouptest: call virCgroupNewSelf instead virCgroupDetectMounts

2018-09-24 Thread Ján Tomko
On Thu, Sep 20, 2018 at 10:54:38AM +0200, Pavel Hrdina wrote: This will be required once cgroup v2 is introduced. The cgroup detection is not simple and we will have multiple backends so we should not just jump into the middle of the detection code. In order to use virCgroupNewSelf we need to

Re: [libvirt] [PATCH v2 8/9] vircgrouptest: call virCgroupDetectMounts directly

2018-09-24 Thread Ján Tomko
On Thu, Sep 20, 2018 at 10:54:37AM +0200, Pavel Hrdina wrote: Because we can set which files to return for cgroup tests there is no need to have special function tailored to run tests. Reviewed-by: Fabiano Fidêncio Signed-off-by: Pavel Hrdina --- src/libvirt_private.syms | 2 +-

Re: [libvirt] [PATCH v2 7/9] vircgroupmock: rewrite cgroup fopen mocking

2018-09-24 Thread Ján Tomko
On Thu, Sep 20, 2018 at 10:54:36AM +0200, Pavel Hrdina wrote: Move all the cgroup data into separate files out of vircgroupmock.c and rework the fopen function to load data from files. This will make it easier to add more test cases. Reviewed-by: Fabiano Fidêncio Signed-off-by: Pavel Hrdina

[libvirt] [PATCH] lxc_monitor: Avoid AB / BA lock race

2018-09-24 Thread Mark Asselstine
A deadlock situation can occur when autostarting a LXC domain 'guest' due to two threads attempting to take opposing locks while holding opposing locks (AB BA problem). Thread A takes and holds the 'vm' lock while attempting to take the 'client' lock, meanwhile, thread B takes and holds the

Re: [libvirt] [PATCH v2 6/9] vircgroupmock: cleanup unused cgroup files

2018-09-24 Thread Ján Tomko
On Thu, Sep 20, 2018 at 10:54:35AM +0200, Pavel Hrdina wrote: Reviewed-by: Fabiano Fidêncio Signed-off-by: Pavel Hrdina --- tests/vircgroupmock.c | 73 --- 1 file changed, 73 deletions(-) Reviewed-by: Ján Tomko Jano signature.asc Description:

Re: [libvirt] [PATCH v2 5/9] vircgroup: introduce virCgroupAddThread

2018-09-24 Thread Ján Tomko
On Thu, Sep 20, 2018 at 10:54:34AM +0200, Pavel Hrdina wrote: Once we introduce cgroup v2 support we need to handle processes and threads differently. Signed-off-by: Pavel Hrdina --- Notes: changes in v2: - added comment for new flag src/libvirt_private.syms | 1 +

Re: [libvirt] [PATCH v2 4/9] vircgroup: introduce virCgroupTaskFlags

2018-09-24 Thread Ján Tomko
On Thu, Sep 20, 2018 at 10:54:33AM +0200, Pavel Hrdina wrote: Use flags in virCgroupAddTaskInternal instead of boolean parameter. Following patch will add new flag to indicate thread instead of process. Signed-off-by: Pavel Hrdina --- Notes: changes in v2: - added comments for new

Re: [libvirt] [PATCH v2 3/9] vircgroup: rename virCgroupAdd.*Task to virCgroupAdd.*Process

2018-09-24 Thread Ján Tomko
On Thu, Sep 20, 2018 at 10:54:32AM +0200, Pavel Hrdina wrote: In cgroup v2 we need to handle processes and threads differently, following patch will introduce virCgroupAddThread. In the meantime, it feels a bit odd to call virCgroupAddProcess on a thread. Reviewed-by: Fabiano Fidêncio

Re: [libvirt] [PATCH v2 2/9] vircgroup: fix bug in virCgroupEnableMissingControllers

2018-09-24 Thread Ján Tomko
On Thu, Sep 20, 2018 at 10:54:31AM +0200, Pavel Hrdina wrote: If we are on host with systemd we need to build cgroup hierarchy ourselves for controllers that are not managed by systemd. As a starting parent we need to force root group because virCgroupMakeGroup() takes that parent in order to

Re: [libvirt] [PATCH v2 1/9] vircgroup: cleanup controllers not managed by systemd on error

2018-09-24 Thread Ján Tomko
On Thu, Sep 20, 2018 at 10:54:30AM +0200, Pavel Hrdina wrote: If virCgroupEnableMissingControllers() fails it could already create could have already created? I'm not good at the conditionals. some directories, we should clean it up as well. Reviewed-by: Fabiano Fidêncio Signed-off-by:

[libvirt] Plans for next release

2018-09-24 Thread Daniel Veillard
that's next week ! If we want to release around Oct 1st, I would suggest to enter freeze this Wed, probably in the morning europe time, then plan for an RC2 friday morning and if everything goes well, have the final release next monday. I hope that works for everybody ! Daniel -- Daniel

Re: [libvirt] [PATCH 0/6] syntax-check: Introduce a new rule to check misaligned stuff and fix it (batch I)

2018-09-24 Thread Michal Privoznik
On 09/24/2018 03:14 PM, Ján Tomko wrote: > On Mon, Sep 24, 2018 at 10:15:22AM +0200, Michal Privoznik wrote: >> On 09/19/2018 10:38 AM, Shi Lei wrote: >>> This series check misaligned stuff in parenthesis: >>> 1. For misaligned arguments of function >>> 2. For misaligned conditions of

Re: [libvirt] [PATCH 0/6] syntax-check: Introduce a new rule to check misaligned stuff and fix it (batch I)

2018-09-24 Thread Ján Tomko
On Mon, Sep 24, 2018 at 10:15:22AM +0200, Michal Privoznik wrote: On 09/19/2018 10:38 AM, Shi Lei wrote: This series check misaligned stuff in parenthesis: 1. For misaligned arguments of function 2. For misaligned conditions of [if|while|switch|...] It adds a temporary filter for this new rule

Re: [libvirt] [PATCH v2 0/2] Fix some Coverity found issues.

2018-09-24 Thread Erik Skultety
On Mon, Sep 24, 2018 at 08:56:33AM -0400, John Ferlan wrote: > v1: https://www.redhat.com/archives/libvir-list/2018-September/msg01115.html > > Already pushed patch 1 and 3 from v1, just reworked patch 2 > (the lxc change) based on review and repost. > > John Ferlan (2): > lxc: Remove

[libvirt] [PATCH v2 1/2] lxc: Remove unnecessary error label

2018-09-24 Thread John Ferlan
Since lxcConvertSize already creates an error message, there is no need to use an error: label in lxcSetMemTune to just overwrite or essentially rewrite the same error. So remove the label. Signed-off-by: John Ferlan --- src/lxc/lxc_native.c | 12 +++- 1 file changed, 3 insertions(+), 9

[libvirt] [PATCH v2 2/2] lxc: Resolve memory leak

2018-09-24 Thread John Ferlan
Commit 40b5c99a modified the virConfGetValue callers to use virConfGetValueString. However, using the virConfGetValueString resulted in leaking the returned @value string in each case. So, let's modify each instance to use the VIR_AUTOFREE(char *) syntax. In some instances changing the variable

[libvirt] [PATCH v2 0/2] Fix some Coverity found issues.

2018-09-24 Thread John Ferlan
v1: https://www.redhat.com/archives/libvir-list/2018-September/msg01115.html Already pushed patch 1 and 3 from v1, just reworked patch 2 (the lxc change) based on review and repost. John Ferlan (2): lxc: Remove unnecessary error label lxc: Resolve memory leak src/lxc/lxc_native.c | 38

Re: [libvirt] [PATCH 2/3] lxc: Resolve memory leak

2018-09-24 Thread John Ferlan
[...] >>> the comments further onward would be simply the same, you get the picture, >>> but >>> those are just tiny nitpicks based on personal preference I'd say (except >>> for >>> copying the same error messages all over again), with that addressed: >> >> Nope, the picture wasn't clear,

Re: [libvirt] [PATCH 2/3] lxc: Resolve memory leak

2018-09-24 Thread Erik Skultety
On Fri, Sep 21, 2018 at 07:46:47AM -0400, John Ferlan wrote: > > > On 09/21/2018 04:43 AM, Erik Skultety wrote: > > On Thu, Sep 20, 2018 at 05:34:37PM -0400, John Ferlan wrote: > >> Commit 40b5c99a modified the virConfGetValue callers to use > >> virConfGetValueString. However, using the

[libvirt] [PATCH] tools: Fix printf format

2018-09-24 Thread Michal Privoznik
We're passing size_t but using format for unsigned long. Introduced in latest vshTable rework patches. Signed-off-by: Michal Privoznik --- Pushed under build breaker and trivial rules. tools/virsh-domain.c | 2 +- tools/virt-admin.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)

Re: [libvirt] [libvirt PATCH v3 0/4] Share cgroup code that is duplicated between QEMU and LXC

2018-09-24 Thread Michal Privoznik
On 09/13/2018 02:33 PM, Pavel Hrdina wrote: > On Thu, Sep 13, 2018 at 09:48:10AM +0200, Fabiano Fidêncio wrote: >> virLXCCgroupSetupBlkioTune() and qemuSetupBlkioCgroup() and >> virLXCCgroupSetupCpuTune() and qemuSetupCpuCgroup() are the most similar >> functions between QEMU and LXC code. >> >>

Re: [libvirt] missing libvirt events related to snapshots and media-change for inactive VMs?

2018-09-24 Thread Peter Krempa
On Fri, Sep 21, 2018 at 08:39:20 +0200, Philipp Hahn wrote: > Hello, > > Am 20.09.18 um 08:10 schrieb Philipp Hahn: > > event-test.py is bad at handling newer livecycle events. > > Attached are two patches to improve that. > > > > Philipp Hahn (2): > > event-test.py: Sync list of domain

Re: [libvirt] [PATCH 0/6] syntax-check: Introduce a new rule to check misaligned stuff and fix it (batch I)

2018-09-24 Thread Michal Privoznik
On 09/19/2018 10:38 AM, Shi Lei wrote: > This series check misaligned stuff in parenthesis: > 1. For misaligned arguments of function > 2. For misaligned conditions of [if|while|switch|...] > > It adds a temporary filter for this new rule since there're > too much misalignment. > Now it just fix

Re: [libvirt] [PATCH v2 00/13] Implement vsh-table API to virsh and virt-admin

2018-09-24 Thread Michal Privoznik
On 09/21/2018 04:17 PM, Simon Kobyda wrote: > API is implemented in virsh and virt-admin. It fixes problems with > table-alignment, makes tables more readable and deals with unicode. > Table however could not be implemented in places, which do use simple > lists, or table implementation would

[libvirt] [RFC] Faster libvirtd restart with nwfilter rules

2018-09-24 Thread Nikolay Shirokovskiy
Hi, all. On fat hosts which are capable to run hundreds of VMs restarting libvirtd makes it's services unavailable for a long time if VMs use network filters. In

Re: [libvirt] [PATCH libvirt-python v2 00/22] event-test.py fixes

2018-09-24 Thread Michal Privoznik
On 09/21/2018 03:34 PM, Philipp Hahn wrote: > Am 21.09.18 um 13:14 schrieb Michal Privoznik: >> On 09/20/2018 08:10 AM, Philipp Hahn wrote: >>> event-test.py is bad at handling newer livecycle events. >>> Attached are two patches to improve that. >>> >>> Philipp Hahn (2): >>> event-test.py: Sync