]> xenbits.xensource.com Git - libvirt.git/log
libvirt.git
6 years agovircgroup: extract virCgroupV1GetBlkioIoDeviceServiced
Pavel Hrdina [Fri, 17 Aug 2018 13:30:21 +0000 (15:30 +0200)]
vircgroup: extract virCgroupV1GetBlkioIoDeviceServiced

Reviewed-by: Fabiano Fidêncio <fidencio@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
6 years agovircgroup: extract virCgroupV1GetBlkioIoServiced
Pavel Hrdina [Fri, 17 Aug 2018 13:29:39 +0000 (15:29 +0200)]
vircgroup: extract virCgroupV1GetBlkioIoServiced

Reviewed-by: Fabiano Fidêncio <fidencio@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
6 years agovircgroup: extract virCgroupV1(Set|Get)BlkioWeight
Pavel Hrdina [Fri, 17 Aug 2018 13:28:50 +0000 (15:28 +0200)]
vircgroup: extract virCgroupV1(Set|Get)BlkioWeight

Reviewed-by: Fabiano Fidêncio <fidencio@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
6 years agovircgroup: extract virCgroupV1SetOwner
Pavel Hrdina [Fri, 17 Aug 2018 08:09:49 +0000 (10:09 +0200)]
vircgroup: extract virCgroupV1SetOwner

Reviewed-by: Ján Tomko <jtomko@redhat.com>
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
6 years agovircgroup: extract virCgroupV1BindMount
Pavel Hrdina [Fri, 17 Aug 2018 08:04:20 +0000 (10:04 +0200)]
vircgroup: extract virCgroupV1BindMount

Reviewed-by: Fabiano Fidêncio <fidencio@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
6 years agovircgroup: extract virCgroupV1HasEmptyTasks
Pavel Hrdina [Fri, 17 Aug 2018 13:25:48 +0000 (15:25 +0200)]
vircgroup: extract virCgroupV1HasEmptyTasks

Reviewed-by: Fabiano Fidêncio <fidencio@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
6 years agovircgroup: extract virCgroupV1AddTask
Pavel Hrdina [Mon, 24 Sep 2018 23:14:36 +0000 (01:14 +0200)]
vircgroup: extract virCgroupV1AddTask

Reviewed-by: Fabiano Fidêncio <fidencio@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
6 years agovircgroup: extract virCgroupV1Remove
Pavel Hrdina [Fri, 17 Aug 2018 08:02:05 +0000 (10:02 +0200)]
vircgroup: extract virCgroupV1Remove

Reviewed-by: Fabiano Fidêncio <fidencio@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
6 years agovircgroup: extract virCgroupV1MakeGroup
Pavel Hrdina [Tue, 18 Sep 2018 14:11:47 +0000 (16:11 +0200)]
vircgroup: extract virCgroupV1MakeGroup

Reviewed-by: Fabiano Fidêncio <fidencio@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
6 years agovircgroup: extract virCgroupV1PathOfController
Pavel Hrdina [Sun, 19 Aug 2018 17:24:58 +0000 (19:24 +0200)]
vircgroup: extract virCgroupV1PathOfController

Reviewed-by: Fabiano Fidêncio <fidencio@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
6 years agovircgroup: extract virCgroupV1GetAnyController
Pavel Hrdina [Sun, 19 Aug 2018 17:20:25 +0000 (19:20 +0200)]
vircgroup: extract virCgroupV1GetAnyController

Reviewed-by: Fabiano Fidêncio <fidencio@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
6 years agovircgroup: extract virCgroupV1HasController
Pavel Hrdina [Sun, 19 Aug 2018 17:17:27 +0000 (19:17 +0200)]
vircgroup: extract virCgroupV1HasController

Reviewed-by: Fabiano Fidêncio <fidencio@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
6 years agovircgroup: extract virCgroupV1DetectControllers
Pavel Hrdina [Mon, 24 Sep 2018 23:12:22 +0000 (01:12 +0200)]
vircgroup: extract virCgroupV1DetectControllers

Reviewed-by: Fabiano Fidêncio <fidencio@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
6 years agovircgroup: extract virCgroupV1StealPlacement
Pavel Hrdina [Fri, 17 Aug 2018 10:00:29 +0000 (12:00 +0200)]
vircgroup: extract virCgroupV1StealPlacement

Reviewed-by: Fabiano Fidêncio <fidencio@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
6 years agovircgroup: extract virCgroupV1ValidatePlacement
Pavel Hrdina [Fri, 24 Aug 2018 13:15:23 +0000 (15:15 +0200)]
vircgroup: extract virCgroupV1ValidatePlacement

Reviewed-by: Fabiano Fidêncio <fidencio@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
6 years agovircgroup: extract virCgroupV1CopyPlacement
Pavel Hrdina [Fri, 14 Sep 2018 10:53:47 +0000 (12:53 +0200)]
vircgroup: extract virCgroupV1CopyPlacement

Reviewed-by: Fabiano Fidêncio <fidencio@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
6 years agovircgroup: extract v1 detect functions
Pavel Hrdina [Fri, 14 Sep 2018 10:51:27 +0000 (12:51 +0200)]
vircgroup: extract v1 detect functions

Reviewed-by: Fabiano Fidêncio <fidencio@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
6 years agovircgroup: extract virCgroupV1CopyMounts
Pavel Hrdina [Fri, 17 Aug 2018 07:46:10 +0000 (09:46 +0200)]
vircgroup: extract virCgroupV1CopyMounts

