Bug #22708
openkeepstore DeviceID mis-parses cgroup bind mounts, probably shouldn't expect to find the device
Description
Running keepstore in a systemd-nspawn VM logs:
{"ClusterID":"z2a05","PID":119,"level":"info","msg":"stat \"/dev/mapper/vg-var--lib--machines[/z2a05b1]\": stat /dev/mapper/vg-var--lib--machines[/z2a05b1]: no such file or directory; using hostname:path for volume z2a05-nyw5e-syv6ysltjskposm","time":"2025-03-28T14:10:34.338693041-04:00"} {"ClusterID":"z2a05","PID":119,"Volume":"z2a05b1.local:/var/lib/arvados/keep-data","level":"info","msg":"stat \"/dev/mapper/vg-var--lib--machines[/z2a05b1]\": stat /dev/mapper/vg-var--lib--machines[/z2a05b1]: no such file or directory; using hostname:path for volume z2a05-nyw5e-syv6ysltjskposm","time":"2025-03-28T14:10:34.339976657-04:00"}
The last message repeats two more times. This does reflect the output of findmnt
:
$ sudo findmnt --noheadings --target /var/lib/arvados/keep-data / /dev/mapper/vg-var--lib--machines[/z2a05b1] btrfs rw,relatime,idmapped,ssd,discard=async,space_cache=v2,subvolid=2
But keepstore.DeviceID()
is misinterpreting this output. findmnt
uses /dev/foo[/bar]
to say "the root filesystem is on /dev/foo
, and this is a mount of /bar
there."
If it really needs the filesystem UUID, it should be looking at /dev/mapper/vg-var--lib--machines
. But note that it won't find that either, because the host's devices are not available inside the VM container.
And even without a container per se, you could see this happen in keepstore if you added a systemd override with PrivateDevices=on
.
So as an administrator, when I see these logs, I wonder what I'm supposed to make of it. It's apparently not a fatal problem, but what are the consequences of this giving up? How worried should I be? If I'm trying to diagnose problems with my keepstore, it's hard to tell whether I should try to address this or if it's purely informational.
No data to display