Comment 0 for bug 1945370

Revision history for this message
Ian Johnson (anonymouse67) wrote :

On a system like the raspberry pi (see https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1945369) where the memory cgroup is disabled, we currently just fail like this trying to query the status of the quota group:

$ 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.