Activity log for bug #1945370

Date Who What changed Old value New value Message
2021-09-28 20:19:03 Ian Johnson bug added bug
2021-10-19 12:12:24 Paweł Stołowski snapd: status New Triaged
2021-10-19 12:12:29 Paweł Stołowski snapd: importance Undecided High
2021-10-22 14:21:01 Burak Ates bug added subscriber Burak Ates
2021-11-02 21:08:46 Burak Ates snapd: assignee Burak Ates (atesburak)
2021-12-01 04:44:25 Yao Wei description 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. 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. X-HWE-Bug: Bug #1952823