Open simondeziel opened 7 months ago
@mihalicyn is this expected?
@simondeziel how is the behavior different in cgroupv2?
@simondeziel how is the behavior different in cgroupv2?
With cgroup2
(default with 22.04, maybe 20.04 too?) only cpu="0"
is reported about which seems to be expected https://github.com/canonical/lxd/blob/main/lxd/cgroup/abstraction.go#L340-L341 and cpu="0"
is always online.
@simondeziel @mihalicyn please can you chat about this and figure out if we need to do anything here?
With a
cgroup1
VM with a single CPU (implied defaultlimits.cpu=1
), its guest instances are apparently seeing the other CPU cores that are "hotpuggable" in the VM:Here's how to reproduce:
The metrics query should only report about
cpu="0"
but it reports0
for other CPU cores that are not online/plugged:FYI, this is reproducible with
5.0/stable
,5.21/stable
andlatest/edge
.