]> xenbits.xensource.com Git - libvirt.git/log
libvirt.git
18 months agoqemustatusxml2xmltest: Demonstrate use of VIR_DOMAIN_DEF_(PARSE|FORMAT)_VOLUME_TRANSLATED
Peter Krempa [Thu, 12 Oct 2023 13:56:59 +0000 (15:56 +0200)]
qemustatusxml2xmltest: Demonstrate use of VIR_DOMAIN_DEF_(PARSE|FORMAT)_VOLUME_TRANSLATED

Enable the flags in the status xml2xmtest and add an exaple to the test
data.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
18 months agoqemu: domain: Allow preserving translated disk type='volume' data into XML if needed
Peter Krempa [Thu, 12 Oct 2023 13:42:29 +0000 (15:42 +0200)]
qemu: domain: Allow preserving translated disk type='volume' data into XML if needed

Re-translating a disk type='volume' definition from a storage pool is
not a good idea in cases when the volume might have changed or we might
not have access to the storage driver.

Specific cases are if a storage pool is not activated on daemon restart,
then re-connecting to a VM fails, or if the virt-aa-helper program tries
to setup labelling for apparmor.

Add a new flag which will preserve the translated data in the
definition.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
18 months agovirDomainDiskTranslateSourcePool: Don't re-translate already translated defs
Peter Krempa [Thu, 12 Oct 2023 14:18:12 +0000 (16:18 +0200)]
virDomainDiskTranslateSourcePool: Don't re-translate already translated defs

If a disk definition was already translated re-doing it makes no sense.

Skip the translation if the 'actualtype' is already populated.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
18 months agovirDomainDiskSourcePoolDefParse: Refactor cleanup
Peter Krempa [Thu, 12 Oct 2023 13:07:52 +0000 (15:07 +0200)]
virDomainDiskSourcePoolDefParse: Refactor cleanup

Register autoptr cleanup function for virStorageSourcePoolDef and
refactor the parser to simplify the logic.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
18 months agovirStorageSourcePoolDef: Turn 'mode' member into proper enum type
Peter Krempa [Thu, 12 Oct 2023 13:13:52 +0000 (15:13 +0200)]
virStorageSourcePoolDef: Turn 'mode' member into proper enum type

Use proper enum type and refactor the formatter accordingly.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
18 months agoTranslated using Weblate (Korean)
김인수 [Wed, 11 Oct 2023 10:36:12 +0000 (12:36 +0200)]
Translated using Weblate (Korean)

Currently translated at 100.0% (10413 of 10413 strings)

Translation: libvirt/libvirt
Translate-URL: https://translate.fedoraproject.org/projects/libvirt/libvirt/ko/

Co-authored-by: 김인수 <simmon@nplob.com>
Signed-off-by: 김인수 <simmon@nplob.com>
18 months agovirSecretLoad: Simplify cleanup path
Michal Privoznik [Mon, 16 Oct 2023 08:03:28 +0000 (10:03 +0200)]
virSecretLoad: Simplify cleanup path

When loading a secret value fails, the control jumps over to the
'cleanup' label where explicit call to virSecretDefFree()
happens. This is unnecessary as the corresponding variable can be
declared with g_autoptr() after which all error paths can just
return NULL instantly.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
18 months agovirSecretLoadAllConfigs: Use g_autofree for @path
Michal Privoznik [Mon, 16 Oct 2023 07:49:02 +0000 (09:49 +0200)]
virSecretLoadAllConfigs: Use g_autofree for @path

When loading virSecret configs, the @path variable holds path to
individual config files. In each iteration it is freed explicitly
using VIR_FREE(). Switch it to g_autofree and remove those
explicit calls.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
18 months agovirfile: Drop virBuildPathInternal()
Michal Privoznik [Mon, 16 Oct 2023 07:43:17 +0000 (09:43 +0200)]
virfile: Drop virBuildPathInternal()

After previous cleanup the virBuildPathInternal() function is no
longer used. Drop it.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
18 months agolib: Replace virBuildPath() with g_build_filename()
Michal Privoznik [Mon, 16 Oct 2023 07:40:58 +0000 (09:40 +0200)]
lib: Replace virBuildPath() with g_build_filename()

Our virBuildPath() constructs a path from given arguments.
Exactly like g_build_filename(), except the latter is more
generic as it uses backslashes on Windows. Therefore, replace the
former with the latter.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
18 months agovirDomainMemoryDefValidate: Skip the same device on validation on memory device update
Michal Privoznik [Fri, 13 Oct 2023 06:38:45 +0000 (08:38 +0200)]
virDomainMemoryDefValidate: Skip the same device on validation on memory device update

In my recent commit of v9.8.0-rc1~7 I've introduced validation
wrt other memory devices. And mostly works, except when doing
memory device update ('virsh update-memory-device') because then
@mem is just parsed <memory/> device XML and thus its pointer is
not in the vm->def->mem, yet. Thus my algorithm which skips over
the same entry fails. Fortunately, we require full device XML on
device update and thus we can use device address and aliases to
detect duplicity.

Fixes: 3fd64fb0e236fc80ffa2cc977c0d471f11fc39bf
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
18 months agoqemuMonitorJSONHandleTrayChange: Properly handle if 'devAlias' is missing
Sergey Mironov [Wed, 11 Oct 2023 08:19:08 +0000 (11:19 +0300)]
qemuMonitorJSONHandleTrayChange: Properly handle if 'devAlias' is missing

