containers / containers/podman-compose

If a container fails to run due to Netavark, podman-compose will get always wait

Open
#1,492 1 comment 0 reactions 0 assignees View on GitHub
bug
Dominant language
Python
Stars
6.2k
Forks
622
PR merge metrics
No merged PRs in 30d

Description

**Describe the bug**
After updating the kernel in arch but not using hooks that preserve kernel modules, running arbitrary containers will output `Error: unable to start container ctrid: netavark: create bridge: Netlink error: Operation not supported (os error 95)`. This error is expected behavior, but podman compose will freeze after outputting the error in this situation (podman 6.0.0 did not respond to C-c and C-z using the compose subcommand, which was fixed in 6.0.1 but not mentioned in the logs), only C-c will stop after outputting many Python errors.

**To Reproduce**
Steps to reproduce the behavior:
1. use hiddfy's [docker-compose.yml](https://github.com/hiddify/Hiddify-Manager/raw/refs/heads/maindocker-compose.yml) and [docker.env](https://github.com/hiddify/Hiddify-Manager/raw/refs/heads/main/docker.env)

minimal reproducible:
```
services:
app:
image: busybox:latest
command: sh -c "while true; do echo app; sleep 2; done"
depends_on:
- worker

worker:
image: busybox:latest
command: sh -c "while true; do echo worker; sleep 2; done"
```

2. `podman compose up -d`

**Expected behavior**
say containers failed to run and exits.

**Actual behavior**
The output container failed to run, but got stuck.

**Output**

```
$ podman-compose version
podman-compose version 1.6.0
podman version 6.0.1
$ podman --version
podman version 6.0.1

$ podman-compose up
sthid
sthid
failedctrid
sthid
[worker] | Error: unable to start container failedctrid: netavark: create bridge: Netlink error: Operation not supported (os error 95)
*wait...*
```

**Environment:**
- OS: arch linux
- podman version: 6.0.1
- podman compose version: 1.6.0

**Additional context**
If the minimum reproducibility does not have `depends_on`, podman-compose will normally report an error and exit.

`podman compose up -d` use minimal reproducible with docker-compose:
```
[+] up 0/1
⠋ Container min-worker-1 Starting 0.0s
Error response from daemon: netavark: create bridge: Netlink error: Operation not supported (os error 95)
Error: executing /usr/lib/docker/cli-plugins/docker-compose up -d: exit status 1
```
It will exit normally.

However, in the original use case, it additionally outputs that one of the environment variables has no value, even if the value exists. I think this might be a problem with podman.
```
WARN[0000] The "REDIS_PASSWORD" variable is not set. Defaulting to a blank string.
[+] up 4/4
✔ Network hiddify-manager_default Created 0.0s
✔ Container mariadb_container Created 0.1s
✔ Container redis_container Created 0.1s
✔ Container hiddify-manager-hiddify-1 Created 0.0s
Attaching to hiddify-1, mariadb_container, redis_container
ERRO[0001] Error attaching to container fda0813699c85acfe59694663046d3c6fb68931176b8e66ca7fdf9ced41b2f19: preparing container fda0813699c85acfe596946630
46d3c6fb68931176b8e66ca7fdf9ced41b2f19 for attach: netavark: create bridge: Netlink error: Operation not supported (os error 95)
ERRO[0001] Error attaching to container 2d4ec68e365ebebb290a08c479108299a4e2fce40a68beb8d90362acfbfc3f20: preparing container 2d4ec68e365ebebb290a08c479
108299a4e2fce40a68beb8d90362acfbfc3f20 for attach: netavark: create bridge: Netlink error: Operation not supported (os error 95)
ERRO[0001] Error attaching to container 7c1c99d3cb3f67f8bfc993a9e856c02e587e87c0e87d5317087ce1ff1088016c: preparing container 7c1c99d3cb3f67f8bfc993a9e8
56c02e587e87c0e87d5317087ce1ff1088016c for attach: netavark: create bridge: Netlink error: Operation not supported (os error 95)
Error response from daemon: netavark: create bridge: Netlink error: Operation not supported (os error 95)
Error: executing /usr/lib/docker/cli-plugins/docker-compose up: exit status 1
```

Contributor guide

Open the contributing guide

Research direction

Start by running the minimal docker-compose reproduction with `podman-compose up -d` and the `depends_on` relationship, then compare it with the case that has no `depends_on`. Trace the `podman-compose up` error and wait handling; done means a Netavark startup failure is reported and the command exits without hanging or emitting cascading Python errors.

Written by the indexing model from the issue text.

Assessment

Tech stack
arch-linux, docker-compose, python
Domain
cli, devops
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.