[libvirt] [PATCH 3/3] fix other functions to add VIR_NETWORK_FORWARD_VLAN

2018-07-05 Thread Shi Lei
Signed-off-by: Shi Lei --- src/conf/domain_conf.c | 1 + src/conf/virnetworkobj.c | 1 + src/qemu/qemu_process.c | 1 + 3 files changed, 3 insertions(+) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index f4e59f6..bd8b050 100644 --- a/src/conf/domain_conf.c +++

[libvirt] [PATCH 0/3] support VLan for virtual network based on 8021q kernel module

2018-07-05 Thread Shi Lei
Support VLan for virtual network based on 8021q kernel module other than ovs backend. Insert vlan-device into the datapath of the network traffic: (outside of host) <--> physical_interface <--> vlan-dev(with VLAN-Tag) <--> bridge <--> guests Then VLAN-Tag will be applied to the guest's network

[libvirt] [PATCH 1/3] add functions: load 8021q module, create/destroy vlan-dev

2018-07-05 Thread Shi Lei
Signed-off-by: Shi Lei --- configure.ac | 5 +- src/libvirt_private.syms | 4 + src/util/virnetdev.c | 195 +++ src/util/virnetdev.h | 14 4 files changed, 216 insertions(+), 2 deletions(-) diff --git a/configure.ac

[libvirt] [PATCH 2/3] support new forward mode of vlan for virtual network

2018-07-05 Thread Shi Lei
Signed-off-by: Shi Lei --- src/conf/network_conf.c | 12 --- src/conf/network_conf.h | 1 + src/network/bridge_driver.c | 80 + 3 files changed, 82 insertions(+), 11 deletions(-) diff --git a/src/conf/network_conf.c

[libvirt] Ping Re: [PATCH] qemu: stop qemu progress when restore failed

2018-07-05 Thread WangJie (Pluto)
On 2018/7/5 10:05, Jie Wang wrote: >>From 29482622218f525f0133be0b7db74835174035d9 Mon Sep 17 00:00:00 2001 > From: Jie Wang > Date: Thu, 5 Jul 2018 09:52:03 +0800 > Subject: [PATCH] qemu: stop qemu progress when restore failed > > if qemuProcessStartCPUs perform failed in

Re: [libvirt] [RFCv2 PATCH 3/5] conf: rename cachetune to restune

2018-07-05 Thread John Ferlan
On 07/03/2018 12:10 AM, bing.niu wrote: > Hi John, > Thanks for reviewing! Since major questions are from this thread, so I > think we can start from this. > > On 2018年06月30日 06:47, John Ferlan wrote: >> >> >> On 06/15/2018 05:29 AM, bing@intel.com wrote: >>> From: Bing Niu >>> >>> resctrl

[libvirt] [dbus PATCH] gitignore: add tests/.pytest_cache

2018-07-05 Thread Anya Harter
Signed-off-by: Anya Harter --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index ca9e4e1..c41c82c 100644 --- a/.gitignore +++ b/.gitignore @@ -44,3 +44,4 @@ vgcore.* /src/org.libvirt.service /tests/test_util +/tests/.pytest_cache -- 2.17.1 --

[libvirt] [dbus PATCH] connect: fix gchar declaration in connect.h

2018-07-05 Thread Anya Harter
so that gchar *nodeDevPath; line appears in alphabetical order with the rest of the lines Signed-off-by: Anya Harter --- src/connect.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/connect.h b/src/connect.h index b81b6a8..0b9ae10 100644 --- a/src/connect.h +++

Re: [libvirt] opening tap devices that are created in a container

2018-07-05 Thread Roman Mohr
On Thu, Jul 5, 2018 at 4:20 PM Jason Baron wrote: > Hi, > > Opening tap devices, such as macvtap, that are created in containers is > problematic because the interface for opening tap devices is via > /dev/tapNN and devtmpfs is not typically mounted inside a container as > its not namespace

Re: [libvirt] opening tap devices that are created in a container

2018-07-05 Thread Daniel P . Berrangé
On Thu, Jul 05, 2018 at 10:20:16AM -0400, Jason Baron wrote: > Hi, > > Opening tap devices, such as macvtap, that are created in containers is > problematic because the interface for opening tap devices is via > /dev/tapNN and devtmpfs is not typically mounted inside a container as > its not

Re: [libvirt] [PATCH 2/3] qemu: consolidate parameters of qemuBuildChrChardevStr into flags

