[libvirt RFC PATCH] network: NetworkManager script to monitor for conflicts with new interfaces
by Laine Stump
There has been a problem for several years with libvirt's default
network conflicting with the host network connection on new installs,
particularly when the "host" is actually virtual machine that is,
itself, connected to the libvirt default network on its respective
host. If the two default networks use the same subnet, and if the
nested host's libvirtd happens to start its network before the system
networking connects to the toplevel host, then network connectivity to
the guest is just silently non-working.
We've tried several things over the years to eliminate this problem,
including:
1) Checking for conflicting routes/interfaces during installation of
the libvirt-daemon-config-network package (the one containing the
default network config file) which tries different subnets until it
finds one that doesn't conflict. This helps in some cases, but fails
on 2 points: a) if the installation environment is different from the
environment where the system is actually run (e.g. a "live CD" image
of a distro, which is built in a container by the distro maintainers,
then could be run in any number of places, and b) it modifies the
installed files during the rpm installation post_install script, which
is now discouraged because people building container images don't like
dealing with that.
2) When starting a libvirt network, we now check for any route or
interface that conflicts with the new network's IP's and routes. This
doesn't fix the problem, but does notify the user of the problem *as
long as libvirt starts its networks after the host has started its
system networks*.
Neither of these help in the situation where libvirt's networks are
started first. The script in this patch uses a NetworkManager facility
(dispatcher.d scripts, which are run whenever any interface is
brought up or down) to check for any libvirt networks that conflict
with the new NetworkManager interface, and if it finds a conflict it
logs a message and destroys the libvirt network. So as with case (2)
above, it doesn't solve the problem, but it does make it more obvious,
and also makes sure the host networking isn't borked, so you can still
ssh into the machine and fix it.
There are a few caveats/misgivings with the script I've come up with,
which cause me to post it as just an RFC:
1) It's written in python, and uses libxml2
When I first sat down to make this script (following a suggestion by
danpb during an IRC discussion), I immediately put #!/bin/bash at the
top of the file, because it's supposed to be a script. But then I
remembered that we're trying to narrow down the usage of languages in
libvirt, and anyway it would be nice to be able to properly parse the
XML to get the IP addresses/netmasks/prefixes. So I instead wrote it
in python. This makes for a less ugly program, but it does mean that
the daemon-config-network package is now dependent on python3-libxml
(and python3 of course), which pulls in a bunch of other packages.
Everybody's dev systems already have these packages and their
dependencies installed (since both are required to build) and many
other users systems already have them (they are required by
virt-install and virt-manager, among others), including the Fedora
live CD, for example. But not *all* systems have them. There has been
a lot of work to reduce package bloat caused by pulling in more and
more packages, so I'm reluctant to contribute to that. On the other
hand, someone who is looking to minimize their system footprint will
also probably not be installing the libvirt default network, so maybe
it's acceptable (I'm leaning towards "not", but want to know if anyone
else has a different opinion)
2) As delivered, it checks for conflicts with *all* libvirt
networks.
While that was fun to write, and in theory is the right
thing to do, in practice it may be / probably is overkill. As we
discussed in IRC, the main time when this is a problem is just after
the first boot of a new OS / libvirt installation, and the only
libvirt network that's going to exist at that time is the default
network. So while having a loop that scans all libvirt networks is
more complete, in almost all cases it is just wasting time. (I did
provide a bool at the top of the script that can be modified to tell
it to only check the default network, but of course the script is
installed in /usr/lib, and it's not proper to modify files in
/usr/lib, so that isn't a real-world solution, but more a way to allow
people (i.e. "me") right now to test out the different behaviors.
3) This only works if NetworkManager is enabled.
I brought this up when danpb first mentioned the idea, and he rightly
pointed out that every report of this problem we've had has been from
the first boot of a new install on a system that used Network Manager
- anybody using any other method of networking config on their host
has had to manually intervene to get it setup, but NM tries to do
everything auto-magically. So while there may still be a very
occasional rare occurence of a silent networking failure even with
this script installed, this should eliminate 99% of the cases.
So, the questions I have are:
1) Do we want to allow adding the dependency on python3-libxml to the
libvirt-daemon-config-network package in order to avoid adding a bash
script. Or should I just redo it in bash
2) Do we want something that checks all active networks as this does,
or just the default network (and if the latter, should we make it
easily modifiable to check all networks, or just strip it down as much
as possible)
3) I could eliminate the libxml2 dependency by just grepping the xml
for "<address .*ip=". Is reduced correctness (which is probably 0%
different in practice) worth the reduced package dependencies?
As a single question: on a sliding scale of "this script" ----->
"simple bash script" where do we want to land?
Signed-off-by: Laine Stump <laine(a)redhat.com>
---
libvirt.spec.in | 2 +
src/network/Makefile.inc.am | 8 +-
src/network/nm-dispatcher-check-nets.py | 182 ++++++++++++++++++++++++
3 files changed, 191 insertions(+), 1 deletion(-)
create mode 100755 src/network/nm-dispatcher-check-nets.py
diff --git a/libvirt.spec.in b/libvirt.spec.in
index 6abf97df85..e40068b2be 100644
--- a/libvirt.spec.in
+++ b/libvirt.spec.in
@@ -496,6 +496,7 @@ Requires: libvirt-libs = %{version}-%{release}
Requires: dnsmasq >= 2.41
Requires: radvd
Requires: iptables
+Requires: python3-libxml2
%description daemon-driver-network
The network driver plugin for the libvirtd daemon, providing
@@ -1630,6 +1631,7 @@ exit 0
%dir %attr(0755, root, root) %{_localstatedir}/lib/libvirt/dnsmasq/
%attr(0755, root, root) %{_libexecdir}/libvirt_leaseshelper
%{_libdir}/%{name}/connection-driver/libvirt_driver_network.so
+%{_prefix}/lib/NetworkManager/dispatcher.d/50-libvirt-check-nets
%if %{with_firewalld_zone}
%{_prefix}/lib/firewalld/zones/libvirt.xml
diff --git a/src/network/Makefile.inc.am b/src/network/Makefile.inc.am
index 196a30e16c..d58e09f88b 100644
--- a/src/network/Makefile.inc.am
+++ b/src/network/Makefile.inc.am
@@ -170,6 +170,9 @@ install-data-network:
( cd $(DESTDIR)$(confdir)/qemu/networks/autostart && \
rm -f default.xml && \
$(LN_S) ../default.xml default.xml )
+ $(MKDIR_P) "$(DESTDIR)$(prefix)/lib/NetworkManager/dispatcher.d"
+ $(INSTALL_DATA) $(srcdir)/network/nm-dispatcher-check-nets.py \
+ $(DESTDIR)$(prefix)/lib/NetworkManager/dispatcher.d/50-libvirt-check-nets
if WITH_FIREWALLD_ZONE
$(MKDIR_P) "$(DESTDIR)$(prefix)/lib/firewalld/zones"
$(INSTALL_DATA) $(srcdir)/network/libvirt.zone \
@@ -189,7 +192,10 @@ endif WITH_FIREWALLD_ZONE
endif WITH_NETWORK
-EXTRA_DIST += network/default.xml network/libvirt.zone
+EXTRA_DIST += \
+ network/default.xml \
+ network/nm-dispatcher-check-nets.py \
+ network/libvirt.zone
.PHONY: \
install-data-network \
diff --git a/src/network/nm-dispatcher-check-nets.py b/src/network/nm-dispatcher-check-nets.py
new file mode 100755
index 0000000000..9225a08ea1
--- /dev/null
+++ b/src/network/nm-dispatcher-check-nets.py
@@ -0,0 +1,182 @@
+#!/usr/bin/env python3
+#
+# Copyright (C) 2012-2019 Red Hat, Inc.
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library. If not, see
+# <http://www.gnu.org/licenses/>.
+
+import libvirt
+import sys
+import os
+import libxml2
+from ipaddress import ip_network
+
+# This script should be installed in
+# /usr/lib/NetworkManager/dispatcher.d/50-libvirt-check-nets. It will be
+# called by NetworkManager every time a network interface is taken up
+# or down. When a new network comes up, it checks the libvirt virtual
+# networks to see if their IP address(es) (including any static
+# routes) are in conflict with the IP address(es) (or static routes)
+# of the newly added interface. If so, the libvirt network is
+# disabled. It is assumed that the user will notice that their guests
+# no longer have network connectvity (and/or the message logged by
+# this script), see that the network has been disabled, and then
+# realize the conflict when they try to restart it.
+#
+# set checkDefaultOnly=False to check *all* active libvirt networks
+# for conflicts with the new interface. Set to True to check only the
+# libvirt default network (since most networks other than the default
+# network are added post-install at a time when all of the hosts other
+# networks are already active, it may be overkill to check all of the
+# libvirt networks for conflict here (and instead just add more
+# needless overheard to bringing up a new host interface).
+#
+checkDefaultOnly = False
+
+# NB: since this file is installed in /usr/lib, it really shouldn't be
+# modified by the user, but instead should be copied to
+# /etc/NetworkManager/dispatcher.d, where it will override the copy in
+# /usr/lib. Even that isn't a proper solution though - if we're going
+# to actually have this config knob, perhaps we should check for it in
+# the environment, and if someone wants to modify it they can put a
+# short script in /etc that exports and environment variable and then
+# calls this script? Just thinking out loud here...
+
+def checkconflict(conn, netname, hostnets, hostif):
+
+ # ignore if the network has been brought down or removed since we
+ # got the list
+ try:
+ net = conn.networkLookupByName(netname)
+ except libvirt.libvirtError:
+ return
+
+ if not net.isActive():
+ return
+
+ xml = net.XMLDesc()
+ doc = libxml2.parseDoc(xml)
+ ctx = doc.xpathNewContext()
+
+ # see if NetworkManager is informing us that this libvirt network
+ # itself is coming online
+ bridge = ctx.xpathEval("/network/bridge/@name");
+ if bridge and bridge[0].content == hostif:
+ return
+
+ # check *all* the addresses of this network
+ addrs = ctx.xpathEval("/network/*[@address]")
+ for ip in addrs:
+ ctx.setContextNode(ip)
+ address = ctx.xpathEval("@address")
+ prefix = ctx.xpathEval("@prefix")
+ netmask = ctx.xpathEval("@netmask")
+
+ if not (address and len(address[0].content)):
+ continue
+
+ addrstr = address[0].content
+ if not (prefix and len(prefix[0].content)):
+ # check for a netmask
+ if not (netmask and len(netmask[0].content)):
+ # this element has address, but no prefix or netmask
+ # probably it is <mac address ...> so we can ignore it
+ continue
+ # convert netmask to prefix
+ prefixstr = str(ip_network("0.0.0.0/%s" % netmask[0].content).prefixlen)
+ else:
+ prefixstr = prefix[0].content
+
+ virtnetaddress = ip_network("%s/%s" % (addrstr, prefixstr), strict = False)
+ # print("network %s address %s" % (netname, str(virtnetaddress)))
+ for hostnet in hostnets:
+ if virtnetaddress == hostnet:
+ # There is a conflict with this libvirt network and the specified
+ # net, so we need to disable the libvirt network
+ print("Conflict with host net %s when starting interface %s - bringing down libvirt network '%s'"
+ % (str(hostnet), hostif, netname))
+ try:
+ net.destroy()
+ except libvirt.libvirtError:
+ print("Failed to destroy network %s" % netname)
+ return
+ return
+
+
+def addHostNets(hostnets, countenv, addrenv):
+
+ count = os.getenv(countenv)
+ if not count or count == 0:
+ return
+
+ for num in range(int(count)):
+ addrstr = os.getenv("%s_%d" % (addrenv, num))
+ if not addrstr or addrstr == "":
+ continue
+
+ net = ip_network(addrstr.split()[0], strict=False)
+ if net:
+ hostnets.append(net)
+ return
+
+
+############################################################
+
+if sys.argv[2] != "up":
+ sys.exit(0)
+
+hostif = sys.argv[1]
+
+try:
+ conn = libvirt.open(None)
+except libvirt.libvirtError:
+ print('Failed to open connection to the hypervisor')
+ sys.exit(0)
+
+if checkDefaultOnly:
+ nets = []
+ net = conn.networkLookupByName("default")
+ if not (net and net.isActive()):
+ sys.exit(0)
+ nets.append(net)
+else:
+ nets = conn.listAllNetworks(libvirt.VIR_CONNECT_LIST_NETWORKS_ACTIVE)
+ if not nets:
+ sys.exit(0)
+
+# We have at least one active network. Build a list of all network
+# routes added by the new interface, and compare that list to the list
+# of all networks used by each active libvirt network. If any are an
+# exact match, then we have a conflict and need to shut down the
+# libvirt network to avoid killing host networking.
+
+# When NetworkManager calls scripts in /etc/NetworkManager/dispatcher.d
+# it will have all IP addresses and routes associated with the interface
+# that is going up or down in the following environment variables:
+#
+# IP4_NUM_ADDRESSES - number of IPv4 addresses
+# IP4_ADDRESS_N - one variable for each address, starting at _0
+# IP4_NUM_ROUTES - number of IPv5 routes
+# IP4_ROUTE_N - one for each route, starting at _0
+# (replace "IP4" with "IP6" and repeat)
+#
+hostnets = []
+addHostNets(hostnets, "IP4_NUM_ADDRESSES", "IP4_ADDRESS");
+addHostNets(hostnets, "IP4_NUM_ROUTES", "IP4_ROUTE");
+addHostNets(hostnets, "IP6_NUM_ADDRESSES", "IP6_ADDRESS");
+addHostNets(hostnets, "IP6_NUM_ROUTES", "IP6_ROUTE");
+
+for net in nets:
+
+ checkconflict(conn, net.name(), hostnets, hostif)
--
2.25.4
4 years, 6 months
[libvirt PATCH] gitlab: move some jobs onto CentOS 8
by Daniel P. Berrangé
So that we don't have to chase frequent Fedora releases, move the
non-build related jobs onto the long life CentOS 8 distro.
Signed-off-by: Daniel P. Berrangé <berrange(a)redhat.com>
---
.gitlab-ci.yml | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index d3025f031a..149334ed6f 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -172,7 +172,7 @@ website:
- $MAKE -C docs install
- cd ..
- mv vroot/share/doc/libvirt/html/ website
- image: quay.io/libvirt/buildenv-libvirt-fedora-31:latest
+ image: quay.io/libvirt/buildenv-libvirt-centos-8:latest
artifacts:
expose_as: 'Website'
name: 'website'
@@ -191,7 +191,7 @@ codestyle:
- cd build
- ../autogen.sh || (cat config.log && exit 1)
- $MAKE syntax-check
- image: quay.io/libvirt/buildenv-libvirt-fedora-31:latest
+ image: quay.io/libvirt/buildenv-libvirt-centos-8:latest
# This artifact published by this job is downloaded to push to Weblate
@@ -211,7 +211,7 @@ potfile:
- $MAKE -C po libvirt.pot
- cd ..
- mv build/po/libvirt.pot libvirt.pot
- image: quay.io/libvirt/buildenv-libvirt-fedora-31:latest
+ image: quay.io/libvirt/buildenv-libvirt-centos-8:latest
artifacts:
expose_as: 'Potfile'
name: 'potfile'
--
2.26.2
4 years, 6 months
[libvirt-ci PATCH] guests: add libvirt-rust project packages
by Daniel P. Berrangé
On FreeBSD there is no separate "cargo" package, as the command is part
of the amin "rust" package.
Signed-off-by: Daniel P. Berrangé <berrange(a)redhat.com>
---
guests/vars/mappings.yml | 8 ++++++++
guests/vars/projects/libvirt-rust.yml | 4 ++++
2 files changed, 12 insertions(+)
create mode 100644 guests/vars/projects/libvirt-rust.yml
diff --git a/guests/vars/mappings.yml b/guests/vars/mappings.yml
index 4808b12..b78ce95 100644
--- a/guests/vars/mappings.yml
+++ b/guests/vars/mappings.yml
@@ -109,6 +109,10 @@ mappings:
default: ca-certificates
FreeBSD: ca_root_nss
+ cargo:
+ default: cargo
+ pkg:
+
ccache:
default: ccache
@@ -935,6 +939,10 @@ mappings:
rpmbuild:
rpm: rpm-build
+ rust:
+ default: rust
+ deb: rustc
+
sanlock:
deb: libsanlock-dev
rpm: sanlock-devel
diff --git a/guests/vars/projects/libvirt-rust.yml b/guests/vars/projects/libvirt-rust.yml
new file mode 100644
index 0000000..978d5ef
--- /dev/null
+++ b/guests/vars/projects/libvirt-rust.yml
@@ -0,0 +1,4 @@
+---
+packages:
+ - cargo
+ - rust
--
2.26.2
4 years, 6 months
[libvirt-ci PATCH v3] guests: add libvirt-php project packages
by Daniel P. Berrangé
Signed-off-by: Daniel P. Berrangé <berrange(a)redhat.com>
---
guests/vars/mappings.yml | 12 ++++++++++++
guests/vars/projects/libvirt-php.yml | 6 ++++++
2 files changed, 18 insertions(+)
create mode 100644 guests/vars/projects/libvirt-php.yml
diff --git a/guests/vars/mappings.yml b/guests/vars/mappings.yml
index 4808b12..d109d87 100644
--- a/guests/vars/mappings.yml
+++ b/guests/vars/mappings.yml
@@ -831,6 +831,18 @@ mappings:
OpenSUSE:
CentOS7:
+ php:
+ deb: php-dev
+ rpm: php-devel
+ pkg: php74
+
+ php-imagick:
+ deb: php-imagick
+ rpm: php-pecl-imagick
+ pkg: php74-pecl-imagick
+ OpenSUSE: php-imagick
+ CentOS8:
+
pkg-config:
default: pkgconf
rpm: pkgconfig
diff --git a/guests/vars/projects/libvirt-php.yml b/guests/vars/projects/libvirt-php.yml
new file mode 100644
index 0000000..c911dc6
--- /dev/null
+++ b/guests/vars/projects/libvirt-php.yml
@@ -0,0 +1,6 @@
+---
+packages:
+ - php
+ - php-imagick
+ - xmllint
+ - xsltproc
--
2.26.2
4 years, 6 months
[libvirt-ci PATCH v2] guests: add libvirt-php project packages
by Daniel P. Berrangé
Signed-off-by: Daniel P. Berrangé <berrange(a)redhat.com>
---
guests/vars/mappings.yml | 12 ++++++++++++
guests/vars/projects/libvirt-php.yml | 6 ++++++
2 files changed, 18 insertions(+)
create mode 100644 guests/vars/projects/libvirt-php.yml
diff --git a/guests/vars/mappings.yml b/guests/vars/mappings.yml
index 4808b12..3290201 100644
--- a/guests/vars/mappings.yml
+++ b/guests/vars/mappings.yml
@@ -831,6 +831,18 @@ mappings:
OpenSUSE:
CentOS7:
+ php:
+ deb: php-dev
+ rpm: php-devel
+ pkg: php74
+
+ php-imagick:
+ default: php-imagick
+ FreeBSD: php74-pecl-imagick
+ Fedora: php-pecl-imagick
+ CentOS: php-pecl-imagick
+ CentOS8:
+
pkg-config:
default: pkgconf
rpm: pkgconfig
diff --git a/guests/vars/projects/libvirt-php.yml b/guests/vars/projects/libvirt-php.yml
new file mode 100644
index 0000000..c911dc6
--- /dev/null
+++ b/guests/vars/projects/libvirt-php.yml
@@ -0,0 +1,6 @@
+---
+packages:
+ - php
+ - php-imagick
+ - xmllint
+ - xsltproc
--
2.26.2
4 years, 6 months
Re: Backup of vm disk images
by Stefan Hajnoczi
On Wed, Apr 22, 2020 at 07:51:09AM +0200, Anders Östling wrote:
> I am fighting to understand the difference between backing up a VM by
> using a regular copy vs using the virsh blockcopy command.
> What I want to do is to suspend the vm, copy the XML and .QCOW2 files
> and then resume the vm again. What are your thoughts? What are the
> drawbacks compared to other methods?
Hi Anders,
The kvm(a)vger.kernel.org mailing list is mostly for the discussion and
development of the KVM kernel module so you may not get replies. I have
CCed libvir-list and developers who have been involved in libvirt backup
features.
A naive cp(1) command will be very slow because the entire disk image is
copied to a new file. The fastest solution with cp(1) is the --reflink
flag which basically takes a snapshot of the file and shares the disk
blocks (only available when the host file system supports it and not
available across mounts).
Libvirt's backup commands are more powerful. They can do things like
copy out a point-in-time snapshot of the disk while the guest is
running. They also support incremental backup so you don't need to
store a full copy of the disk image each time you take a backup.
I hope others will join the discussion and give examples of some of the
available features.
Stefan
4 years, 6 months
[libvirt-ci PATCH] guests: add libvirt-publican and libvirt-appdev-guide-python projects
by Daniel P. Berrangé
The former provides a publican brand, while the latter provides the
developer guide for the Python API. We want to use these to publish the
docs in GitLab CI. Since the publican toolchain isn't available on
FreeBSD, the projects aren't added to the VM host/project mappings.
Signed-off-by: Daniel P. Berrangé <berrange(a)redhat.com>
---
guests/vars/mappings.yml | 4 ++++
guests/vars/projects/libvirt-appdev-guide-python.yml | 3 +++
guests/vars/projects/libvirt-publican.yml | 3 +++
3 files changed, 10 insertions(+)
create mode 100644 guests/vars/projects/libvirt-appdev-guide-python.yml
create mode 100644 guests/vars/projects/libvirt-publican.yml
diff --git a/guests/vars/mappings.yml b/guests/vars/mappings.yml
index 4808b12..c5951d6 100644
--- a/guests/vars/mappings.yml
+++ b/guests/vars/mappings.yml
@@ -845,6 +845,10 @@ mappings:
OpenSUSE: libpulse-devel
cross-policy-deb: foreign
+ publican:
+ default: publican
+ pkg:
+
python3-docutils:
default: python3-docutils
FreeBSD: py37-docutils
diff --git a/guests/vars/projects/libvirt-appdev-guide-python.yml b/guests/vars/projects/libvirt-appdev-guide-python.yml
new file mode 100644
index 0000000..85f54bf
--- /dev/null
+++ b/guests/vars/projects/libvirt-appdev-guide-python.yml
@@ -0,0 +1,3 @@
+---
+packages:
+ - publican
diff --git a/guests/vars/projects/libvirt-publican.yml b/guests/vars/projects/libvirt-publican.yml
new file mode 100644
index 0000000..85f54bf
--- /dev/null
+++ b/guests/vars/projects/libvirt-publican.yml
@@ -0,0 +1,3 @@
+---
+packages:
+ - publican
--
2.26.2
4 years, 6 months
[PATCH] virt-host-validate-bhyve.c: Reintroduce @ret to virHostValidateBhyve()
by Michal Privoznik
This partially reverts fe65e9c8b50c9029cba0e8c386162d293cd443d2.
In the referenced commit I removed @ret from
virHostValidateBhyve() thinking it wasn't used when in fact it is
- it's usage is hidden under MODULE_STATUS_WARN(). Reintroduce
the variable back.
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
tools/virt-host-validate-bhyve.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/tools/virt-host-validate-bhyve.c b/tools/virt-host-validate-bhyve.c
index 3e8cc59a38..2f0ec1e36c 100644
--- a/tools/virt-host-validate-bhyve.c
+++ b/tools/virt-host-validate-bhyve.c
@@ -47,6 +47,7 @@
int virHostValidateBhyve(void)
{
+ int ret = 0;
int fileid = 0;
struct kld_file_stat stat;
bool vmm_loaded = false, if_tap_loaded = false;
@@ -72,5 +73,5 @@ int virHostValidateBhyve(void)
MODULE_STATUS_WARN(if_bridge, "bridged networking will not work");
MODULE_STATUS_WARN(nmdm, "nmdm console will not work");
- return 0;
+ return ret;
}
--
2.26.2
4 years, 6 months
[PATCH 0/4] Random almost trivial improvements
by Michal Privoznik
These all stem out from me playing with coccinelle.
Michal Prívozník (4):
virnetserver: Check for virNetServerClientInitKeepAlive() retval
rpc: Make some functions void
lib: Drop needless ret variables
src: Fix boolean assignment
src/conf/nwfilter_conf.c | 6 +++---
src/conf/virstorageobj.c | 2 +-
src/locking/lock_daemon.c | 3 +--
src/logging/log_daemon.c | 3 +--
src/lxc/lxc_driver.c | 2 +-
src/nwfilter/nwfilter_dhcpsnoop.c | 2 +-
src/qemu/qemu_agent.c | 10 +++++-----
src/qemu/qemu_monitor.c | 4 ++--
src/remote/remote_daemon.c | 2 +-
src/remote/remote_daemon_config.c | 8 ++++----
src/remote/remote_driver.c | 2 +-
src/rpc/virnetlibsshsession.c | 4 +---
src/rpc/virnetlibsshsession.h | 4 ++--
src/rpc/virnetserver.c | 7 ++++---
src/rpc/virnetserverclient.c | 2 +-
src/rpc/virnetsocket.c | 6 ++----
src/rpc/virnetsshsession.c | 4 +---
src/rpc/virnetsshsession.h | 4 ++--
src/storage/storage_backend_mpath.c | 3 +--
src/util/virnetlink.c | 2 +-
src/util/virtime.c | 4 ++--
src/util/viruri.c | 2 +-
src/vmx/vmx.c | 4 ++--
tools/virt-host-validate-bhyve.c | 3 +--
24 files changed, 42 insertions(+), 51 deletions(-)
--
2.26.2
4 years, 6 months
[libvirt-ci PATCH] guests: add libvirt-php project packages
by Daniel P. Berrangé
Signed-off-by: Daniel P. Berrangé <berrange(a)redhat.com>
---
guests/vars/mappings.yml | 11 +++++++++++
guests/vars/projects/libvirt-php.yml | 6 ++++++
2 files changed, 17 insertions(+)
create mode 100644 guests/vars/projects/libvirt-php.yml
diff --git a/guests/vars/mappings.yml b/guests/vars/mappings.yml
index 4808b12..4fec6f4 100644
--- a/guests/vars/mappings.yml
+++ b/guests/vars/mappings.yml
@@ -831,6 +831,17 @@ mappings:
OpenSUSE:
CentOS7:
+ php:
+ default: php
+ FreeBSD: php74
+
+ php-imagick:
+ default: php-imagick
+ FreeBSD: php74-pecl-imagick
+ Fedora: php-pecl-imagick
+ CentOS: php-pecl-imagick
+ CentOS8:
+
pkg-config:
default: pkgconf
rpm: pkgconfig
diff --git a/guests/vars/projects/libvirt-php.yml b/guests/vars/projects/libvirt-php.yml
new file mode 100644
index 0000000..c911dc6
--- /dev/null
+++ b/guests/vars/projects/libvirt-php.yml
@@ -0,0 +1,6 @@
+---
+packages:
+ - php
+ - php-imagick
+ - xmllint
+ - xsltproc
--
2.26.2
4 years, 6 months