While qemu is still reporting the 'device' field in the tray even the
code was not ready for the possibility of it missing. Fix the condition
for clearing 'devAlias' if qemu doesn't report the 'device' field.

Signed-off-by: Sergey Mironov <mironov@fintech.ru>
18 months agodocs: testtck: Expand the 'Run TCK' section on making use of ci/jobs.sh
Erik Skultety [Wed, 27 Sep 2023 18:45:25 +0000 (20:45 +0200)]
docs: testtck: Expand the 'Run TCK' section on making use of ci/jobs.sh

Ever since commit 6e9bd600d7cf56b16620bf4c453427b01368360d added a new
GitLab job description function handling the integration test suite
process to ci/jobs.sh it should be mentioned in the docs.

This patch splits the 'Run TCK' section in two, giving user the option
to run the integration test suite in their VM environment the same way
as we do in GitLab CI or execute everything manually.
This patch takes the opportunity to also link to the virtiofs kbase
article to give users a different option to get the local libvirt
repositories to be used in testing inside a VM.

Signed-off-by: Erik Skultety <eskultet@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
18 months agodocs: testtck: Add a clear note on libvirt + Perl bindings dependency
Erik Skultety [Wed, 27 Sep 2023 18:41:05 +0000 (20:41 +0200)]
docs: testtck: Add a clear note on libvirt + Perl bindings dependency

It's mentioned in an earlier paragraph that Perl bindings in correct
version are needed, but there's no note about libvirt even though it
should be obvious. So make a clear note on that and while at it, do
mention the possibility to get upstream libvirt RPMs from GitLab CI
artifacts if users don't feel like building everything on their own.

Signed-off-by: Erik Skultety <eskultet@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
18 months agodocs: testing: Adjust the docs on how to run container workloads locally
Erik Skultety [Wed, 27 Sep 2023 12:40:29 +0000 (14:40 +0200)]
docs: testing: Adjust the docs on how to run container workloads locally

The fact that we need ci/helper script to run the workloads remains
true, but the invocation has changed as of commit
eb41e456309dbea5b8b9f647f953ad98985ec1fe . We also extracted GitLab job
specs into a standalone ci/jobs.sh script which allows execution of any
container job we run in upstream CI locally, unlike the original
functionality which only allowed builds, tests and shell (although
important to say it could be adjusted with the right meson/ninja args).

lcitool also became mandatory as it enables the container execution
which replaced a Makefile we used to have for this purpose.

Signed-off-by: Erik Skultety <eskultet@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
18 months agodocs: testtck: Improve the documentation on how to get a VM from lcitool
Erik Skultety [Wed, 27 Sep 2023 10:15:55 +0000 (12:15 +0200)]
docs: testtck: Improve the documentation on how to get a VM from lcitool

While wording is still correct to this day, we have already added more
features to lcitool and documented it properly in its repo. Make sure
that we refer the users to lcitool's doc material for further details
on how VMs can be installed locally.
Use the opportunity to bump the OS distro target from Fedora 36 -> 38.

Signed-off-by: Erik Skultety <eskultet@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
18 months agodocs: testtck: Tweak the Avocado command to run TCK test suite
Erik Skultety [Wed, 27 Sep 2023 10:13:23 +0000 (12:13 +0200)]
docs: testtck: Tweak the Avocado command to run TCK test suite

While we may have needed to run TCK through Avocado by explicitly using
the '--tap' option (still possible), we can get a nice output from
Avocado by default leaving the option out which is exactly what we do
inside GitLab CI environment.

Signed-off-by: Erik Skultety <eskultet@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
18 months agodocs: ci: Update the description on the integration CI GitLab variables
Erik Skultety [Wed, 27 Sep 2023 08:38:57 +0000 (10:38 +0200)]
docs: ci: Update the description on the integration CI GitLab variables

This patch mainly fixes an unfinished sentence that was supposed to
describe the LIBVIRT_CI_INTEGRATION_RUNNER_TAG variable, but took the
opportunity to update the description of the other variable too.

Signed-off-by: Erik Skultety <eskultet@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
18 months agodocs: ci-runners: Add a note on a new runner registration process
Erik Skultety [Wed, 27 Sep 2023 08:34:12 +0000 (10:34 +0200)]
docs: ci-runners: Add a note on a new runner registration process

The documented process should be updated to reflect the new process
once GitLab transitions to it completely and drops the old process
involving registration tokens as hinted by the note.

Signed-off-by: Erik Skultety <eskultet@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
18 months agoutil: vircommand: fix redundant if
Dmitry Frolov [Tue, 10 Oct 2023 08:54:14 +0000 (11:54 +0300)]
util: vircommand: fix redundant if

Comparison "if (ret == -1)" is always false.
This statement was forgotten during switching to g_new0()

Found by Linux Verification Center (linuxtesting.org) with SVACE.

Fixes: 0275b06a55fc7b1ec6a9e93f7fb73bea7388f634 ("util: command: use g_new0")
Signed-off-by: Dmitry Frolov <frolov@swemel.ru>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
18 months agoNEWS: document support for reverting external snapshots
Pavel Hrdina [Wed, 6 Sep 2023 12:49:08 +0000 (14:49 +0200)]
NEWS: document support for reverting external snapshots

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
18 months agocapabilities: report full external snapshot support
Pavel Hrdina [Thu, 24 Aug 2023 16:19:52 +0000 (18:19 +0200)]
capabilities: report full external snapshot support