Reviewed-by: Fabiano Fidêncio <fidencio@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
6 years agovircgroup: extract virCgroupV1ValidateMachineGroup
Pavel Hrdina [Fri, 14 Sep 2018 11:21:19 +0000 (13:21 +0200)]
vircgroup: extract virCgroupV1ValidateMachineGroup

Reviewed-by: Fabiano Fidêncio <fidencio@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
6 years agovircgroup: detect available backend for cgroup
Pavel Hrdina [Wed, 12 Sep 2018 11:47:21 +0000 (13:47 +0200)]
vircgroup: detect available backend for cgroup

We need to update one test-case because now new cgroup object will be
created only if there is any cgroup backend available.

Reviewed-by: Ján Tomko <jtomko@redhat.com>
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
6 years agovircgroup: extract virCgroupV1Available
Pavel Hrdina [Thu, 13 Sep 2018 14:27:56 +0000 (16:27 +0200)]
vircgroup: extract virCgroupV1Available

Reviewed-by: Ján Tomko <jtomko@redhat.com>
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
6 years agovircgroup: introduce cgroup v1 backend files
Pavel Hrdina [Fri, 17 Aug 2018 08:19:59 +0000 (10:19 +0200)]
vircgroup: introduce cgroup v1 backend files

Reviewed-by: Fabiano Fidêncio <fidencio@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
6 years agoutil: introduce vircgroupbackend files
Pavel Hrdina [Wed, 15 Aug 2018 11:10:24 +0000 (13:10 +0200)]
util: introduce vircgroupbackend files

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-exist.

Reviewed-by: Fabiano Fidêncio <fidencio@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
6 years agovircgrouptest: call virCgroupNewSelf instead virCgroupDetectMounts
Pavel Hrdina [Fri, 14 Sep 2018 11:17:07 +0000 (13:17 +0200)]
vircgrouptest: call virCgroupNewSelf instead virCgroupDetectMounts

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 create all the remaining
data files:

    - {name}.cgroups represents /proc/cgroups, it is a list of cgroup
      controllers compiled into kernel

    - {name}.self.cgroup represents /proc/self/cgroup, it describes
      cgroups to which the process belongs

For "no-cgroups" we need to modify the expected behavior because
virCgroupNewSelf() will fail if there are no controllers available.

Reviewed-by: Fabiano Fidêncio <fidencio@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
6 years agovircgrouptest: call virCgroupDetectMounts directly
Pavel Hrdina [Fri, 14 Sep 2018 10:38:54 +0000 (12:38 +0200)]
vircgrouptest: call virCgroupDetectMounts directly

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 <fidencio@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
6 years agovircgroupmock: rewrite cgroup fopen mocking
Pavel Hrdina [Mon, 24 Sep 2018 15:17:00 +0000 (17:17 +0200)]
vircgroupmock: rewrite cgroup fopen mocking

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 <fidencio@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
6 years agovircgroupmock: cleanup unused cgroup files
Pavel Hrdina [Sun, 19 Aug 2018 09:43:38 +0000 (11:43 +0200)]
vircgroupmock: cleanup unused cgroup files

Reviewed-by: Fabiano Fidêncio <fidencio@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
6 years agovircgroup: introduce virCgroupAddThread
Pavel Hrdina [Mon, 24 Sep 2018 22:54:04 +0000 (00:54 +0200)]
vircgroup: introduce virCgroupAddThread

Once we introduce cgroup v2 support we need to handle processes and
threads differently.

Reviewed-by: Fabiano Fidêncio <fidencio@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
6 years agovircgroup: introduce virCgroupTaskFlags
Pavel Hrdina [Tue, 11 Sep 2018 13:06:29 +0000 (15:06 +0200)]
vircgroup: introduce virCgroupTaskFlags

Use flags in virCgroupAddTaskInternal instead of boolean parameter.
Following patch will add new flag to indicate thread instead of process.

Reviewed-by: Fabiano Fidêncio <fidencio@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
6 years agovircgroup: rename virCgroupAdd.*Task to virCgroupAdd.*Process
Pavel Hrdina [Tue, 11 Sep 2018 13:03:22 +0000 (15:03 +0200)]
vircgroup: rename virCgroupAdd.*Task to virCgroupAdd.*Process

In cgroup v2 we need to handle processes and threads differently,
following patch will introduce virCgroupAddThread.

Reviewed-by: Fabiano Fidêncio <fidencio@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
6 years agovircgroup: fix bug in virCgroupEnableMissingControllers
Pavel Hrdina [Mon, 10 Sep 2018 13:43:42 +0000 (15:43 +0200)]
vircgroup: fix bug in virCgroupEnableMissingControllers

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 inherit values
for cpuset controller.

By default cpuset controller is managed by systemd so we will never
hit the issue but for v2 cgroups we need to use parent cgroup every
time.

Reviewed-by: Fabiano Fidêncio <fidencio@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
6 years agovircgroup: cleanup controllers not managed by systemd on error
Pavel Hrdina [Mon, 10 Sep 2018 12:46:24 +0000 (14:46 +0200)]
vircgroup: cleanup controllers not managed by systemd on error

If virCgroupEnableMissingControllers() fails it could have already
created some directories, we should clean it up as well.

