Skip to content

Commit a2131a7

Browse files
docs: add cgroup memory troubleshooting to install doc (coder#16920)
originally thought this fit under [Unofficial Install Methods](https://coder.com/docs/install/other), but we don't talk about Raspberry Pi anywhere, so ~the general Install doc might be a better fit~ moved to admin>templates>troubleshooting [preview](https://coder.com/docs/@3-cgroup-mem/admin/templates/troubleshooting#coder-on-raspberry-pi-os) --------- Co-authored-by: EdwardAngert <17991901+EdwardAngert@users.noreply.github.com> Co-authored-by: M Atif Ali <atif@coder.com>
1 parent 1ec39f4 commit a2131a7

File tree

5 files changed

+58
-2
lines changed

5 files changed

+58
-2
lines changed

docs/admin/templates/troubleshooting.md

+56
Original file line numberDiff line numberDiff line change
@@ -170,3 +170,59 @@ See our
170170
to optimize your templates based on this data.
171171

172172
![Workspace build timings UI](../../images/admin/templates/troubleshooting/workspace-build-timings-ui.png)
173+
174+
## Docker Workspaces on Raspberry Pi OS
175+
176+
### Unable to query ContainerMemory
177+
178+
When you query `ContainerMemory` and encounter the error:
179+
180+
```shell
181+
open /sys/fs/cgroup/memory.max: no such file or directory
182+
```
183+
184+
This error mostly affects Raspberry Pi OS, but might also affect older Debian-based systems as well.
185+
186+
<details><summary>Add cgroup_memory and cgroup_enable to cmdline.txt:</summary>
187+
188+
1. Confirm the list of existing cgroup controllers doesn't include `memory`:
189+
190+
```console
191+
$ cat /sys/fs/cgroup/cgroup.controllers
192+
cpuset cpu io pids
193+
194+
$ cat /sys/fs/cgroup/cgroup.subtree_control
195+
cpuset cpu io pids
196+
```
197+
198+
1. Add cgroup entries to `cmdline.txt` in `/boot/firmware` (or `/boot/` on older Pi OS releases):
199+
200+
```text
201+
cgroup_memory=1 cgroup_enable=memory
202+
```
203+
204+
You can use `sed` to add it to the file for you:
205+
206+
```bash
207+
sudo sed -i '$s/$/ cgroup_memory=1 cgroup_enable=memory/' /boot/firmware/cmdline.txt
208+
```
209+
210+
1. Reboot:
211+
212+
```bash
213+
sudo reboot
214+
```
215+
216+
1. Confirm that the list of cgroup controllers now includes `memory`:
217+
218+
```console
219+
$ cat /sys/fs/cgroup/cgroup.controllers
220+
cpuset cpu io memory pids
221+
222+
$ cat /sys/fs/cgroup/cgroup.subtree_control
223+
cpuset cpu io memory pids
224+
```
225+
226+
Read more about cgroup controllers in [The Linux Kernel](https://docs.kernel.org/admin-guide/cgroup-v2.html#controlling-controllers) documentation.
227+
228+
</details>

docs/images/install/coder-setup.png

-199 KB
Binary file not shown.
Loading

docs/install/cli.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ To start the Coder server:
4949
coder server
5050
```
5151

52-
![Coder install](../images/install/coder-setup.png)
52+
![Coder install](../images/screenshots/welcome-create-admin-user.png)
5353

5454
To log in to an existing Coder deployment:
5555

docs/install/index.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ To start the Coder server:
6060
coder server
6161
```
6262

63-
![Coder install](../images/install/coder-setup.png)
63+
![Coder install](../images/screenshots/welcome-create-admin-user.png)
6464

6565
To log in to an existing Coder deployment:
6666

0 commit comments

Comments
 (0)