Now that deleting and reverting external snapshots is implemented we can
report that in capabilities so management applications can use that
information and start using external snapshots.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
18 months agoqemu_snapshot: correctly load the saved memory state file
Pavel Hrdina [Wed, 30 Aug 2023 15:06:17 +0000 (17:06 +0200)]
qemu_snapshot: correctly load the saved memory state file

Original code assumed that the memory state file is only migration
stream but it has additional metadata stored by libvirt. To correctly
load the memory state file we need to reuse code that is used when
restoring domain from saved image.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
18 months agoqemu_snapshot: fix reverting external snapshot when not all disks are included
Pavel Hrdina [Wed, 30 Aug 2023 14:31:55 +0000 (16:31 +0200)]
qemu_snapshot: fix reverting external snapshot when not all disks are included

We need to skip all disks that have snapshot type other than 'external'.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
18 months agoqemuProcessStartWithMemoryState: make it possible to use without data
Pavel Hrdina [Wed, 27 Sep 2023 09:41:46 +0000 (11:41 +0200)]
qemuProcessStartWithMemoryState: make it possible to use without data

When used with internal snapshots there is no memory state file so we
have no data to load and decompression is not needed.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
18 months agoqemuProcessStartWithMemoryState: add snapshot argument
Pavel Hrdina [Mon, 18 Sep 2023 12:28:45 +0000 (14:28 +0200)]
qemuProcessStartWithMemoryState: add snapshot argument

When called from snapshot code we will need to pass snapshot object in
order to make internal snapshots work correctly.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
18 months agoqemuProcessStartWithMemoryState: allow setting reason for audit log
Pavel Hrdina [Mon, 18 Sep 2023 12:26:41 +0000 (14:26 +0200)]
qemuProcessStartWithMemoryState: allow setting reason for audit log

When called by snapshot code we will need to use different reason.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
18 months agoqemu_saveimage: move qemuSaveImageStartProcess to qemu_process
Pavel Hrdina [Mon, 18 Sep 2023 13:20:12 +0000 (15:20 +0200)]
qemu_saveimage: move qemuSaveImageStartProcess to qemu_process

The function will no longer be used only when restoring VM as it will
be used when reverting snapshot as well so move it to qemu_process
and rename it accordingly.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
18 months agoqemu_saveimage: introduce helpers to decompress memory state file
Pavel Hrdina [Mon, 18 Sep 2023 13:13:48 +0000 (15:13 +0200)]
qemu_saveimage: introduce helpers to decompress memory state file

These new helpers separates the code from the logic used to start new
QEMU process with memory state and will make it easier to move
qemuSaveImageStartProcess() into qemu_process.c file.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
18 months agoqemu_saveimage: extract starting process to qemuSaveImageStartProcess
Pavel Hrdina [Thu, 31 Aug 2023 13:01:45 +0000 (15:01 +0200)]
qemu_saveimage: extract starting process to qemuSaveImageStartProcess

Part of qemuSaveImageStartVM() function will be used when reverting
external snapshots. To avoid duplicating code and logic extract the
shared bits into separate function.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
18 months agodocs: Fix typos
Han Han [Mon, 9 Oct 2023 01:18:26 +0000 (09:18 +0800)]
docs: Fix typos

Signed-off-by: Han Han <hhan@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Signed-off-by: Ján Tomko <jtomko@redhat.com>
18 months agoTranslated using Weblate (Swedish)
Göran Uddeborg [Sat, 7 Oct 2023 20:36:00 +0000 (22:36 +0200)]
Translated using Weblate (Swedish)

Currently translated at 51.9% (5407 of 10413 strings)

Translation: libvirt/libvirt
Translate-URL: https://translate.fedoraproject.org/projects/libvirt/libvirt/sv/

Co-authored-by: Göran Uddeborg <goeran@uddeborg.se>
Signed-off-by: Göran Uddeborg <goeran@uddeborg.se>
19 months agomeson: Improve nbdkit configurability
Andrea Bolognani [Wed, 4 Oct 2023 22:37:09 +0000 (00:37 +0200)]
meson: Improve nbdkit configurability

Currently, nbdkit support will automatically be enabled as long as
the pidfd_open(2) syscall is available. Optionally, libnbd is used
to generate more user-friendly error messages.

In theory this is all good, since use of nbdkit is supposed to be
transparent to the user. In practice, however, there is a problem:
if support for it is enabled at build time and the necessary
runtime components are installed, nbdkit will always be preferred,
with no way for the user to opt out.

This will arguably be fine in the long run, but right now none of
the platforms that we target ships with a SELinux policy that
allows libvirt to launch nbdkit, and the AppArmor policy that we
maintain ourselves hasn't been updated either.

So, in practice, as of today having nbdkit installed on the host
makes network disks completely unusable unless you're willing to
compromise the overall security of the system by disabling
SELinux/AppArmor.

In order to make the transition smoother, provide a convenient
way for users and distro packagers to disable nbdkit support at
compile time until SELinux and AppArmor are ready.