Reviewed-by: Fabiano Fidêncio <fidencio@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
6 years agolibxl: prefer new location of nested_hvm in libxl_domain_build_info
Marek Marczykowski-Górecki [Wed, 19 Sep 2018 00:50:32 +0000 (02:50 +0200)]
libxl: prefer new location of nested_hvm in libxl_domain_build_info

If available, use b_info->nested_hvm instead of
b_info->u.hvm.nested_hvm. This will make nested HVM config available
also for PVH domains.

Signed-off-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
Reviewed-by: Jim Fehlig <jfehlig@suse.com>
6 years agolibxl: set shadow memory for any guest type, not only HVM
Marek Marczykowski-Górecki [Wed, 19 Sep 2018 00:50:31 +0000 (02:50 +0200)]
libxl: set shadow memory for any guest type, not only HVM

Otherwise starting PVH guest will result in "arch_setup_bootlate:
mapping shared_info failed (pfn=..., rc=-1, errno: 12): Internal error".

After this change the behavior is the same as in `xl`.

Signed-off-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
Reviewed-by: Jim Fehlig <jfehlig@suse.com>
6 years agodocs: add documentation of arch element of capabilities.xml
Marek Marczykowski-Górecki [Wed, 19 Sep 2018 00:50:30 +0000 (02:50 +0200)]
docs: add documentation of arch element of capabilities.xml

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 <marmarek@invisiblethingslab.com>
Reviewed-by: Jim Fehlig <jfehlig@suse.com>
6 years agolxc: Resolve memory leak
John Ferlan [Thu, 20 Sep 2018 20:50:37 +0000 (16:50 -0400)]
lxc: Resolve memory leak

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 name since
@value was used more than once.

Found by Coverity

Signed-off-by: John Ferlan <jferlan@redhat.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
6 years agolxc: Remove unnecessary error label
John Ferlan [Fri, 21 Sep 2018 11:26:00 +0000 (07:26 -0400)]
lxc: Remove unnecessary error label

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 <jferlan@redhat.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
6 years agotests: Resolve possible overrun
John Ferlan [Thu, 20 Sep 2018 21:34:38 +0000 (17:34 -0400)]
tests: Resolve possible overrun

Coverity noted that each of the fmemopen called used the strlen value
in order to allocate space, but that neglected space for terminating
null string. So just add 1 to the strlen.

Signed-off-by: John Ferlan <jferlan@redhat.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
6 years agoconf: Alter when ctxt->node is set
John Ferlan [Thu, 20 Sep 2018 21:34:36 +0000 (17:34 -0400)]
conf: Alter when ctxt->node is set

In virDomainMemoryDefParseXML and virDomainVideoDefParseXML if
the VIR_ALLOC fails and NULL is returned, then the alteration
to ctxt->node isn't reversed.

Found by Coverity

Signed-off-by: John Ferlan <jferlan@redhat.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
6 years agotools: Fix printf format
Michal Privoznik [Mon, 24 Sep 2018 08:45:44 +0000 (10:45 +0200)]
tools: Fix printf format

We're passing size_t but using format for unsigned long.
Introduced in latest vshTable rework patches.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
6 years agobuild-aux:check-spacing: Introduce a new rule to check misaligned stuff in parenthesises
Shi Lei [Wed, 19 Sep 2018 08:38:19 +0000 (16:38 +0800)]
build-aux:check-spacing: Introduce a new rule to check misaligned stuff in parenthesises

This patch introduces a new rule to check misaligned stuff in parenthesis:
1. For misaligned arguments of function
2. For misaligned conditions of [if|while|switch|...]

There're too much misalignment, so it adds a temporary filter which
permits 'src/util' now. It _should_ be removed as soon as fixing all.

Signed-off-by: Shi Lei <shi_lei@massclouds.com>
6 years agobuild-aux:check-spacing: Add wrapper function of CheckCurlyBrackets
Shi Lei [Wed, 19 Sep 2018 08:38:18 +0000 (16:38 +0800)]
build-aux:check-spacing: Add wrapper function of CheckCurlyBrackets

This patch adds CheckCurlyBrackets to simplify check-spacing.

Signed-off-by: Shi Lei <shi_lei@massclouds.com>
6 years agobuild-aux:check-spacing: Add wrapper function of CheckWhiteSpaces
Shi Lei [Wed, 19 Sep 2018 08:38:17 +0000 (16:38 +0800)]
build-aux:check-spacing: Add wrapper function of CheckWhiteSpaces

This patch adds CheckWhiteSpaces to simplify check-spacing.

Signed-off-by: Shi Lei <shi_lei@massclouds.com>
6 years agobuild-aux:check-spacing: Add wrapper function of KillComments
Shi Lei [Wed, 19 Sep 2018 08:38:16 +0000 (16:38 +0800)]
build-aux:check-spacing: Add wrapper function of KillComments

This patch adds KillComments to simplifies check-spacing.

Signed-off-by: Shi Lei <shi_lei@massclouds.com>
6 years agobuild-aux:check-spacing: Add wrapper function of CheckFunctionBody
Shi Lei [Wed, 19 Sep 2018 08:38:15 +0000 (16:38 +0800)]
build-aux:check-spacing: Add wrapper function of CheckFunctionBody

This patch adds CheckFunctionBody to simplifies check-spacing.

