[PATCH] virsh: Fix return code for dump
by Xuyandong (Yandong Xu)
>From 4899d04fab878d5a0e13f01b8b137af233bc7d33 Mon Sep 17 00:00:00 2001
From: Xu Yandong <xuyandong2(a)huawei.com>
Date: Mon, 4 May 2020 16:36:19 +0800
Subject: [PATCH] virsh: Fix return code for dump
After the commit dc0771c, ret variable no longer
represents the status of the return code, use
data->ret replace it.
Signed-off-by: Xu Yandong <xuyandong2(a)huawei.com>
---
tools/virsh-domain.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c
index 0704529458..61cd72f714 100644
--- a/tools/virsh-domain.c
+++ b/tools/virsh-domain.c
@@ -5522,7 +5522,6 @@ static bool
cmdDump(vshControl *ctl, const vshCmd *cmd)
{
virDomainPtr dom;
- bool ret = false;
bool verbose = false;
const char *name = NULL;
const char *to = NULL;
@@ -5556,12 +5555,12 @@ cmdDump(vshControl *ctl, const vshCmd *cmd)
virThreadJoin(&workerThread);
- if (!ret)
+ if (!data.ret)
vshPrintExtra(ctl, _("\nDomain %s dumped to %s\n"), name, to);
cleanup:
virshDomainFree(dom);
- return !ret;
+ return !data.ret;
}
static const vshCmdInfo info_screenshot[] = {
--
2.21.0
4 years, 6 months
[PATCH 0/2] qemucapabilitiesdata: Update qemu-5.0 data after release and add qemu-5.1
by Peter Krempa
Peter Krempa (2):
qemucapabilitiesdata: Update x86_64 capabilities to 5.0.0 release
qemucapabilitiesdata: Add test data for x86_64 for the qemu-5.1 dev
cycle
.../domaincapsdata/qemu_5.1.0-q35.x86_64.xml | 194 +
.../domaincapsdata/qemu_5.1.0-tcg.x86_64.xml | 197 +
tests/domaincapsdata/qemu_5.1.0.x86_64.xml | 194 +
.../caps_5.0.0.x86_64.replies | 8 +-
.../caps_5.0.0.x86_64.xml | 4 +-
.../caps_5.1.0.x86_64.replies | 28830 ++++++++++++++++
.../caps_5.1.0.x86_64.xml | 3016 ++
7 files changed, 32437 insertions(+), 6 deletions(-)
create mode 100644 tests/domaincapsdata/qemu_5.1.0-q35.x86_64.xml
create mode 100644 tests/domaincapsdata/qemu_5.1.0-tcg.x86_64.xml
create mode 100644 tests/domaincapsdata/qemu_5.1.0.x86_64.xml
create mode 100644 tests/qemucapabilitiesdata/caps_5.1.0.x86_64.replies
create mode 100644 tests/qemucapabilitiesdata/caps_5.1.0.x86_64.xml
--
2.26.2
4 years, 6 months
[PATCH] systemd: start libvirtd after firewalld/iptables services
by Laine Stump
When a system has enabled the iptables/ip6tables services rather than
firewalld, there is no explicit ordering of the start of those
services vs. libvirtd. This creates a problem when libvirtd.service is
started before ip[6]tables, as the latter, when it finally is started,
will remove all of the iptables rules that had previously been added
by libvirt, including the custom chains where libvirt's rules are
kept. This results in an error message similar to the following when a
user subsequently tries to start a new libvirt network:
"Error while activating network: Call to virNetworkCreate failed:
internal error: Failed to apply firewall rules
/usr/sbin/ip6tables -w --table filter --insert LIBVIRT_FWO \
--in-interface virbr2 --jump REJECT:
ip6tables: No chain/target/match by that name."
(Prior to logging this error, it also would have caused failure to
forward (or block) traffic in some cases, e.g. for guests on a NATed
network, since libvirt's rules to forward/block had all been deleted
and libvirt didn't know about it, so it couldn't fix the problem)
When this happens, the problem can be remedied by simply restarting
libvirtd.service (which has the side-effect of reloading all
libvirt-generated firewall rules)
Instead, we can just explicitly stating in the libvirtd.service file
that libvirtd.service should start after ip6tables.service and
ip6tables.service, eliminating the race condition that leads to the
error.
There is also nothing (that I can see) in the systemd .service files
to guarantee that firewalld.service will be started (if enabled) prior
to libvirtd.service. The same error scenario given above would occur
if libvirtd.service started before firewalld.service. Even before
that, though libvirtd would have detected that firewalld.service was
disabled, and then turn off all firewalld support. So, for example,
firewalld's libvirt zone wouldn't be used, and most likely traffic
from guests would therefore be blocked (all with no external
indication of the source of the problem other than a debug-level log
when libvirtd was started saying that firewalld wasn't in use); also
libvirtd wouldn't notice when firewalld reloaded its rules (which also
simultaneously deletes all of libvirt's rules).
I'm not aware of any reports that have been traced back to
libvirtd.service starting before firewalld.service, but have seen that
error reported multiple times, and also don't see an existing
dependency that would guarantee firewalld.service starts before
libvirtd.service, so it's possible it's been happening and we just
haven't gotten to the bottom of it.
This patch adds an After= line to the libvirtd.service file for each
of iptables.service, ip6tables.service, and firewalld.servicee, which
should guarantee that libvirtd.service isn't started until systemd has
started whichever of the others is enabled.
This race was diagnosed, and patch proposed, by Jason Montleon in
https://bugzilla.redhat.com/1723698 . At the time (April 2019) danpb
agreed with him that this change to libvirtd.service was a reasonable
thing to do, but I guess everyone thought someone else was going to
post a patch, so in the end nobody did.
Signed-off-by: Laine Stump <laine(a)redhat.com>
---
src/remote/libvirtd.service.in | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/remote/libvirtd.service.in b/src/remote/libvirtd.service.in
index 90b2cad5b0..cc0d4e3693 100644
--- a/src/remote/libvirtd.service.in
+++ b/src/remote/libvirtd.service.in
@@ -11,6 +11,9 @@ Wants=libvirtd-admin.socket
Wants=systemd-machined.service
Before=libvirt-guests.service
After=network.target
+After=firewalld.service
+After=iptables.service
+After=ip6tables.service
After=dbus.service
After=iscsid.service
After=apparmor.service
--
2.25.4
4 years, 6 months
[libvirt PATCHv2] docs: note that <dnsmasq:option> was added in libvirt 5.6.0
by Laine Stump
To make it simpler to answer questions of "Why doesn't this thing work
for me?"
Signed-off-by: Laine Stump <laine(a)redhat.com>
---
Sigh. As danpb pointed out when I sent this before, I had copy/pasted
a "since" clause (and taken the time to make sure I could still do a
build) but hadn't bothered to replace the version number itself in the
bit that I pasted :-/
(this is why I don't allow the "trivial" rule for pushing patches to
apply to myself)
docs/formatnetwork.html.in | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/docs/formatnetwork.html.in b/docs/formatnetwork.html.in
index 2bccac014b..9f86e9567d 100644
--- a/docs/formatnetwork.html.in
+++ b/docs/formatnetwork.html.in
@@ -1124,9 +1124,11 @@
<h3><a id="elementsNamespaces">Network namespaces</a></h3>
<p>
- A special XML namespace is available for passing options directly to the
- underlying dnsmasq configuration file. Usage of XML namespaces comes with no
- support guarantees, so use at your own risk.
+ A special XML namespace is available for passing options
+ directly to the underlying dnsmasq configuration
+ file <span class="since">Since 5.6.0</span>. Usage of XML
+ namespaces comes with no support guarantees, so use at your own
+ risk.
</p>
<p>
--
2.25.4
4 years, 6 months
[PATCH] news: Update for libvirt 6.3.0
by Michal Privoznik
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
docs/news.xml | 74 +++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 74 insertions(+)
diff --git a/docs/news.xml b/docs/news.xml
index 80819aec23..986e7ca5f8 100644
--- a/docs/news.xml
+++ b/docs/news.xml
@@ -121,8 +121,82 @@
</change>
</section>
<section title="Improvements">
+ <change>
+ <summary>
+ qemu: Allow checkpoint redefine for offline VMs
+ </summary>
+ <description>
+ Skip the liveness and capability checks when redefining checkpoints as
+ we don't need qemu interactions to update the metadata.
+ </description>
+ </change>
+ <change>
+ <summary>
+ daemons: Improve timeout handling
+ </summary>
+ <description>
+ Daemons now support <code> --timeout 0 </code> which suppresses daemon
+ killing after given time of inactivity.
+ </description>
+ </change>
+ <change>
+ <summary>
+ qemu: add support for 'multidevs' option
+ </summary>
+ <description>
+ This option prevents misbehaviours on guest if a QEMU 9pfs export
+ contains multiple devices, due to the potential file ID collisions
+ this otherwise may cause.
+ </description>
+ </change>
</section>
<section title="Bug fixes">
+ <change>
+ <summary>
+ qemu: Various embed driver fixes
+ </summary>
+ <description>
+ When using shared resources from embed driver (e.g. hugepages,
+ machined, etc.) libvirt now generates an unique handler that is not
+ conflicting with other embed drivers or system or session daemons.
+ </description>
+ </change>
+ <change>
+ <summary>
+ Distinguish Cascadelake-Server from Skylake-Server
+ </summary>
+ <description>
+ Libvirt now properly detects Cascadelake-Server and Skylake-Server
+ processors which differ only in stepping.
+ </description>
+ </change>
+ <change>
+ <summary>
+ qemu: Fix domain restore from a block device
+ </summary>
+ <description>
+ When using namespaces, libvirt was unable to restore a domain from a
+ block device because libvirt tried to relabel the device inside the
+ namespace while QEMU was given FD to the block device in the host.
+ </description>
+ </change>
+ <change>
+ <summary>
+ node_device_udev: handle move events
+ </summary>
+ <description>
+ Libvirt now handles <code>move</code> event which is emitted on a NIC rename.
+ </description>
+ </change>
+ <change>
+ <summary>
+ qemu: Fix capabilities probing with TCG
+ </summary>
+ <description>
+ Libvirt no long assumes TCG is always available. It now detects
+ whether QEMU supports TCG and reports it accordingly.
+ </description>
+ </change>
</section>
<section title="Removed features">
<change>
--
2.26.2
4 years, 6 months
[libvirt PATCH] gitlab: convert to shared container for DCO check
by Daniel P. Berrangé
This removes the locally maintained DCO checking script in favour of the
shared containre image provided by libvirt-ci.git.
Signed-off-by: Daniel P. Berrangé <berrange(a)redhat.com>
---
.gitlab-ci.yml | 21 ++++-----
scripts/require-dco.py | 99 ------------------------------------------
2 files changed, 9 insertions(+), 111 deletions(-)
delete mode 100755 scripts/require-dco.py
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 99e7b510c7..3752618b43 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -221,18 +221,15 @@ potfile:
- libvirt.pot
-# Check that all commits are signed-off for the DCO. Skip
-# on master branch and -maint branches, since we only need
-# to test developer's personal branches.
-dco:
+# Check that all commits are signed-off for the DCO.
+# Skip on "libvirt" namespace, since we only need to run
+# this test on developer's personal forks from which
+# merge requests are submitted
+check-dco:
stage: prebuild
- image: quay.io/libvirt/buildenv-libvirt-fedora-31:latest
- before_script:
- - *script_variables
+ image: registry.gitlab.com/libvirt/libvirt-ci/check-dco:master
script:
- - ./scripts/require-dco.py
- only:
- - branches
+ - /check-dco
except:
- - /^v.*-maint$/
- - master
+ variables:
+ - $CI_PROJECT_NAMESPACE == 'libvirt'
diff --git a/scripts/require-dco.py b/scripts/require-dco.py
deleted file mode 100755
index ae94393319..0000000000
--- a/scripts/require-dco.py
+++ /dev/null
@@ -1,99 +0,0 @@
-#!/usr/bin/env python3
-
-# require-dco.py: validate all commits are signed off
-#
-# Copyright (C) 2020 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 os
-import os.path
-import sys
-import subprocess
-
-cwd = os.getcwd()
-reponame = os.path.basename(cwd)
-repourl = "https://gitlab.com/libvirt/%s.git" % reponame
-
-subprocess.check_call(["git", "remote", "add", "dcocheck", repourl])
-subprocess.check_call(["git", "fetch", "dcocheck", "master"],
- stdout=subprocess.DEVNULL,
- stderr=subprocess.DEVNULL)
-
-ancestor = subprocess.check_output(["git", "merge-base", "dcocheck/master", "HEAD"],
- universal_newlines=True)
-
-ancestor = ancestor.strip()
-
-subprocess.check_call(["git", "remote", "rm", "dcocheck"])
-
-errors = False
-
-print("\nChecking for 'Signed-off-by: NAME <EMAIL>' on all commits since %s...\n" % ancestor)
-
-log = subprocess.check_output(["git", "log", "--format=%H %s", ancestor + "..."],
- universal_newlines=True)
-
-if log == "":
- commits = []
-else:
- commits = [[c[0:40], c[41:]] for c in log.strip().split("\n")]
-
-for sha, subject in commits:
-
- msg = subprocess.check_output(["git", "show", "-s", sha],
- universal_newlines=True)
- lines = msg.strip().split("\n")
-
- print("🔍 %s %s" % (sha, subject))
- sob = False
- for line in lines:
- if "Signed-off-by:" in line:
- sob = True
- if "localhost" in line:
- print(" ❌ FAIL: bad email in %s" % line)
- errors = True
-
- if not sob:
- print(" ❌ FAIL missing Signed-off-by tag")
- errors = True
-
-if errors:
- print("""
-
-❌ ERROR: One or more commits are missing a valid Signed-off-By tag.
-
-
-This project requires all contributors to assert that their contributions
-are provided in compliance with the terms of the Developer's Certificate
-of Origin 1.1 (DCO):
-
- https://developercertificate.org/
-
-To indicate acceptance of the DCO every commit must have a tag
-
- Signed-off-by: REAL NAME <EMAIL>
-
-This can be achieved by passing the "-s" flag to the "git commit" command.
-
-To bulk update all commits on current branch "git rebase" can be used:
-
- git rebase -i master -x 'git commit --amend --no-edit -s'
-
-""")
-
- sys.exit(1)
-
-sys.exit(0)
--
2.25.4
4 years, 6 months
[libvirt-python PATCH v3 0/3] gitlab: introduce CI jobs for validating python build
by Daniel P. Berrangé
This introduces GitLab CI to the python module. Traditional Jenkins has
validated the python build across all distros, using libvirt git. This
tested one axis - a variety of python versions - but failed to test the
other interesting axis - a variety of libvirt versions.
This new CI setup fixes that mistake validating both axis.
Daniel P. Berrangé (3):
test: workaround missing VIR_TYPED_PARAM enums in API definition
gitlab: introduce CI jobs testing git master & distro libvirt
travis: delete redundant configuration
.gitlab-ci.yml | 185 +++++++++++++++++++++++++++
.travis.yml | 55 --------
ci/README.rst | 13 ++
ci/libvirt-centos-7.Dockerfile | 86 +++++++++++++
ci/libvirt-centos-8.Dockerfile | 64 +++++++++
ci/libvirt-debian-10.Dockerfile | 56 ++++++++
ci/libvirt-debian-9.Dockerfile | 59 +++++++++
ci/libvirt-debian-sid.Dockerfile | 56 ++++++++
ci/libvirt-fedora-31.Dockerfile | 53 ++++++++
ci/libvirt-fedora-32.Dockerfile | 53 ++++++++
ci/libvirt-fedora-rawhide.Dockerfile | 54 ++++++++
ci/libvirt-opensuse-151.Dockerfile | 55 ++++++++
ci/libvirt-ubuntu-1804.Dockerfile | 59 +++++++++
ci/libvirt-ubuntu-2004.Dockerfile | 56 ++++++++
ci/refresh | 27 ++++
sanitytest.py | 6 +-
16 files changed, 881 insertions(+), 56 deletions(-)
create mode 100644 .gitlab-ci.yml
delete mode 100644 .travis.yml
create mode 100644 ci/README.rst
create mode 100644 ci/libvirt-centos-7.Dockerfile
create mode 100644 ci/libvirt-centos-8.Dockerfile
create mode 100644 ci/libvirt-debian-10.Dockerfile
create mode 100644 ci/libvirt-debian-9.Dockerfile
create mode 100644 ci/libvirt-debian-sid.Dockerfile
create mode 100644 ci/libvirt-fedora-31.Dockerfile
create mode 100644 ci/libvirt-fedora-32.Dockerfile
create mode 100644 ci/libvirt-fedora-rawhide.Dockerfile
create mode 100644 ci/libvirt-opensuse-151.Dockerfile
create mode 100644 ci/libvirt-ubuntu-1804.Dockerfile
create mode 100644 ci/libvirt-ubuntu-2004.Dockerfile
create mode 100755 ci/refresh
--
2.25.4
4 years, 6 months
Entering freeze for libvirt 6.3.0
by Daniel Veillard
We are getting close to the end of the month, so I tagged RC1 in git
and pushed signed source tarball and rpms to the usual place:
https://libvirt.org/sources/
Seems to work fine in my very limited testing, CI seems green except for a
couple of mingw tests, so that looks good from a distance.
Please give it some testing, RC2 should land on Thursday, and then if
everything looks fine I could push the final version over the coming week-end.
Stay safe, please test it,
thanks,
Daniel
--
Daniel Veillard | Red Hat Developers Tools http://developer.redhat.com/
veillard(a)redhat.com | libxml Gnome XML XSLT toolkit http://xmlsoft.org/
http://veillard.com/ | virtualization library http://libvirt.org/
4 years, 6 months
[libvirt PATCH] docs: Fix grammar in virsh.rst
by Andrea Bolognani
"allows to" -> "allows one to"
Spotted by Lintian (spelling-error-in-manpage tag).
Signed-off-by: Andrea Bolognani <abologna(a)redhat.com>
---
Pushed as trivial.
docs/manpages/virsh.rst | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/docs/manpages/virsh.rst b/docs/manpages/virsh.rst
index dc404ddfe8..969a4d5543 100644
--- a/docs/manpages/virsh.rst
+++ b/docs/manpages/virsh.rst
@@ -6567,8 +6567,8 @@ secret-set-value
Set the value associated with *secret* (specified by its UUID) to the value
Base64-encoded value *base64* or Base-64-encoded contents of file named
-*filename*. Using the *--plain* flag is together with *--file* allows to use
-the file contents directly as the secret value.
+*filename*. Using the *--plain* flag is together with *--file* allows one to
+use the file contents directly as the secret value.
If *--interactive* flag is used the secret value is read as a password from the
terminal.
@@ -6752,7 +6752,7 @@ xml. Each <diskspec> is in the
form ``disk[,snapshot=type][,driver=type][,stype=type][,file=name]``.
A *diskspec* must be provided for disks backed by block devices as libvirt
doesn't auto-generate file names for those. The optional ``stype`` parameter
-allows to control the type of the source file. Supported values are 'file'
+allows one to control the type of the source file. Supported values are 'file'
(default) and 'block'. To exclude a disk from an external snapshot use
``--diskspec disk,snapshot=no``.
--
2.25.4
4 years, 6 months
[libvirt-python PATCH v2 0/3] gitlab: introduce CI jobs for validating python build
by Daniel P. Berrangé
This introduces GitLab CI to the python module. Traditional Jenkins has
validated the python build across all distros, using libvirt git. This
tested one axis - a variety of python versions - but failed to test the
other interesting axis - a variety of libvirt versions.
This new CI setup fixes that mistake validating both axis.
Daniel P. Berrangé (3):
test: workaround missing VIR_TYPED_PARAM enums in API definition
gitlab: introduce CI jobs testing git master & distro libvirt
travis: delete redundant configuration
.gitlab-ci.yml | 171 +++++++++++++++++++++++++++
.travis.yml | 55 ---------
ci/README.rst | 12 ++
ci/libvirt-centos-7.Dockerfile | 86 ++++++++++++++
ci/libvirt-centos-8.Dockerfile | 64 ++++++++++
ci/libvirt-debian-10.Dockerfile | 56 +++++++++
ci/libvirt-debian-9.Dockerfile | 59 +++++++++
ci/libvirt-debian-sid.Dockerfile | 56 +++++++++
ci/libvirt-fedora-30.Dockerfile | 53 +++++++++
ci/libvirt-fedora-31.Dockerfile | 53 +++++++++
ci/libvirt-fedora-rawhide.Dockerfile | 54 +++++++++
ci/libvirt-opensuse-151.Dockerfile | 55 +++++++++
ci/libvirt-ubuntu-1604.Dockerfile | 59 +++++++++
ci/libvirt-ubuntu-1804.Dockerfile | 59 +++++++++
ci/refresh | 27 +++++
sanitytest.py | 6 +-
16 files changed, 869 insertions(+), 56 deletions(-)
create mode 100644 .gitlab-ci.yml
delete mode 100644 .travis.yml
create mode 100644 ci/README.rst
create mode 100644 ci/libvirt-centos-7.Dockerfile
create mode 100644 ci/libvirt-centos-8.Dockerfile
create mode 100644 ci/libvirt-debian-10.Dockerfile
create mode 100644 ci/libvirt-debian-9.Dockerfile
create mode 100644 ci/libvirt-debian-sid.Dockerfile
create mode 100644 ci/libvirt-fedora-30.Dockerfile
create mode 100644 ci/libvirt-fedora-31.Dockerfile
create mode 100644 ci/libvirt-fedora-rawhide.Dockerfile
create mode 100644 ci/libvirt-opensuse-151.Dockerfile
create mode 100644 ci/libvirt-ubuntu-1604.Dockerfile
create mode 100644 ci/libvirt-ubuntu-1804.Dockerfile
create mode 100755 ci/refresh
--
2.25.4
4 years, 6 months