In the process, detection is completely overhauled. libnbd is
made mandatory when nbdkit support is enabled, since availability
across operating systems is comparable and offering users the
option to make error messages worse doesn't make a lot of sense;
we also make sure that an explicit request from the user to
enable/disable nbdkit support is either complied with, or results
in a build failure when that's not possible. Last but not least,
we avoid linking against libnbd when nbdkit support is disabled.

At the RPM level, we disable the feature when building against
anything older than Fedora 40, which still doesn't have the
necessary SELinux bits but will hopefully gain them by the time
it's released. We also allow nbdkit support to be disabled at
build time the same way as other optional features, that is, by
passing "--define '_without_nbdkit 1'" to rpmbuild. Finally, if
nbdkit support has been disabled, installing libvirt will no
longer drag it in as a (weak) dependency.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Jonathon Jongsma <jjongsma@redhat.com>
19 months agoqemu: DomainGetGuestVcpusParams: reduce scope of tmp
Ján Tomko [Fri, 29 Sep 2023 12:37:47 +0000 (14:37 +0200)]
qemu: DomainGetGuestVcpusParams: reduce scope of tmp

Wrap the macro body in a new block and move the declaration of 'tmp'
into it, to avoid the need to mix g_autofree with manual freeing.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Jonathon Jongsma <jjongsma@redhat.com>
19 months agovirsh: Account for return values in virNodeGetFreePages
Martin Kletzander [Tue, 26 Sep 2023 13:20:42 +0000 (15:20 +0200)]
virsh: Account for return values in virNodeGetFreePages

The function returns how many array items were filled in, but virsh
never checked for anything other than errors.  Just to make sure this
does not report invalid data, even though the only possibility would be
reporting 0 free pages, check the returned data so that possible errors
are detected.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
(cherry picked from commit c35ba64d18235bfe35617cb3d6d6cc778f6d166d)
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
19 months agotest: Fix testNodeGetFreePages
Martin Kletzander [Tue, 26 Sep 2023 12:18:53 +0000 (14:18 +0200)]
test: Fix testNodeGetFreePages

The function is supposed to return the number of items filled into the
array and not zero.  Also change the initialization of the "randomness"
to be based on the startCell so that the values are different for each
cell even for separate calls.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
(cherry picked from commit 208569b07b6479e0acd05c5a7e1978b0b641e188)
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
19 months agoutil: fix success return for virProcessKillPainfullyDelay()
Jonathon Jongsma [Fri, 22 Sep 2023 19:42:42 +0000 (14:42 -0500)]
util: fix success return for virProcessKillPainfullyDelay()

virProcessKillPainfullyDelay() currently almost always returns 1 or -1,
even though the documentation indicates that it should return 0 if the
process was terminated gracefully. But the computation of the return
code is faulty and the only case where it currently returns 0 is when it
is called with the pid of a process that does not exist.

Since no callers ever even distinguish between the 0 and 1 response
codes, simply get rid of the distinction and return 0 for both cases.

Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
19 months agosystemd: Move Documentation lines
Andrea Bolognani [Mon, 25 Sep 2023 14:43:52 +0000 (16:43 +0200)]
systemd: Move Documentation lines

Like the Description, these are intended to be displayed to the
user, so it makes sense to have them towards the top of the file
before all the information that systemd will parse to calculate
dependencies.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
19 months agosystemd: Improve and unify unit descriptions
Andrea Bolognani [Mon, 25 Sep 2023 14:06:09 +0000 (16:06 +0200)]
systemd: Improve and unify unit descriptions

Hypervisors are referred to by their user-facing name rather
than the name of their libvirt driver, the monolithic daemon is
explicitly referred to as legacy, and a consistent format is
used throughout.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
19 months agosystemd: Add RemoveOnStop=yes to all sockets
Andrea Bolognani [Wed, 27 Sep 2023 15:13:32 +0000 (17:13 +0200)]
systemd: Add RemoveOnStop=yes to all sockets

Currently we only set this for the main sockets, which means
that

  $ systemctl stop virtqemud.socket

will make the socket disappear from the filesystem while

  $ systemctl stop virtqemud-ro.socket

won't. Get rid of this inconsistency.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
19 months agosystemd: Add Also between sockets
Andrea Bolognani [Mon, 25 Sep 2023 15:24:34 +0000 (17:24 +0200)]
systemd: Add Also between sockets

This results in all sockets for a service being enabled when a
single one of them is.

The -tcp and -tls sockets are intentionally excluded, because
enabling them should require explicit action on the
administrator's part; moreover, disabling them should not result
in the local sockets being disabled too.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
19 months agosystemd: Drop Before=foo.service from sockets
Andrea Bolognani [Mon, 25 Sep 2023 15:18:30 +0000 (17:18 +0200)]
systemd: Drop Before=foo.service from sockets

systemd will automatically infer this dependency based on the
socket's Service=foo.service setting.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
19 months agosystemd: Drop Before=libvirtd from virtlogd/virtlockd
Andrea Bolognani [Mon, 25 Sep 2023 15:15:38 +0000 (17:15 +0200)]
systemd: Drop Before=libvirtd from virtlogd/virtlockd

We have already declared the mirror relationship, so this one
is now redundant.

Moreover, this version was incomplete: it only ever worked for
the monolithic daemon, but the modular daemons for QEMU and Xen
also want the sockets to be active.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
19 months agosystemd: Augment Requires/Wants with After
Andrea Bolognani [Mon, 25 Sep 2023 15:16:20 +0000 (17:16 +0200)]
systemd: Augment Requires/Wants with After

