lxc container startup error and RFC patch
by Cole Robinson
Hi all,
I'm seeing LXC container startup failures. This is with libvirt git,
fedora 34 host with systemd-248.6-1.fc34.x86_64 (I didn't confirm with
other versions). Reproducer:
sudo virt-install --connect lxc:/// --name test-container --memory 128
--boot init=/bin/sh
Starting install...
ERROR error from service:
GDBus.Error:org.freedesktop.machine1.NoMachineForPID: PID 2145047 does
not belong to any known machine
libvirt 7.0.0 works but 7.1.0+ does not. The root error seems to predate
that, showing up in syslog, but commit 9c1693eff made it fatal:
commit 9c1693eff427661616ce1bd2795688f87288a412
Author: Pavel Hrdina <phrdina(a)redhat.com>
Date: Fri Feb 5 16:17:35 2021 +0100
vircgroup: use DBus call to systemd for some APIs
The error comes from virSystemdGetMachineByPID. The PID that shows up in
the above error message does not match the leader PID as reported by
machinectl. This change fixes the error but I don't know if it's correct
or if it has other implications:
diff --git a/src/lxc/lxc_controller.c b/src/lxc/lxc_controller.c
index 066e013ed4..54ecb1316b 100644
--- a/src/lxc/lxc_controller.c
+++ b/src/lxc/lxc_controller.c
@@ -866,12 +866,12 @@ static int virLXCControllerSetupCgroupLimits(virLXCController *ctrl)
nodeset = virDomainNumatuneGetNodeset(ctrl->def->numa, auto_nodeset, -1);
if (!(ctrl->cgroup = virLXCCgroupCreate(ctrl->def,
- ctrl->initpid,
+ getpid(),
ctrl->nnicindexes,
ctrl->nicindexes)))
goto cleanup;
- if (virCgroupAddMachineProcess(ctrl->cgroup, getpid()) < 0)
+ if (virCgroupAddMachineProcess(ctrl->cgroup, ctrl->initpid) < 0)
goto cleanup;
/* Add all qemu-nbd tasks to the cgroup */
Maybe something else isn't working elsewhere. Clearly we try to add both
pids to the systemd machine, but virSystemdGetMachineByPID is not
working to match the non-leader pid, which is the one that the LXC
driver knows about.
Thoughts?
Can anyone else reproduce?
Thanks,
Cole
3 years, 3 months
[PATCH v4 13/13] docs/deprecated: deprecate passing plugin args through `arg=`
by Mahmoud Mandour
Signed-off-by: Mahmoud Mandour <ma.mandourr(a)gmail.com>
---
docs/system/deprecated.rst | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/docs/system/deprecated.rst b/docs/system/deprecated.rst
index e2e0090878..7ae6f1f727 100644
--- a/docs/system/deprecated.rst
+++ b/docs/system/deprecated.rst
@@ -126,6 +126,13 @@ other options have been processed. This will either have no effect (if
if they were not given. The property is therefore useless and should not be
specified.
+Plugin argument passing through ``arg=<string>`` (since 6.1)
+''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
+
+Passing TCG plugins arguments through ``arg=`` is redundant is makes the
+command-line less readable, especially when the argument itself consist of a
+name and a value, e.g. ``-plugin plugin_name,arg="arg_name=arg_value"``.
+Therefore, the usage of ``arg`` is redundant.
QEMU Machine Protocol (QMP) commands
------------------------------------
--
2.25.1
3 years, 3 months
[PATCH] rpm: fix mingw obsoletes lines
by Daniel P. Berrangé
The package is mistakenly obsoleting itself, when it should be
obsoleting the -static packages we dropped.
Signed-off-by: Daniel P. Berrangé <berrange(a)redhat.com>
---
mingw-libvirt.spec.in | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/mingw-libvirt.spec.in b/mingw-libvirt.spec.in
index bcc2bd93e3..dbcb6d4b8f 100644
--- a/mingw-libvirt.spec.in
+++ b/mingw-libvirt.spec.in
@@ -69,7 +69,7 @@ MinGW Windows libvirt virtualization library.
# Mingw32
%package -n mingw32-libvirt
Summary: %{summary}
-Obsoletes: mingw32-libvirt < 7.0.0
+Obsoletes: mingw32-libvirt-static < 7.0.0
%description -n mingw32-libvirt
MinGW Windows libvirt virtualization library.
@@ -77,7 +77,7 @@ MinGW Windows libvirt virtualization library.
# Mingw64
%package -n mingw64-libvirt
Summary: %{summary}
-Obsoletes: mingw64-libvirt < 7.0.0
+Obsoletes: mingw64-libvirt-static < 7.0.0
%description -n mingw64-libvirt
MinGW Windows libvirt virtualization library.
--
2.31.1
3 years, 3 months
[PATCH] testutils: Don't leak @testBitmap and @failedTests
by Michal Privoznik
In virTestMain() the @failedTests bitmap is allocated and
optionally @testBitmap too. But neither of them is freed.
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
tests/testutils.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/tests/testutils.c b/tests/testutils.c
index 7d87e30a5c..58d3300998 100644
--- a/tests/testutils.c
+++ b/tests/testutils.c
@@ -856,6 +856,9 @@ int virTestMain(int argc,
fprintf(stderr, "Some tests failed. Run them using:\n");
fprintf(stderr, "VIR_TEST_DEBUG=1 VIR_TEST_RANGE=%s %s\n", failed, argv[0]);
}
+
+ virBitmapFree(testBitmap);
+ virBitmapFree(failedTests);
virLogReset();
return ret;
}
--
2.31.1
3 years, 3 months
Release of libvirt-7.6.0
by Jiri Denemark
The 7.6.0 release of both libvirt and libvirt-python is tagged and
signed tarballs and source RPMs are available at
https://libvirt.org/sources/
https://libvirt.org/sources/python/
Thanks everybody who helped with this release by sending patches,
reviewing, testing, or providing any other feedback. Your work is
greatly appreciated.
* Security
* storage: Unlock pool objects on ACL check failures in ``storagePoolLookupByTargetPath`` (CVE-2021-3667)
A logic bug in ``storagePoolLookupByTargetPath`` where the storage pool
object was left locked after a failure of the ACL check could potentially
deprive legitimate users access to a storage pool object by users who don't
have access.
* New features
* qemu: Incremental backup support via ``virDomainBackupBegin``
libvirt-7.6 along with the unreleased qemu-6.1 will fully support the change
block tracking features (block-dirty-bitmaps) to be able to do incremental
backups and management of the checkpoint states via the appropriate APIs.
* qemu: Add support for launch security type s390-pv
Specifying s390-pv as launch security type in an s390 domain prepares for
running the guest in protected virtualization secure mode, also known as
IBM Secure Execution. This simplifies the definition and reduces the risk
of an incorrect definition, e.g. by forgetting to specify ``iommu=on`` on
all virtio devices.
* domstats: Add haltpolling time statistic interface
Domstats now provide the data of cpu haltpolling time. This feature relies
on statistics available after kernel version 5.8. This will allow the user
to get more accurate CPU usage information if needed.
* Bug fixes
* qemu: Fix migration with ``VIR_MIGRATE_NON_SHARED_INC``
libvirt 7.3.0 introduced a bug where ``VIR_MIGRATE_NON_SHARED_INC`` would
not actually migrate the contents of the disk due to broken logic and at
the same time could trigger migration of storage when
``VIR_MIGRATE_TUNNELLED`` is requested. This release fixes the bug.
* qemu: Don't emit ``VIR_DOMAIN_EVENT_ID_BLOCK_THRESHOLD`` twice when registered with index
When registering the threshold event with the index notation (e.g.
``vda[3]``) libvirt would emit the event also for ``vda`` if the image is
in the top layer. The intention was to emit two events only when the
original registration was done without the index.
* qemu: Pass discard requests for disks with ``copy_on_read='on'``
When a disk using the ``copy_on_read='on'`` option is configured also with
``discard='unmap'`` the discard requests will now be passed to the
underlying image freeing up the space.
Enjoy.
Jirka
3 years, 3 months