2018-07-05 Thread Daniel P . Berrangé
On Thu, Jul 05, 2018 at 02:43:18PM +0200, Michal Prívozník wrote: > On 07/05/2018 01:36 PM, Daniel P. Berrangé wrote: > > There are two boolean parameters passed to qemuBuildChrChardevStr, > > and soon there will be a third. It will be clearer to understand > > from callers' POV if we use named

[libvirt] opening tap devices that are created in a container

2018-07-05 Thread Jason Baron
Hi, Opening tap devices, such as macvtap, that are created in containers is problematic because the interface for opening tap devices is via /dev/tapNN and devtmpfs is not typically mounted inside a container as its not namespace aware. It is possible to do a mknod() in the container, once the

Re: [libvirt] [PATCH v3] Loop through all resolved addresses in virNetSocketNewListenTCP

2018-07-05 Thread Olaf Hering
On Wed, Jul 04, Daniel P. Berrangé wrote: > On Wed, Jul 04, 2018 at 01:48:56PM +0200, Olaf Hering wrote: > > Since bind() already succeeded (or will succeed) for one address, there is > > no reason to error out. Anyone who connects to an resolved ipv6 address will > > get an error, and moves on

Re: [libvirt] [PATCH 0/3] Fix regression with vhostuser and chardev FD passing

2018-07-05 Thread Michal Prívozník
On 07/05/2018 01:36 PM, Daniel P. Berrangé wrote: > QEMU has a validation bug which prevents vhostuser accepting the chardev > when it uses FD passing, despite it being functionally correct. > > While the QEMU bug is being fixed, we need to avoid hitting this > problem with existing QEMU

Re: [libvirt] [PATCH 2/3] qemu: consolidate parameters of qemuBuildChrChardevStr into flags

2018-07-05 Thread Michal Prívozník
On 07/05/2018 01:36 PM, Daniel P. Berrangé wrote: > There are two boolean parameters passed to qemuBuildChrChardevStr, > and soon there will be a third. It will be clearer to understand > from callers' POV if we use named flags instead. > > Signed-off-by: Daniel P. Berrangé > --- >

[libvirt] [PATCH 2/3] qemu: consolidate parameters of qemuBuildChrChardevStr into flags

2018-07-05 Thread Daniel P . Berrangé
There are two boolean parameters passed to qemuBuildChrChardevStr, and soon there will be a third. It will be clearer to understand from callers' POV if we use named flags instead. Signed-off-by: Daniel P. Berrangé --- src/qemu/qemu_command.c | 86 ++--- 1

[libvirt] [PATCH 0/3] Fix regression with vhostuser and chardev FD passing

2018-07-05 Thread Daniel P . Berrangé
QEMU has a validation bug which prevents vhostuser accepting the chardev when it uses FD passing, despite it being functionally correct. While the QEMU bug is being fixed, we need to avoid hitting this problem with existing QEMU releases. The easiest way todo this is to simply disable FD passing

[libvirt] [PATCH 1/3] qemu: remove chardevStdioLogd param from vhostuser code path

2018-07-05 Thread Daniel P . Berrangé
The vhostuser network backend is only supported with the UNIX domain socket chardev backend, so passing around chardevStdioLogd is not required. Signed-off-by: Daniel P. Berrangé --- src/qemu/qemu_command.c | 20 +++- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git

[libvirt] [PATCH 3/3] qemu: don't use chardev FD passing for vhostuser backend

2018-07-05 Thread Daniel P . Berrangé
QEMU chardevs have a bug which makes the vhostuser backend complain about lack of support for FD passing when validating the chardev. While this is ultimately QEMU's responsibility to fix, libvirt needs to avoid tickling the bug. Simply disabling chardev FD passing just for vhostuser's chardev is

Re: [libvirt] [PATCH 4/5] qemu: mark graphics ports as used on migration

2018-07-05 Thread Nikolay Shirokovskiy
Please disregard, this one is definetly a wrong one. On 04.07.2018 14:03, Nikolay Shirokovskiy wrote: > Signed-off-by: Nikolay Shirokovskiy > --- > src/qemu/qemu_migration.c | 6 ++ > src/qemu/qemu_process.c | 2 +- > src/qemu/qemu_process.h | 3 +++ > 3 files changed, 10 insertions(+),

Re: [libvirt] [PATCH 0/5] AUTHORS: Cleanups and fixes

