Skip to content

Commit c12c86e

Browse files
Merge pull request #23891 from eriksjolund/troubleshooting-userns-auto
troubleshooting: add tip about --userns=auto and --userns=keep-id
2 parents 649730c + 005d9b5 commit c12c86e

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

troubleshooting.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1435,3 +1435,37 @@ Using the default `overlay` storage driver, a `COPY`, `ADD`, or an I/O intensive
14351435
This could be caused by the child container using `fuse-overlayfs` for writing to `/var/lib/containers/storage`. Writes can be slow with `fuse-overlayfs`. The solution is to use the native `overlay` filesystem by using a local directory on the host system as a volume to `/var/lib/containers/storage` like so: `podman run --privileged --rm -it -v ./nested_storage:/var/lib/containers/storage parent:latest`. Ensure that the base image of `parent:latest` in this example has no contents in `/var/lib/containers/storage` in the image itself for this to work. Once using the native volume, the nested container should not fall back to `fuse-overlayfs` to write files and the nested build will complete much faster.
14361436

14371437
If you don't have access to the parent run process, such as in a CI environment, then the second option is to change the storage driver to `vfs` in the parent image by changing changing this line in your `storage.conf` file: `driver = "vfs"`. You may have to run `podman system reset` for this to take effect. You know it's changed when `podman info |grep graphDriverName` outputs `graphDriverName: vfs`. This method is slower performance than using the volume method above but is significantly faster than `fuse-overlayfs`
1438+
1439+
### 43) `podman run --userns=auto` fails with "Error: creating container storage: not enough unused IDs in user namespace"
1440+
1441+
Using `--userns=auto` when creating new containers does not work as long as any containers exist that were created with `--userns=keep-id` or `--userns=nomap`
1442+
1443+
#### Symptom
1444+
1445+
1. Run with `--userns=auto`
1446+
```
1447+
$ podman run --rm -d --userns=auto alpine sleep 3600
1448+
```
1449+
The command succeeds.
1450+
2. Run with `--userns=auto`
1451+
```
1452+
$ podman run --rm -d --userns=auto alpine sleep 3600
1453+
```
1454+
The command succeeds.
1455+
3. Run with `--userns=keep-id`
1456+
```
1457+
$ podman run --rm -d --userns=keep-id alpine sleep 3600
1458+
```
1459+
The command succeeds.
1460+
4. Run with `--userns=auto`
1461+
```
1462+
$ podman run --rm -d --userns=auto alpine sleep 3600
1463+
```
1464+
The command fails with the error message
1465+
```
1466+
Error: creating container storage: not enough unused IDs in user namespace
1467+
```
1468+
1469+
#### Solution
1470+
1471+
Any existing containers that were created using `--userns=keep-id` or `--userns=nomap` must first be deleted before any new container can be created with `--userns=auto`

0 commit comments

Comments
 (0)