Signed-off-by: Shi Lei <shi_lei@massclouds.com>
6 years agoutil: Fix misaligned arguments and misaligned conditions for [if|while|...]
Shi Lei [Wed, 19 Sep 2018 08:38:14 +0000 (16:38 +0800)]
util: Fix misaligned arguments and misaligned conditions for [if|while|...]

This patch just fixes misaligned arguments and misaligned conditions
of src/util/*.c.

Signed-off-by: Shi Lei <shi_lei@massclouds.com>
6 years agovirt-admin: Implement vshTable API to server-list and client-list
Simon Kobyda [Fri, 21 Sep 2018 14:17:24 +0000 (16:17 +0200)]
virt-admin: Implement vshTable API to server-list and client-list

Signed-off-by: Simon Kobyda <skobyda@redhat.com>
6 years agovirsh: Implement vshTable API to vol-list
Simon Kobyda [Fri, 21 Sep 2018 14:17:23 +0000 (16:17 +0200)]
virsh: Implement vshTable API to vol-list

Local lengthy unicode-unreliable table formatting was replaced by new
API. Great example of how new API saves space and time.
Removed a lot of string lenght calculation used by the local table.

Signed-off-by: Simon Kobyda <skobyda@redhat.com>
6 years agovirsh: Implement vshTable API to pool-list
Simon Kobyda [Fri, 21 Sep 2018 14:17:22 +0000 (16:17 +0200)]
virsh: Implement vshTable API to pool-list

Local lengthy unicode-unreliable table formatting was replaced by new
API. Great example of how new API saves space and time.
Removed a lot of string lenght canculation used by the local table.

Signed-off-by: Simon Kobyda <skobyda@redhat.com>
6 years agovirsh: Implement vshTable API to vcpupin, iothreadinfo, domfsinfo
Simon Kobyda [Fri, 21 Sep 2018 14:17:21 +0000 (16:17 +0200)]
virsh: Implement vshTable API to vcpupin, iothreadinfo, domfsinfo

Signed-off-by: Simon Kobyda <skobyda@redhat.com>
6 years agovirsh: Implement vshTable API to domiflist
Simon Kobyda [Fri, 21 Sep 2018 14:17:20 +0000 (16:17 +0200)]
virsh: Implement vshTable API to domiflist

Signed-off-by: Simon Kobyda <skobyda@redhat.com>
6 years agovirsh: Implement vshTable API to domblklist
Simon Kobyda [Fri, 21 Sep 2018 14:17:19 +0000 (16:17 +0200)]
virsh: Implement vshTable API to domblklist

Signed-off-by: Simon Kobyda <skobyda@redhat.com>
6 years agovirsh: Implement vshTable API to domblkinfo
Simon Kobyda [Fri, 21 Sep 2018 14:17:18 +0000 (16:17 +0200)]
virsh: Implement vshTable API to domblkinfo

Signed-off-by: Simon Kobyda <skobyda@redhat.com>
6 years agovirsh: Set up cmdDomblkinfo() and cmdDomblkinfoPrint() for vshTable API implementation
Simon Kobyda [Fri, 21 Sep 2018 14:17:17 +0000 (16:17 +0200)]
virsh: Set up cmdDomblkinfo() and cmdDomblkinfoPrint() for vshTable API implementation

I've moved all the printing from cmdDomblkinfoPrint() to cmdDomblkinfo(),
and renamed the cmdDomblkinfoPrint() to cmdDomblkinfoGet(), since nature of
that function changed from gathering and printing informations only to
gathering information. This I believe simplifies the functions and
makes the implementation of vshTable API simpler.

Signed-off-by: Simon Kobyda <skobyda@redhat.com>
6 years agovirsh: Implement vshTable API to snapshot-list.
Simon Kobyda [Fri, 21 Sep 2018 14:17:16 +0000 (16:17 +0200)]
virsh: Implement vshTable API to snapshot-list.

Signed-off-by: Simon Kobyda <skobyda@redhat.com>
6 years agovirsh: Implement vshTable API to nwfilter-list and nwfilterbinding-list
Simon Kobyda [Fri, 21 Sep 2018 14:17:15 +0000 (16:17 +0200)]
virsh: Implement vshTable API to nwfilter-list and nwfilterbinding-list

Signed-off-by: Simon Kobyda <skobyda@redhat.com>
6 years agovirsh: Implement vshTable API to secret-list
Simon Kobyda [Fri, 21 Sep 2018 14:17:14 +0000 (16:17 +0200)]
virsh: Implement vshTable API to secret-list

Signed-off-by: Simon Kobyda <skobyda@redhat.com>
6 years agovirsh: Implement vshTable API to net-list and net-dhcp-leases
Simon Kobyda [Fri, 21 Sep 2018 14:17:13 +0000 (16:17 +0200)]
virsh: Implement vshTable API to net-list and net-dhcp-leases

Signed-off-by: Simon Kobyda <skobyda@redhat.com>
6 years agovirsh: Implement vsh-table to iface-list
Simon Kobyda [Fri, 21 Sep 2018 14:17:12 +0000 (16:17 +0200)]
virsh: Implement vsh-table to iface-list

Signed-off-by: Simon Kobyda <skobyda@redhat.com>
6 years agoqemu: Update hostdevs device lists before connecting qemu monitor
Wu Zongyong [Fri, 21 Sep 2018 02:33:53 +0000 (10:33 +0800)]
qemu: Update hostdevs device lists before connecting qemu monitor

In a following case:

    virsh start $domain
    service libvirtd stop
    <shutdown> the guest from within the $domain
    service libvirtd start

Notice that PCI devices which have been assigned to the $domain will
still be bound to stub drivers instead rebound to host drivers.
In that case the call stack is like below:

    libvirtd start
        qemuProcessReconnect
            qemuProcessStop (because $domain was shutdown without
                             libvirtd event to process that)
                qemuHostdevReAttachDomainDevices
                    qemuHostdevReAttachPCIDevices
                        virHostdevReAttachPCIDevices

However, because qemuHostdevUpdateActiveDomainDevices was called
after the qemuConnectMonitor, the setup of the tracking of each
host device in the $domain on either the activePCIHostdevs list
or inactivePCIHostdev list will not occur in an orderly manner.
Therefore, virHostdevReAttachPCIDevices just neglects these host PCI
devices which are bound to stub drivers and doesn't rebind them to
host drivers.

This patch fixs that by moving qemuHostdevUpdateActiveDomainDevices before
qemuConnectMonitor during libvirtd reconnection processing.

Signed-off-by: Wu Zongyong <cordius.wu@huawei.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
6 years agoqemu: Fix deadlock if create qemuProcessReconnect thread failed
Wang Yechao [Fri, 21 Sep 2018 04:35:11 +0000 (12:35 +0800)]
qemu: Fix deadlock if create qemuProcessReconnect thread failed

Use the new qemuDomainRemoveInactiveJobLocked to remove the
@obj during the virDomainObjListForEach call which holds a
lock on the domain object list.

Signed-off-by: Wang Yechao <wang.yechao255@zte.com.cn>
Reviewed-by: John Ferlan <jferlan@redhat.com>
6 years agoqemu: Introduce qemuDomainRemoveInactiveJobLocked
Wang Yechao [Fri, 21 Sep 2018 04:35:09 +0000 (12:35 +0800)]
qemu: Introduce qemuDomainRemoveInactiveJobLocked

Create a qemuDomainRemoveInactiveJobLocked which copies
qemuDomainRemoveInactiveJob except of course calling
another new helper qemuDomainRemoveInactiveLocked.

The qemuDomainRemoveInactiveLocked is a copy of
qemuDomainRemoveInactive except that instead of calling
virDomainObjListRemove it calls virDomainObjListRemoveLocked.

Signed-off-by: Wang Yechao <wang.yechao255@zte.com.cn>
Reviewed-by: John Ferlan <jferlan@redhat.com>
6 years agoqemu: Split up qemuDomainRemoveInactive
Wang Yechao [Fri, 21 Sep 2018 04:35:08 +0000 (12:35 +0800)]
qemu: Split up qemuDomainRemoveInactive

Introduce qemuDomainRemoveInactiveJobCommon to handle what will
be the common parts of the code with a new function that will
be used to call virDomainObjListRemoveLocked instead of the
unlocked variant.

Signed-off-by: Wang Yechao <wang.yechao255@zte.com.cn>
Reviewed-by: John Ferlan <jferlan@redhat.com>
6 years agoqemu: Drop QEMU_CAPS_DEVICE_SCSI_GENERIC
Andrea Bolognani [Tue, 18 Sep 2018 10:29:10 +0000 (12:29 +0200)]
qemu: Drop QEMU_CAPS_DEVICE_SCSI_GENERIC

It was already available in 1.5.0, so we can assume it's
present and avoid checking for it at runtime.

This commit is best viewed with 'git show -w'.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
6 years agotests: Fix duplicated capabilities
Andrea Bolognani [Tue, 18 Sep 2018 10:32:44 +0000 (12:32 +0200)]
tests: Fix duplicated capabilities

A bunch of SCSI test cases in qemuxml2argv used

  DO_TEST(...
          QEMU_CAPS_VIRTIO_SCSI, QEMU_CAPS_VIRTIO_SCSI,
          ...);

instead of the intended

  DO_TEST(...
          QEMU_CAPS_VIRTIO_SCSI, QEMU_CAPS_SCSI_LSI,
          ...);

which is used correctly in qemuxml2xml. Fix them.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
6 years agoqemu: Prefer qemu-system-* binaries
Andrea Bolognani [Fri, 14 Sep 2018 12:36:15 +0000 (14:36 +0200)]
qemu: Prefer qemu-system-* binaries

We already prefer them in capabilities, and domcapabilities
should be consistent with that.

This commit is best viewed with 'git show -w'.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
6 years agoqemu: Refactor virQEMUCapsCacheLookupByArch()
Andrea Bolognani [Fri, 14 Sep 2018 12:29:51 +0000 (14:29 +0200)]
qemu: Refactor virQEMUCapsCacheLookupByArch()

The new implementation contains less duplicated code and
is easier to extend.

This commit is best viewed with 'git show -w'.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
6 years agoqemu: Rename qemubinCaps => qemuCaps
Andrea Bolognani [Tue, 18 Sep 2018 16:24:35 +0000 (18:24 +0200)]
qemu: Rename qemubinCaps => qemuCaps

The latter is used throughout libvirt, so use it here as
well for consistency.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
6 years agoqemu: Simplify QEMU binary search
Andrea Bolognani [Tue, 18 Sep 2018 15:45:40 +0000 (17:45 +0200)]
qemu: Simplify QEMU binary search

Now that we have reduced the number of sensible options down
to either the native QEMU binary or RHEL's qemu-kvm, we can
make virQEMUCapsInitGuest() a bit simpler.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
6 years agoqemu: Don't look for "qemu-kvm" and "kvm" binaries
Andrea Bolognani [Tue, 18 Sep 2018 15:26:37 +0000 (17:26 +0200)]
qemu: Don't look for "qemu-kvm" and "kvm" binaries

Both Fedora's qemu-kvm and Debian's/Ubuntu's kvm are nothing
more than paper-thin wrappers around the native QEMU binary,
so we gain nothing by looking for them.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
6 years agoqemu: Remove unnecessary variables
Andrea Bolognani [Tue, 18 Sep 2018 15:06:48 +0000 (17:06 +0200)]
qemu: Remove unnecessary variables

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
6 years agoqemu: Expect a single binary in virQEMUCapsInitGuest()
Andrea Bolognani [Tue, 18 Sep 2018 14:55:20 +0000 (16:55 +0200)]
qemu: Expect a single binary in virQEMUCapsInitGuest()

We're only ever passing a single binary when calling this
function, so we can remove all code dealing with the
possibility of a second binary being specified.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
6 years agoqemu: Stop looking after finding the first binary
Andrea Bolognani [Tue, 18 Sep 2018 14:49:40 +0000 (16:49 +0200)]
qemu: Stop looking after finding the first binary

When the guest is native, we are currently looking at
potential KVM binaries regardless of whether or not we have
already located a QEMU binary suitable to run the guest.

This made sense back when KVM support was not part of QEMU
proper, but these days the KVM binaries are in most cases
just trivial wrapper scripts around the native QEMU binary
so it doesn't make sense to poke at them unless they're
the only binaries on the system, such as when running on
RHEL.

This will allow us to simplify both virQEMUCapsInitGuest()
and virQEMUCapsInitGuestFromBinary().

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
6 years agoqemu: Move armv7l-on-aarch64 special case
Andrea Bolognani [Tue, 18 Sep 2018 14:27:42 +0000 (16:27 +0200)]
qemu: Move armv7l-on-aarch64 special case

When running an armv7l guest on an aarch64 hosts, the
qemu-system-aarch64 binary should be our first choice instead
of qemu-system-arm since the former can take advantage of KVM
acceleration.

Move the special case to virQEMUCapsFindBinaryForArch() so
that it's handled along with all other cases rather than on
its own later on.

Doing so will also make further refactoring easier.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
6 years agoqemu: Don't duplicate binary name in capabilities
Andrea Bolognani [Fri, 14 Sep 2018 11:10:27 +0000 (13:10 +0200)]
qemu: Don't duplicate binary name in capabilities

virCapabilitiesAddGuestDomain() takes an optional binary
name: this is intended for cases where a certain domain
type can't use the default one registered for the guest
architecture, but has to use a special binary instead.

The current code, however, will pass 'binary' again when
'kvmbin' is not defined, which is unnecessary as 'binary'
has been registered as default earlier, and will result
in capabilities output such as

  <emulator>/usr/bin/qemu-system-x86_64</emulator>
  <domain type='qemu'/>
  <domain type='kvm'>
    <emulator>/usr/bin/qemu-system-x86_64</emulator>
  </domain>

with the second <emulator> element providing no additional
information.

Change it so that, when 'kvmbin' is not defined, NULL is
passed and so the default emulator will be used instead.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
6 years agoqemu: Move comments to virQEMUCapsGuestIsNative()
Andrea Bolognani [Tue, 18 Sep 2018 11:32:29 +0000 (13:32 +0200)]
qemu: Move comments to virQEMUCapsGuestIsNative()

The function performing the checks, rather than its callers,
should contain comments explaining the rationale behind said
checks.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
6 years agovirsh: Display vhostuser socket path in domiflist
Michal Privoznik [Tue, 18 Sep 2018 09:01:53 +0000 (11:01 +0200)]
virsh: Display vhostuser socket path in domiflist

https://bugzilla.redhat.com/show_bug.cgi?id=1630164

The domiflist command is designed to show a brief information on
domain interfaces. One piece of information that is shows is
"Source" - source network, device, name, bridge. However, it's
ignoring vhostuser for which we can show the unix socket it's
associated with.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
6 years agoqemu_hotplug: Fetch vhostuser ifname on hotplug
Michal Privoznik [Tue, 18 Sep 2018 08:59:05 +0000 (10:59 +0200)]
qemu_hotplug: Fetch vhostuser ifname on hotplug

https://bugzilla.redhat.com/show_bug.cgi?id=1630164

Since 2a13a0a1033 we are querying the vhostuser's interface name
when building qemu command line. However, we forgot to do so on
hotplug.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
6 years agoxen_common: Change xenParseCharDev to use virConfGetValueStringList
Fabiano Fidêncio [Thu, 20 Sep 2018 13:28:52 +0000 (15:28 +0200)]
xen_common: Change xenParseCharDev to use virConfGetValueStringList

Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
6 years agoxen_common: Change xenParseVfbs to use virConfGetValueStringList
Fabiano Fidêncio [Thu, 20 Sep 2018 13:28:51 +0000 (15:28 +0200)]
xen_common: Change xenParseVfbs to use virConfGetValueStringList

Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
6 years agoxen_common: Change xenParsePCIList to use virConfGetValueStringList
Fabiano Fidêncio [Thu, 20 Sep 2018 13:28:50 +0000 (15:28 +0200)]
xen_common: Change xenParsePCIList to use virConfGetValueStringList

The `if(!list || list->type != VIR_CONF_LIST)` check couldn't be
written in a 100% similar way. Instead, we're just checking whether
`virConfGetValueStringList() <= 0` and creating a new function to:
- return -1 in case virConfGetValueStringList fails either due to some
  allocation failure or when traversing the list;
- resetting the last error and return 0 otherwise;

Taking this approach we can have the behaviour with the new code as
close as possible to the old one.

Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
6 years agoxen_common: Change xenConfigGetString to use virConfGetValueString
Fabiano Fidêncio [Thu, 20 Sep 2018 13:28:49 +0000 (15:28 +0200)]
xen_common: Change xenConfigGetString to use virConfGetValueString

This change actually changes the behaviour of xenConfigGetString() as
now it returns a newly-allocated string.

Unfortunately, there's not much that can be done in order to avoid that
and all the callers have to be changed in order to avoid leaking the
return value.

Also, as a side-effect of the change above, the function now takes a
"char **" argument instead of a "const char **" one.

Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
6 years agoxen_common: Change xenConfigGetUUID to use virConfGetValueString
Fabiano Fidêncio [Thu, 20 Sep 2018 13:28:48 +0000 (15:28 +0200)]
xen_common: Change xenConfigGetUUID to use virConfGetValueString

Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
6 years agoxen_common: Change xenConfigCopyStringInternal to use virConfGetValueString
Fabiano Fidêncio [Thu, 20 Sep 2018 13:28:47 +0000 (15:28 +0200)]
xen_common: Change xenConfigCopyStringInternal to use virConfGetValueString

Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
6 years agotests: domaincaps: Add QEMU 3.0 for s390x
Boris Fiuczynski [Thu, 20 Sep 2018 10:20:57 +0000 (12:20 +0200)]
tests: domaincaps: Add QEMU 3.0 for s390x

Signed-off-by: Boris Fiuczynski <fiuczy@linux.ibm.com>
6 years agotests: Add capabilities data for QEMU 3.0.0 on s390x
Boris Fiuczynski [Thu, 20 Sep 2018 10:20:56 +0000 (12:20 +0200)]
tests: Add capabilities data for QEMU 3.0.0 on s390x

The QEMU binary is compiled from the v3.0.0 tag.

Signed-off-by: Boris Fiuczynski <fiuczy@linux.ibm.com>
6 years agoutil: Fix travis build error
John Ferlan [Thu, 20 Sep 2018 18:57:22 +0000 (14:57 -0400)]
util: Fix travis build error

Commit 12093f1f used %ld instead of %zd for a size_t.

Signed-off-by: John Ferlan <jferlan@redhat.com>
6 years agoRemove ignore_value or void from unlink calls
John Ferlan [Thu, 20 Sep 2018 12:08:19 +0000 (08:08 -0400)]
Remove ignore_value or void from unlink calls

There seems to be no need to add the ignore_value wrapper or
caste with (void) to the unlink() calls, so let's just remove
them. I assume at one point in time Coverity complained. So,
let's just be consistent - those that care to check the return
status can and those that don't can just have the naked unlink.

Signed-off-by: John Ferlan <jferlan@redhat.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
6 years agoconf: Introduce RDT monitor host capability
Wang Huaqiang [Thu, 20 Sep 2018 10:10:50 +0000 (18:10 +0800)]
conf: Introduce RDT monitor host capability

This patch is introducing cache monitor(CMT) to cache and
memory bandwidth monitor(MBM) for monitoring CPU memory
bandwidth.

The host capability of the two monitors is also introduced
in this patch.

For CMT, the host capability is shown like:
  <host>
  ...
    <cache>
      <bank id='0' level='3' type='both' size='15' unit='MiB' cpus='0-5'>
        <control granularity='768' min='1536' unit='KiB' type='both' maxAllocs='4'/>
      </bank>
      <monitor level='3' 'reuseThreshold'='270336' maxMonitors='176'>
        <feature name='llc_occupancy'/>
      </monitor>
    </cache>
    ...
  </host>

For MBM, the capability is shown like this:
  <host>
    ...
    <memory_bandwidth>
      <node id='1' cpus='6-11'>
        <control granularity='10' min ='10' maxAllocs='4'/>
      </node>
      <monitor maxMonitors='176'>
        <feature name='mbm_total_bytes'/>
        <feature name='mbm_local_bytes'/>
      </monitor>
    </memory_bandwidth>
    ...
  </host>

Signed-off-by: Wang Huaqiang <huaqiang.wang@intel.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
6 years agoconf: Refactor memory bandwidth capability structure
Wang Huaqiang [Thu, 20 Sep 2018 10:10:49 +0000 (18:10 +0800)]
conf: Refactor memory bandwidth capability structure

Move memory bandwidth capability nodes into one data structure,
this allows us to add a monitor for memory bandwidth.

Signed-off-by: Wang Huaqiang <huaqiang.wang@intel.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
6 years agoconf: Refactor cache bank capability structure
Wang Huaqiang [Thu, 20 Sep 2018 10:10:48 +0000 (18:10 +0800)]
conf: Refactor cache bank capability structure

Move all cache banks into one data structure, this allows
us to add other cache component, such as cache monitor.

Signed-off-by: Wang Huaqiang <huaqiang.wang@intel.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
6 years agoutil: Introduce monitor capability interface
Wang Huaqiang [Thu, 20 Sep 2018 10:10:47 +0000 (18:10 +0800)]
util: Introduce monitor capability interface

This patch introduces the resource monitor and creates the interface
for getting host capability of resource monitor from the system resource
control file system.

The resource monitor takes the role of RDT monitoring group and could be
used to monitor the resource consumption information, such as the last
level cache occupancy and the utilization of memory bandwidth.

Signed-off-by: Wang Huaqiang <huaqiang.wang@intel.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
6 years agolibxl: fallback to lib probe if pkgconfig file not found
Jim Fehlig [Wed, 19 Sep 2018 16:16:23 +0000 (10:16 -0600)]
libxl: fallback to lib probe if pkgconfig file not found

With the assumption that all Xen >= 4.6 contains a pkgconfig file for
libxenlight, commit 5bdcef13 dropped the fallback check to probe
libxenlight with LIBVIRT_CHECK_LIB. At the time it was not known that
the various Xen pkgconfig files are in the -runtime package in Fedora,
instead of the traditional -devel package. This bug [1] was fixed in
Fedora > 28, but until Fedora 28 reaches EOL we'll need to re-introduce
the fallback check.

[1] https://bugzilla.redhat.com/show_bug.cgi?id=1629643

Signed-off-by: Jim Fehlig <jfehlig@suse.com>
6 years agobuild: remove unused variables from virt-driver-libxl.m4
Jim Fehlig [Wed, 19 Sep 2018 18:35:02 +0000 (12:35 -0600)]
build: remove unused variables from virt-driver-libxl.m4

Signed-off-by: Jim Fehlig <jfehlig@suse.com>
6 years agostorage: Save error during refresh failure processing
John Ferlan [Wed, 12 Sep 2018 15:25:37 +0000 (11:25 -0400)]
storage: Save error during refresh failure processing

https://bugzilla.redhat.com/show_bug.cgi?id=1614283

Save the error from the refresh failure because the stopPool
processing may overwrite the error or even worse clear it
due to calling an external libvirt API that resets the last
error such as is the case with the SCSI pool which may call
virGetConnectNodeDev (see commit decaeb288) in order to
process deleting an NPIV vport.

Signed-off-by: John Ferlan <jferlan@redhat.com>
ACKed-by: Michal Privoznik <mprivozn@redhat.com>
6 years agostorage: Introduce storagePoolRefreshFailCleanup
John Ferlan [Wed, 12 Sep 2018 13:35:42 +0000 (09:35 -0400)]
storage: Introduce storagePoolRefreshFailCleanup

Create a common pool refresh failure handling method as the
same code is repeated multiple times.

Signed-off-by: John Ferlan <jferlan@redhat.com>
ACKed-by: Michal Privoznik <mprivozn@redhat.com>
6 years agostorage: Create error label path for storagePoolCreateXML
John Ferlan [Wed, 12 Sep 2018 15:17:17 +0000 (11:17 -0400)]
storage: Create error label path for storagePoolCreateXML

Rather than duplicate the error code, let's create an error
label to keep code common.

Signed-off-by: John Ferlan <jferlan@redhat.com>
ACKed-by: Michal Privoznik <mprivozn@redhat.com>
6 years agostorage: Clean up storagePoolUpdateStateCallback processing
John Ferlan [Wed, 12 Sep 2018 15:05:51 +0000 (11:05 -0400)]
storage: Clean up storagePoolUpdateStateCallback processing

Alter the code path to remove the need to to go cleanup and thus
remove the label completely.

Signed-off-by: John Ferlan <jferlan@redhat.com>
ACKed-by: Michal Privoznik <mprivozn@redhat.com>
6 years agostorage: Clean up stateFile if refreshPool fails
John Ferlan [Wed, 12 Sep 2018 12:29:32 +0000 (08:29 -0400)]
storage: Clean up stateFile if refreshPool fails

If the virStoragePoolRefresh fails and we call stopPool, the
code neglected to clean up the state file leading to the next
libvirtd restart attempting to start the pool. For a transient
pool this could make it unexpectedly reappear.

Signed-off-by: John Ferlan <jferlan@redhat.com>
ACKed-by: Michal Privoznik <mprivozn@redhat.com>
6 years agoqemu: Ignore nwfilter binding instantiation issues during reconnect
John Ferlan [Fri, 24 Aug 2018 13:29:24 +0000 (09:29 -0400)]
qemu: Ignore nwfilter binding instantiation issues during reconnect

https://bugzilla.redhat.com/show_bug.cgi?id=1607202

It's essentially stated in the nwfilterBindingDelete that we
will allow the admin to shoot themselves in the foot by deleting
the nwfilter binding which then allows them to undefine the
nwfilter that is in use for the running guest...

However, by allowing this we cause a problem for libvirtd
restart reconnect processing which would then try to recreate
the missing binding attempting to use the deleted filter
resulting in an error and thus shutting the guest down.

So rather than keep adding virDomainConfNWFilterInstantiate
flags to "ignore" specific error conditions, modify the logic
to ignore, but VIR_WARN errors other than ignoreExists. This
will at least allow the guest to not shutdown for only nwfilter
binding errors that we can now perhaps recover from since we
have the binding create/delete capability.

Signed-off-by: John Ferlan <jferlan@redhat.com>
ACKed-by: Michal Privoznik <mprivozn@redhat.com>