quota group error should be more explanative when memory cgroup is disabled
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
snapd |
Triaged
|
High
|
Burak Ates |
Bug Description
On a system like the raspberry pi (see https:/
$ snap quotas
error: memory usage unavailable
When really we should query and figure out that the memory cgroup is actually disabled, see:
$ cat /proc/cgroups
#subsys_name hierarchy num_cgroups enabled
cpuset 2 1 1
cpu 4 100 1
cpuacct 4 100 1
blkio 5 100 1
memory 0 109 0
devices 6 100 1
freezer 9 4 1
net_cls 3 1 1
perf_event 10 1 1
net_prio 3 1 1
pids 8 107 1
rdma 7 1 1
A more informative error message would be something like:
$ snap quotas
error: memory cgroup disabled on this system
This applies not just to the quotas command, any quota manipulation should error out with a message like this, at least until we support other resource types for quotas in which case we may need to do something more specialized.
X-HWE-Bug: Bug #1952823
Changed in snapd: | |
status: | New → Triaged |
importance: | Undecided → High |
description: | updated |
Added a check prior to control group actions to see if the memory control group is enabled see PR=>https:/ /github. com/snapcore/ snapd/pull/ 11003