containers / containers/podman-compose
compose does not use pasta network
- Dominant language
- Python
- Stars
- 6.2k
- Forks
- 622
- PR merge metrics
- No merged PRs in 30d
Description
**Describe the bug**
i can't figure out how to make compose to use the pasta network mode.
please try to reproduce the bug in latest devel branch
**To Reproduce**
Steps to reproduce the behavior:
podman-compose version 1.1.0
podman version 4.9.4
Fedora release 39 (Thirty Nine)
I reset the system and specified the default network mode ( is it mode ? or is it a driver? ) to pasta:
```
[sailtech@dell5000 ~]$ grep cmd ~/.config/containers/containers.conf
#default_rootless_network_cmd = "slirp4netns"
default_rootless_network_cmd = "pasta"
#network_cmd_path = ""
#network_cmd_options = []
[sailtech@dell5000 ~]$ podman info | grep networkBackend
networkBackend: netavark
networkBackendInfo:
[sailtech@dell5000 ~]$ podman run -d --name=myubi registry.access.redhat.com/ubi8/ubi
[sailtech@dell5000 ~]$ podman inspect --format {{.HostConfig.NetworkMode}} myubi
pasta
[sailtech@dell5000 ~]$ podman-compose --in-pod=yes -f ./podman-compose.yml up
....
[sailtech@dell5000 ~]$ podman inspect --format {{.HostConfig.NetworkMode}} sailtech_restapi_1
bridge
[sailtech@dell5000 ~]$ podman network ls
NETWORK ID NAME DRIVER
2f259bab93aa podman bridge
8f1d4e09447a sailtech_default bridge
[sailtech@dell5000 ~]$ podman network inspect sailtech_default
[
{
"name": "sailtech_default",
"id": "8f1d4e09447a973e4225ba5262e4405722c480c42dcf70da2934fae2e9c1a91b",
"driver": "bridge",
"network_interface": "podman2",
"created": "2024-06-18T23:07:06.718877522-04:00",
"subnets": [
{
"subnet": "10.89.1.0/24",
"gateway": "10.89.1.1"
}
],
"ipv6_enabled": false,
"internal": false,
"dns_enabled": true,
"labels": {
"com.docker.compose.project": "sailtech",
"io.podman.compose.project": "sailtech"
},
"ipam_options": {
"driver": "host-local"
}
}
]
```
it looks like the compose creates a bridge network ignoring the default setting to pasta.
the addition to compose file :
```
networks:
default:
mode: pasta
```
has no bearing on the execution result.
**Expected behavior**
i expect the compose to use the (default) pasta network
**Actual behavior**
it doesn't
Contributor guide
Assessment
This issue has not been assessed yet.