podman-compose icon indicating copy to clipboard operation
podman-compose copied to clipboard

podman-compose doesn't seems to take IPAM options into account

Open maxbailly opened this issue 6 months ago • 0 comments

Describe the bug

Context: rootfull containers.

Using podman-compose, I'm trying to create a network with the macvlan driver and without any ipam drivers but i'm greeted with this error:

$ podman compose run --rm test
Error: netavark: unable to obtain lease: dhcp proxy error: status: Aborted, message: "Timeout: Timeout", details: [], metadata: MetadataMap { headers: {"content-type": "application/grpc", "date": "Thu, 19 Jun 2025 09:17:26 GMT", "content-length": "0"} }
exit code: 126

Doing the same using the podman CLI works great :

$ podman network create -d macvlan -o parent=ens6f0 -o mode=passthru --ipam-driver=none test
test
$ podman run --net test --rm ubi9

To Reproduce Steps to reproduce the behavior:

  1. Write a compose.yaml file as such
services:
  test:
    image: registry.access.redhat.com/ubi9
    networks:
      - test
      - podman

networks:
  podman:
    external: true

  test:
    driver: macvlan
    driver_opts:
      parent: eth0
      mode: passthru
  1. run podman compose run --rm test

Expected behavior

$ podman network inspect probe

[
     {
          "name": "probe",
          "id": "97c2bf4eaf71dca14bf49adb1aea0c4122c50936540e8020e24ea1da747f801e",
          "driver": "macvlan",
          "network_interface": "ens6f0",
          "created": "2025-06-17T10:41:24.223282964+02:00",
          "ipv6_enabled": false,
          "internal": false,
          "dns_enabled": false,
          "options": {
               "mode": "passthru"
          },
          "ipam_options": {
               "driver": "none"
          },
          "containers": {}
     }
]

Actual behavior

$ podman network inspect probe

[
     {
          "name": "probe",
          "id": "97c2bf4eaf71dca14bf49adb1aea0c4122c50936540e8020e24ea1da747f801e",
          "driver": "macvlan",
          "network_interface": "ens6f0",
          "created": "2025-06-17T10:41:24.223282964+02:00",
          "ipv6_enabled": false,
          "internal": false,
          "dns_enabled": false,
          "options": {
               "mode": "passthru"
          },
          "ipam_options": {
               "driver": "dhcp"
          },
          "containers": {}
     }
]

Output

$ podman compose version

podman-compose version: 1.0.6
['podman', '--version', '']
using podman version: 5.4.0
podman-compose version 1.0.6
podman --version 
podman version 5.4.0
exit code: 0
**Environment:**
 - OS: Linux / WSL / Mac
 - podman version: 
 - podman compose version: (git hex)

maxbailly avatar Jun 19 '25 09:06 maxbailly