2018-07-05 Thread Michal Prívozník
On 07/04/2018 02:47 PM, Andrea Bolognani wrote: > Comparing the generated AUTHORS file before and after these > changes: > > AUTHORS | 51 +-- > 1 file changed, 1 insertion(+), 50 deletions(-) > > There would be plenty of room for additional

Re: [libvirt] [PATCH] conf: initialize character pointer xml value to avoid random crash

2018-07-05 Thread Luyao Huang
Thanks for your quick review ! :) Have a nice day ! Luyao - Original Message - From: "Michal Prívozník" To: "Luyao Huang" , libvir-list@redhat.com Sent: Thursday, July 5, 2018 5:11:41 PM Subject: Re: [libvirt] [PATCH] conf: initialize character pointer xml value to avoid random crash

Re: [libvirt] [PATCH] conf: initialize character pointer xml value to avoid random crash

2018-07-05 Thread Michal Prívozník
On 07/05/2018 06:34 AM, Luyao Huang wrote: > If the code jump to the cleanup before assagin value to xml pointer, > libvirtd may get crashed when try to free an uninitialized pointer. > > backtrace: > > 0 0x7428d59c in free () from /lib64/libc.so.6 > 1 0x7721314a in virFree

[libvirt] [PATCH v2 6/6] qemu: Fetch pr-helper process info on reconnect

2018-07-05 Thread Michal Privoznik
If qemu-pr-helper process died while libvirtd was not running no event is emitted. Therefore, when reconnecting to the monitor we must check the qemu-pr-helper process status and act accordingly. Signed-off-by: Michal Privoznik --- src/qemu/qemu_process.c | 61

[libvirt] [PATCH v2 4/6] qemu: Wire up PR_MANAGER_STATUS_CHANGED event

2018-07-05 Thread Michal Privoznik
This event is emitted on the monitor if one of pr-managers lost connection to its pr-helper process. What libvirt needs to do is restart the pr-helper process iff it corresponds to managed pr-manager. Signed-off-by: Michal Privoznik --- src/qemu/qemu_domain.c | 1 +

[libvirt] [PATCH v2 5/6] qemu_monitor: Introduce qemuMonitorJSONGetPRManagerInfo

2018-07-05 Thread Michal Privoznik
This function fetches status of all pr-managers. So far, qemu reports only a single attribute "connected" but that fits our needs. Signed-off-by: Michal Privoznik --- src/qemu/qemu_monitor.c | 25 + src/qemu/qemu_monitor.h | 9 + src/qemu/qemu_monitor_json.c | 83

[libvirt] [PATCH v2 3/6] virStoragePRDefFormat: Suppress path formatting for migratable XML

2018-07-05 Thread Michal Privoznik
If there are managed reservations for a disk source, the path to the pr-helper socket is generated automatically by libvirt when needed and points somewhere under priv->libDir. Therefore it is very unlikely that the path will work even on migration destination (the libDir is derived from domain

[libvirt] [PATCH v2 2/6] qemuDomainValidateStorageSource: Relax PR validation

2018-07-05 Thread Michal Privoznik
Rather than rejecting the user provided path and alias for the managed PR reservation we will ignore the provided path. The reason is that migration XML does contain path even for managed reservations. Signed-off-by: Michal Privoznik --- src/qemu/qemu_domain.c | 19 ++- 1 file

[libvirt] [PATCH v2 0/6] Couple of PR fixes and improvements

2018-07-05 Thread Michal Privoznik
v2 of: https://www.redhat.com/archives/libvir-list/2018-July/msg00243.html Diff to v1: - Dropped 4/7 from the original series, as it's no longer needed - Reworked alias matching, instead of iterating through all disks trying to find a matching alias, retval of qemuDomainGetManagedPRAlias() is

[libvirt] [PATCH v2 1/6] qemuProcessStartPRDaemonHook: Try to set NS iff domain was started with one

2018-07-05 Thread Michal Privoznik
Users have possibility to disable qemu namespace feature (e.g. because they are running on *BSD which lacks Linux NS support). If that's the case we should not try to move qemu-pr-helper into the same namespace as qemu is in. Signed-off-by: Michal Privoznik --- src/qemu/qemu_process.c | 12

[libvirt] [PATCH] virsh.pod: Drop --persistent for detach-device-alias

2018-07-05 Thread Michal Privoznik
https://bugzilla.redhat.com/show_bug.cgi?id=1598087 The detach-device-alias never supported --persistent argument. Drop it from the man page. Signed-off-by: Michal Privoznik --- Pushed under trivial rule. tools/virsh.pod | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git