Requires/Wants only tells systemd that the corresponding unit
should be started when the current one is, but that could very
well happen in parallel. For virtlogd/virtlockd, we want the
socket to be already active when the hypervisor driver is
started.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
19 months agosystemd: Downgrade read-only/admin sockets to Wants
Andrea Bolognani [Wed, 27 Sep 2023 13:44:34 +0000 (15:44 +0200)]
systemd: Downgrade read-only/admin sockets to Wants

Only the main socket is actually necessary for the service to be
usable.

In the past, we've had security issues that could be exploited via
access to the read-only socket, so a security-minded administrator
might consider disabling all optional sockets. This change makes
such a setup possible.

Note that the services will still try to activate all their
sockets on startup, even if they have been disabled. To make sure
that the optional sockets are never started, they will have to be
masked.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
19 months agosystemd: Replace Requires with BindTo+After for main socket
Andrea Bolognani [Mon, 25 Sep 2023 15:09:37 +0000 (17:09 +0200)]
systemd: Replace Requires with BindTo+After for main socket

This is the strongest relationship that can be declared between
two units, and causes the service to be terminated immediately
if its main socket disappears. This is the behavior we want.

Note that we don't do the same for the read-only/admin sockets,
because those are not as critical for the core functionality of
services as the main socket it.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
19 months agosystemd: Make modular daemons conflict with libvirtd
Andrea Bolognani [Mon, 25 Sep 2023 15:24:10 +0000 (17:24 +0200)]
systemd: Make modular daemons conflict with libvirtd

We want to make sure that, at any given time, we have either the
modular daemons or the monolithic one running, never both. In
order to achieve that, make every single modular unit conflict
with the corresponding libvirtd unit.

We set both Conflicts=libvirtd.unit and After=libvirtd.unit: this
tells systemd that, whenever virtfood.unit and libvirtd.unit are
part of the same transaction, the former should win out.

Thanks to this, if both the modular daemons and the monolithic
one have been enabled because of outdated automation or a simple
mistake of the administrator, the request to start libvirtd at
boot will be ignored and the result will be a regular modular
deployment.

If the request to start libvirtd is made when the modular daemons
are already running, we have no way to prevent systemd from
complying with that request; however, thanks to the way the
conflict relationship has been declared, they will be shut down
cleanly before libvirtd is started. From the user's point of
view, the transition from modular to monolithic will be
completely transparent: it's basically the same scenario as a
regular package upgrade, just with an extra twist.

Note that, while switching from modular to monolithic at runtime
happens automatically, going back requires manual intervention,
i.e. starting all the necessary sockets one by one. That's okay:
the goal here is to prevent misconfiguration and force of habit
to accidentally disrupt a working setup, not to encourage the
scenario. In a correctly configured and managed host, it should
never occur.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
19 months agosystemd: Drop parametrization from libvirtd sockets
Andrea Bolognani [Mon, 25 Sep 2023 14:14:43 +0000 (16:14 +0200)]
systemd: Drop parametrization from libvirtd sockets

Up until now the files have been used as template for most
services, but now that those have been converted to common
templates we can drop parametrization and make it clear that
these files are for libvirtd only.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
19 months agosystemd: Drop @deps@
Andrea Bolognani [Tue, 19 Sep 2023 18:49:42 +0000 (20:49 +0200)]
systemd: Drop @deps@

It's no longer used anywhere.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
19 months agosystemd: Drop libvirtd_socket*_in values
Andrea Bolognani [Thu, 21 Sep 2023 15:39:43 +0000 (17:39 +0200)]
systemd: Drop libvirtd_socket*_in values

Now that the migration to common templates has been completed,
we no longer need these.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
19 months agosystemd: Switch virtproxyd to common templates
Andrea Bolognani [Tue, 19 Sep 2023 18:01:03 +0000 (20:01 +0200)]
systemd: Switch virtproxyd to common templates

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
19 months agosystemd: Switch virtqemud to common templates
Andrea Bolognani [Tue, 19 Sep 2023 18:41:06 +0000 (20:41 +0200)]
systemd: Switch virtqemud to common templates

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
19 months agosystemd: Switch virtlxcd to common templates
Andrea Bolognani [Tue, 19 Sep 2023 18:35:54 +0000 (20:35 +0200)]
systemd: Switch virtlxcd to common templates

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
19 months agosystemd: Switch virtxend to common templates
Andrea Bolognani [Tue, 19 Sep 2023 18:32:50 +0000 (20:32 +0200)]
systemd: Switch virtxend to common templates

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
19 months agosystemd: Switch virtchd to common templates
Andrea Bolognani [Tue, 19 Sep 2023 18:24:01 +0000 (20:24 +0200)]
systemd: Switch virtchd to common templates

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
19 months agosystemd: Switch virtvzd to common templates
Andrea Bolognani [Tue, 19 Sep 2023 18:26:22 +0000 (20:26 +0200)]
systemd: Switch virtvzd to common templates

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
19 months agosystemd: Switch virtvboxd to common templates
Andrea Bolognani [Tue, 19 Sep 2023 18:19:18 +0000 (20:19 +0200)]
systemd: Switch virtvboxd to common templates

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
19 months agosystemd: Switch virtstoraged to common templates
Andrea Bolognani [Tue, 19 Sep 2023 17:54:52 +0000 (19:54 +0200)]
systemd: Switch virtstoraged to common templates

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
19 months agosystemd: Switch virtnetworkd to common templates
Andrea Bolognani [Tue, 19 Sep 2023 17:49:05 +0000 (19:49 +0200)]
systemd: Switch virtnetworkd to common templates

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
19 months agosystemd: Switch virtsecretd to common templates
Andrea Bolognani [Tue, 19 Sep 2023 18:15:56 +0000 (20:15 +0200)]
systemd: Switch virtsecretd to common templates

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
19 months agosystemd: Switch virtnwfilterd to common templates
Andrea Bolognani [Tue, 19 Sep 2023 18:14:04 +0000 (20:14 +0200)]
systemd: Switch virtnwfilterd to common templates

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
19 months agosystemd: Switch virtinterfaced to common templates
Andrea Bolognani [Tue, 19 Sep 2023 17:57:40 +0000 (19:57 +0200)]
systemd: Switch virtinterfaced to common templates

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
19 months agosystemd: Switch virtnodedevd to common templates
Andrea Bolognani [Tue, 19 Sep 2023 17:33:45 +0000 (19:33 +0200)]
systemd: Switch virtnodedevd to common templates

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
19 months agosystemd: Use common templates by default
Andrea Bolognani [Thu, 21 Sep 2023 15:10:56 +0000 (17:10 +0200)]
systemd: Use common templates by default

