Problem after update RHEL8.6 podman to version 4.1.1

Hello Pi-hole people,

After update rhel8.6 to new version of podman i can't run podman-compose yaml. Any yaml doesn't work.
Error is "Error: invalid config provided: extra host entries must be specified on the pod: network cannot be configured when it is shared with a pod".

Have you encountered such a problem after update podman to version 4.1.1 ?

# Podman version on  4.18.0-372.19.1.el8_6.x86_64 
Client:       Podman Engine
Version:      4.1.1
API Version:  4.1.1
Go Version:   go1.17.7
Built:        Mon Jul 11 16:56:53 2022
OS/Arch:      linux/amd64
# docker-compose.yaml
version: "3"
services:
  pihole:
    container_name: piholecompose
    image: pihole/pihole:latest
    ports:
      - "53:53/tcp"
      - "53:53/udp"
      - "67:67/udp"
      - "80:80/tcp"
    environment:
      TZ: 'Europe/Warsaw'
      WEBPASSWORD: 'xxxxxxxx'
      SERVERIP: '192.168.0.121'
      DNS1: '1.1.1.1'
      DNS2: '1.0.0.1'
      DNSSEC: 'true'
      CONDITIONAL_FORWARDING: 'true'
      CONDITIONAL_FORWARDING_IP: '192.168.0.1'
      CONDITIONAL_FORWARDING_DOMAIN: 'home'
      TEMPERATUREUNIT: 'c'
    volumes:
      - 'pihole_pihole:/etc/pihole:Z'
      - 'pihole_dnsmasq:/etc/dnsmasq.d:Z'
      - 'listy:/listy:Z'
    cap_add:
      - NET_ADMIN
    restart: unless-stopped
**#Debug**  error 
using podman version: podman version 4.1.1
podman pod create --name=pihole --share net -p 53:53/tcp -p 67:67/udp -p 53:53/udp -p 80:80/tcp
bbd8be619aa5e6f54bc6d3889cdbce50b2d52bea5ae060dd99571dd2583dbbee
0
podman volume inspect pihole_pihole_pihole || podman volume create pihole_pihole_pihole
podman volume inspect pihole_pihole_dnsmasq || podman volume create pihole_pihole_dnsmasq
podman volume inspect pihole_listy || podman volume create pihole_listy
podman run --name=piholecompose -d --pod=pihole --label io.podman.compose.config-hash=123 --label io.podman.compose.project=pihole --label io.podman.compose.version=0.0.1 --label com.docker.compose.container-number=1 --label com.docker.compose.service=pihole --cap-add NET_ADMIN -e TZ=Europe/Warsaw -e WEBPASSWORD=xxxxxxx -e SERVERIP=192.168.0.121 -e DNS1=1.1.1.1 -e DNS2=1.0.0.1 -e DNSSEC=true -e CONDITIONAL_FORWARDING=true -e CONDITIONAL_FORWARDING_IP=192.168.0.1 -e CONDITIONAL_FORWARDING_DOMAIN=home -e TEMPERATUREUNIT=c -v pihole_pihole_pihole:/etc/pihole:Z -v pihole_pihole_dnsmasq:/etc/dnsmasq.d:Z -v pihole_listy:/listy:Z --add-host pihole:127.0.0.1 --add-host piholecompose:127.0.0.1 --restart unless-stopped pihole/pihole:latest
**Error: invalid config provided: extra host entries must be specified on the pod: network cannot be configured when it is shared with a pod**
125
podman start piholecompose
Error: no container with name or ID "piholecompose" found: no such container
125

I encountered this same issue and opened the bug report 2115988 – Recent podman upgrade causes container to fail with error "invalid config provided: extra host entries must be specified on the pod: network cannot be configured when it is shared with a pod". You should be able to fix the issue by moving the --add-host arguments from the 'podman run' command to the ' podman pod create' command.

1 Like

Thx Brian, overall I think you may be right. For me, changing this parameter in the command is at the "podman-compose" level (Compose file version 3 reference | Docker Documentation). Looks like it needs to be fixed first there, If I am wrong, please correct it.

On the git site GitHub - pi-hole/docker-pi-hole: Pi-hole in a docker container I found this entry on docker_run.sh file, "podman run..." I will try to change and rebuild.

Correct, this will need to be fixed in podman-compose. In the mean time until this is fixed in podman-compose, you can get your containers working again by directly running the podman commands in your debug output. Just move the --add-host arguments.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.