libvirt/docs/kbase
Michal Privoznik 0377177c78 qemu_process.c: Propagate hugetlbfs mounts on reconnect
When reconnecting to a running QEMU process, we construct the
per-domain path in all hugetlbfs mounts. This is a relict from
the past (v3.4.0-100-g5b24d25062) where we switched to a
per-domain path and we want to create those paths when libvirtd
restarts on upgrade.

And with namespaces enabled there is one corner case where the
path is not created. In fact an error is reported and the
reconnect fails. Ideally, all mount events are propagated into
the QEMU's namespace. And they probably are, except when the
target path does not exist inside the namespace. Now, it's pretty
common for users to mount hugetlbfs under /dev (e.g.
/dev/hugepages), but if domain is started without hugepages (or
more specifically - private hugetlbfs path wasn't created on
domain startup), then the reconnect code tries to create it.
But it fails to do so, well, it fails to set seclabels on the
path because, because the path does not exist in the private
namespace. And it doesn't exist because we specifically create
only a subset of all possible /dev nodes. Therefore, the mount
event, whilst propagated, is not successful and hence the
filesystem is not mounted. We have to do it ourselves.

If hugetlbfs is mount anywhere else there's no problem and this
is effectively a dead code.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2123196
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
2022-09-23 16:33:48 +02:00
..
internals qemu & conf: move BeginAsyncJob & EndAsyncJob into src/conf 2022-09-07 12:15:06 +02:00
backing_chains.rst docs: Convert 'formatdomaincaps' to rST 2022-04-07 17:15:52 +02:00
debuglogs.rst kbase: debuglogs: Add a note about auto-shutdown of daemons 2022-07-07 14:35:30 +02:00
domainstatecapture.rst docs: domainstatecapture: Fix broken links 2022-06-01 12:27:10 +02:00
index.rst docs: Add kbase page for Secure Boot 2022-07-01 15:10:43 +02:00
kvm-realtime.rst docs: kbase/kvm-realtime: Fix few links 2022-06-01 12:27:10 +02:00
launch_security_sev.rst kbase: launch_security_sev: Break up overly long line 2022-06-13 16:09:32 +02:00
live_full_disk_backup.rst docs: Fix some typos 2021-06-22 15:55:56 +02:00
locking-lockd.rst
locking-sanlock.rst docs: formatdomain: Remove 'elementsEvents' anchor 2022-06-01 12:27:09 +02:00
locking.rst
memorydevices.rst docs: formatdomain: Remove 'elementsMemory' anchor 2022-06-01 12:27:10 +02:00
merging_disk_image_chains.rst docs: kbase: Add a doc on merging disk image chains 2021-05-11 11:23:57 +02:00
meson.build docs: Add kbase page for Secure Boot 2022-07-01 15:10:43 +02:00
qemu-core-dump.rst docs: Fix two spelling mistakes 2021-07-26 11:01:08 +02:00
qemu-passthrough-security.rst qemu_process.c: Propagate hugetlbfs mounts on reconnect 2022-09-23 16:33:48 +02:00
rpm-deployment.rst spec: Drop libvirt-daemon-driver-storage-sheepdog package 2022-09-01 13:11:09 +02:00
s390_protected_virt.rst docs: formatdomain: Remove 'launchSecurity' anchor 2022-06-01 12:27:10 +02:00
secureboot.rst kbase: Document how to disable Secure Boot entirely 2022-08-04 14:39:18 +02:00
secureusage.rst Prefer https: for libguestfs.org links 2020-09-01 21:58:46 +02:00
snapshots.rst kbase: Introduce 'snapshots' page and describe the new 'manual' snapshot 2022-03-22 10:32:43 +01:00
systemtap.rst kbase: Add knowledge base for libvirt systemtap 2020-08-21 11:34:23 +01:00
tlscerts.rst docs: kbase/tlscerts: Fix links 2022-06-01 12:27:10 +02:00
virtiofs.rst docs: virtiofs: remove extra slash 2021-09-09 17:53:18 +02:00