All services are still listing their input files explicitly, so
no changes to the output files will occur yet.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
19 months agosystemd: Introduce common templates
Andrea Bolognani [Tue, 19 Sep 2023 17:28:55 +0000 (19:28 +0200)]
systemd: Introduce common templates

We already use templating to generate sockets, which are all
based off libvirtd's. Push the idea further, and extend it to
cover services as well.

This is more challenging, as the various modular daemons each have
their own needs in terms of what system services needs to be
available before they can be started, which other components of
libvirt they depend on, and so on.

In order to make this sort of per-service tweaks possible, we
introduce a Python script that can merge two systemd units
together. The script is aware of the semantics of systemd's unit
definition format, so it can intelligently merge sections
together.

This generic systemd unit merging mechanism will also supersede
the extremely ad-hoc @deps@ variable, which is currently used in
a single scenario.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
19 months agosystemd: Provide all input files explicitly
Andrea Bolognani [Thu, 21 Sep 2023 15:03:19 +0000 (17:03 +0200)]
systemd: Provide all input files explicitly

We're about to change the defaults and start migrating to common
templates: in order to be able to switch units over one at a
time, make the input files that are currently used explicit
rather than implicit.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
19 months agosystemd: Introduce temporary libvirtd_socket*_in values
Andrea Bolognani [Thu, 21 Sep 2023 14:15:33 +0000 (16:15 +0200)]
systemd: Introduce temporary libvirtd_socket*_in values

These will be useful during the upcoming migration to common
templates for systemd units and will be dropped as soon as all
services have been converted.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
19 months agosystemd: Make @service_in@ optional
Andrea Bolognani [Thu, 21 Sep 2023 15:08:28 +0000 (17:08 +0200)]
systemd: Make @service_in@ optional

It is currently considered required, but we're soon going to
provide a default that will be suitable for most services.

Since all services currently provide a value explicitly, we
can implement a default without breaking anything.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
19 months agosystemd: Introduce service_in/service_out variables
Andrea Bolognani [Tue, 26 Sep 2023 17:58:00 +0000 (19:58 +0200)]
systemd: Introduce service_in/service_out variables

They're similar to the existing socket_in/socket_out variables
and will make future changes nicer.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
19 months agosystemd: Drop Conflicts from virtproxyd sockets
Andrea Bolognani [Tue, 19 Sep 2023 19:07:28 +0000 (21:07 +0200)]
systemd: Drop Conflicts from virtproxyd sockets

The idea behind these is to prevent running both modular daemons
and monolithic daemon at the same time. We will implement a more
effective solution for that shortly.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
19 months agogitpublish: Add suppresscc option
Erik Skultety [Tue, 19 Sep 2023 09:26:01 +0000 (11:26 +0200)]
gitpublish: Add suppresscc option

send-email scans the commit messages to figure out the default set of
addresses to put into CC, Acked-by/Reviewed-by, etc-by being among
them. We're quite strict about CC-ing people on libvirt-list, since
most developers are subscribed to the list anyway. Respect the rule by
avoiding CCing people solely based on the fact that they've done review
of any of previous revisions.

Signed-off-by: Erik Skultety <eskultet@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
19 months agoPost-release version bump to 9.9.0
Jiri Denemark [Mon, 2 Oct 2023 07:33:28 +0000 (09:33 +0200)]
Post-release version bump to 9.9.0

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
19 months agoRelease of libvirt-9.8.0
Jiri Denemark [Mon, 2 Oct 2023 07:31:09 +0000 (09:31 +0200)]
Release of libvirt-9.8.0

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
19 months agoTranslated using Weblate (Korean)
김인수 [Sun, 1 Oct 2023 02:35:53 +0000 (04:35 +0200)]
Translated using Weblate (Korean)

Currently translated at 99.7% (10389 of 10413 strings)

Translation: libvirt/libvirt
Translate-URL: https://translate.fedoraproject.org/projects/libvirt/libvirt/ko/

Co-authored-by: 김인수 <simmon@nplob.com>
Signed-off-by: 김인수 <simmon@nplob.com>
19 months agoNEWS: Document my contributions for upcoming release
Michal Privoznik [Thu, 28 Sep 2023 06:27:27 +0000 (08:27 +0200)]
NEWS: Document my contributions for upcoming release

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
19 months agoNEWS: Fix placement of network metadata entry
Michal Privoznik [Fri, 29 Sep 2023 07:21:35 +0000 (09:21 +0200)]
NEWS: Fix placement of network metadata entry

The network metadata support is a new feature in the upcoming
release, not a removed one. Place it accordingly.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
19 months agoqemu: Add VIR_FREE in ADD_BITMAP
Anastasia Belova [Thu, 28 Sep 2023 11:55:11 +0000 (14:55 +0300)]
qemu: Add VIR_FREE in ADD_BITMAP

virBitmapFormat returns the string that should be freed.

All strings in three ADD_BITMAP calls in qemuDomainGetGuestVcpusParams
are contained in tmp. So memory leak is possible here without VIR_FREE.

Fixes: 0108deb944af5ca6f1da350c9d0352c8ed18738b
Signed-off-by: Anastasia Belova <abelova@astralinux.ru>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
19 months agoTranslated using Weblate (Ukrainian)
Yuri Chornoivan [Thu, 28 Sep 2023 05:14:11 +0000 (07:14 +0200)]
Translated using Weblate (Ukrainian)

Currently translated at 100.0% (10413 of 10413 strings)

Translation: libvirt/libvirt
Translate-URL: https://translate.fedoraproject.org/projects/libvirt/libvirt/uk/

Co-authored-by: Yuri Chornoivan <yurchor@ukr.net>
Signed-off-by: Yuri Chornoivan <yurchor@ukr.net>
19 months agoTranslated using Weblate (Korean)
김인수 [Thu, 28 Sep 2023 05:14:10 +0000 (07:14 +0200)]
Translated using Weblate (Korean)

Currently translated at 99.7% (10383 of 10413 strings)

Translation: libvirt/libvirt
Translate-URL: https://translate.fedoraproject.org/projects/libvirt/libvirt/ko/

Co-authored-by: 김인수 <simmon@nplob.com>
Signed-off-by: 김인수 <simmon@nplob.com>
19 months agorpm: Drop with_vz define
Andrea Bolognani [Thu, 28 Sep 2023 13:30:31 +0000 (15:30 +0200)]
rpm: Drop with_vz define

Commit 56edf2fefe30 removed the last use.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
19 months agodocs: Go bindings release at the same time as the C library
Andrea Bolognani [Wed, 27 Sep 2023 17:39:47 +0000 (19:39 +0200)]
docs: Go bindings release at the same time as the C library

The actual versioning policy[1] is a bit more nuanced, and in
particular there are scenarios in which the monthly release
is intentionally skipped, but overall it's not inaccurate to
claim that the release cadence of the Go bindings follows the
one of the C library.

[1] https://gitlab.com/libvirt/libvirt-go-module/-/blob/master/VERSIONING.rst

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
19 months agonews: document nbdkit support for network disks
Jonathon Jongsma [Tue, 12 Sep 2023 19:55:44 +0000 (14:55 -0500)]
news: document nbdkit support for network disks

Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
19 months agonews: document support for vdpa block devices
Jonathon Jongsma [Tue, 12 Sep 2023 16:35:48 +0000 (11:35 -0500)]
news: document support for vdpa block devices

Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
19 months agosystemd: Drop unnecessary uses of @sockprefix@
Andrea Bolognani [Tue, 19 Sep 2023 15:28:30 +0000 (17:28 +0200)]
systemd: Drop unnecessary uses of @sockprefix@

Now that providing the value is optional, we can remove almost
all uses.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
19 months agosystemd: Make @sockprefix@ optional
Andrea Bolognani [Tue, 19 Sep 2023 15:25:27 +0000 (17:25 +0200)]
systemd: Make @sockprefix@ optional

For most services, the socket paths can be derived trivially from
the name of the daemon: for virtqemud, for example, they will be

  /run/libvirt/virtqemud-sock
  /run/libvirt/virtqemud-sock-ro
  /run/libvirt/virtqemud-admin-sock

libvirtd and virtproxyd are the exceptions, since their socket
paths will be

  /run/libvirt/libvirt-sock
  /run/libvirt/libvirt-sock-ro
  /run/libvirt/libvirt-admin-sock

So we still need to be able to provide a custom @sockprefix@ in
those cases, but in the most common scenario we can do away with
the requirement by introducing a sensible default.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
19 months agosystemd: Drop unnecessary uses of @sockets@
Andrea Bolognani [Tue, 19 Sep 2023 15:34:40 +0000 (17:34 +0200)]
systemd: Drop unnecessary uses of @sockets@

For most services, the value provided explicitly matches the
documented default.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
19 months agosystemd: Only set @sockmode@ once
Andrea Bolognani [Tue, 19 Sep 2023 13:36:18 +0000 (15:36 +0200)]
systemd: Only set @sockmode@ once

The decision is based only on whether Polkit support is enabled,
so there's no need to go through it again for every single
service.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
19 months agosystemd: Rename @mode@ -> @sockmode@
Andrea Bolognani [Mon, 25 Sep 2023 14:54:37 +0000 (16:54 +0200)]
systemd: Rename @mode@ -> @sockmode@

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
19 months agosystemd: Rename socket_in_def -> socket_in_default
Andrea Bolognani [Mon, 25 Sep 2023 14:57:25 +0000 (16:57 +0200)]
systemd: Rename socket_in_def -> socket_in_default

The meaning of the _def suffix might not be immediately obvious,
especially since it's also used to refer to the output of the
meson-gen-def.py script elsewhere in the same file.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
19 months agosystemd: Set @name@ for virtlogd/virtlockd
Andrea Bolognani [Tue, 19 Sep 2023 14:24:44 +0000 (16:24 +0200)]
systemd: Set @name@ for virtlogd/virtlockd

The information is not used anywhere right now, but the
documentation for virt_daemon_units claims it's mandatory.
We also intend to actually start using it later on.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
19 months agosystemd: Set Type=notify for virtlogd/virtlockd
Andrea Bolognani [Tue, 19 Sep 2023 18:09:26 +0000 (20:09 +0200)]
systemd: Set Type=notify for virtlogd/virtlockd

This tells systemd that the services in question support the
native socket activation protocol.

virtlogd and virtlockd, just like all the other daemons, implement
the necessary handshake.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
19 months agosystemd: Add missing Service for virtlogd/virtlockd
Andrea Bolognani [Tue, 19 Sep 2023 13:20:16 +0000 (15:20 +0200)]
systemd: Add missing Service for virtlogd/virtlockd

While systemd will automatically match foo.socket with foo.service
based on their names, it's nicer to connect the two explicitly.

This is what we do for all services, with virtlogd and virtlockd
being the only exceptions.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
19 months agosystemd: Add missing WantedBy for virtlogd/virtlockd
Andrea Bolognani [Mon, 18 Sep 2023 13:25:28 +0000 (15:25 +0200)]
systemd: Add missing WantedBy for virtlogd/virtlockd

This annotation being missing resulted in virtlogd and virtlockd
being marked as "indirect" services, i.e. services that cannot
be started directly but have to be socket activated instead.

While this is our preferred configuration, we shouldn't prevent
the admin to start them at boot if they want to.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
19 months agosystemd: Add missing Also for admin socket
Andrea Bolognani [Sun, 12 Mar 2023 16:08:50 +0000 (17:08 +0100)]
systemd: Add missing Also for admin socket

When libvirtd, virtlog and virtlockd are enabled, we want their
admin sockets to be enabled for socket activation as well.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
19 months agoUpdate translation files
Weblate [Tue, 26 Sep 2023 09:46:35 +0000 (11:46 +0200)]
Update translation files

Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: libvirt/libvirt
Translate-URL: https://translate.fedoraproject.org/projects/libvirt/libvirt/

Co-authored-by: Weblate <noreply@weblate.org>
Signed-off-by: Fedora Weblate Translation <i18n@lists.fedoraproject.org>
19 months agopo: Refresh potfile for v9.8.0
Jiri Denemark [Tue, 26 Sep 2023 09:26:58 +0000 (11:26 +0200)]
po: Refresh potfile for v9.8.0

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
19 months agoutil: Fix error return for virProcessKillPainfullyDelay()
Jonathon Jongsma [Fri, 22 Sep 2023 19:23:10 +0000 (14:23 -0500)]
util: Fix error return for virProcessKillPainfullyDelay()

Commit 93af79fb removed a cleanup label in favor of returning error
values directly in certain cases. But the final return value was changed
from -1 to 0. If we get to the end of the function, that means that
we've waited for the process to exit but it still exists. So we should
return -1. The error message was still being set correctly, but we were
returning a success status (0).

Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
19 months agolibxl: Fix connection to modular network daemon
Jim Fehlig [Fri, 22 Sep 2023 18:20:35 +0000 (12:20 -0600)]
libxl: Fix connection to modular network daemon

In a modular daemon configuration, virtxend does not support the
virNetwork* APIs. It should open a connection to virtnetworkd when
using those APIs, but currently always opens a connection to
"xen:///system". Switch to using virGetConnectNetwork to obtain a
valid connection instead of using the hardcoded URI.

Signed-off-by: Jim Fehlig <jfehlig@suse.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
19 months agointerface: fix udev_device_get_sysattr_value return value check
Dmitry Frolov [Tue, 12 Sep 2023 12:56:47 +0000 (15:56 +0300)]
interface: fix udev_device_get_sysattr_value return value check

Reviewing the code I found that return value of function
udev_device_get_sysattr_value() is dereferenced without a check.
udev_device_get_sysattr_value() may return NULL by number of reasons.

v2: VIR_DEBUG added, replaced STREQ(NULLSTR()) with STREQ_NULLABLE()
v3: More checks added, to skip earlier. More verbose VIR_DEBUG.

Signed-off-by: Dmitry Frolov <frolov@swemel.ru>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
19 months agodocs: formatdomain: clarify support of some filesystem options
Ján Tomko [Wed, 20 Sep 2023 15:21:39 +0000 (17:21 +0200)]
docs: formatdomain: clarify support of some filesystem options

Not all are supported by all hypervisors.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>