Adding –log-level=dubug to podman run shows the following ERRO and WARN

 

 

ERRO[0164] error loading cached network config: network "prod-network" not found in CNI cache

WARN[0164] falling back to loading from existing plugins on disk

INFO[0164] Deleting pod prod_prometheus_prod_prometheus from CNI network "prod-network" (type=macvlan)

DEBU[0164] unmounted container "7f4127775ce3d3575f9877566d478328bc0e8c7ff00f8d80761a98ab9254b66c"

DEBU[0164] Network is already cleaned up, skipping...  

DEBU[0164] Cleaning up container 7f4127775ce3d3575f9877566d478328bc0e8c7ff00f8d80761a98ab9254b66c

DEBU[0164] Network is already cleaned up, skipping...  

DEBU[0164] Container 7f4127775ce3d3575f9877566d478328bc0e8c7ff00f8d80761a98ab9254b66c storage is already unmounted, skipping...

DEBU[0164] ExitCode msg: "error configuring network namespace for container 7f4127775ce3d3575f9877566d478328bc0e8c7ff00f8d80761a98ab9254b66c: error adding pod prod_prometheus_prod_prometheus to cni network \"prod-network\": error calling dhcp.allocate: no more tries"

Error: error configuring network namespace for container 7f4127775ce3d3575f9877566d478328bc0e8c7ff00f8d80761a98ab9254b66c: error adding pod prod_prometheus_prod_prometheus to CNI network "prod-network": error calling DHCP.Allocate: no more tries

 

 

Noticed its trying to create a pod, automatically?  Is this normal? 

 

Googling the first ERRO line shows this:

 

https://github.com/containers/podman/issues/12651

 

My kernel (4.18.0-147.5.1.el8_1.x86_64) shows veth loaded into the kernel:

 

sudo lsmod | grep -I “veth”

 

veth     28672     0

 

SELinux and firewalld are disabled (this is a development env).  I think the .conflist file I created is okay, no typos.

 

Thanks

 

 

Chris Miller

Altron INC.
703-814-7647

Christopher.miller@altroninc.com

Christopher.Miller@gd-ms.com

 

 

 

From: Brent Baude <bbaude@redhat.com>
Sent: Monday, March 7, 2022 6:21 PM
To: Miller, Christopher (NE) <Christopher.Miller@gd-ms.com>
Cc: podman@lists.podman.io
Subject: Re: [Podman] DHCP lease from physical network not working for container - network is down error

 

External E-mail --- CAUTION: This email originated from outside GDMS. Do not click links or open attachments unless you recognize the sender and know the content is safe.

 

Here would be my approach.  I would stop the dhcp service. Then I would start it manually in a terminal so I could watch it.  Then run your container with podman --log-level=debug and grab that output.

 

If that does not reveal the problem, then I would start looking at things like typos for the ethernet interface, selinux, firewalld, kernel modules are loaded, etc...

 

 

 

On Mon, Mar 7, 2022 at 4:02 PM Christopher.Miller@gd-ms.com <Christopher.Miller@gd-ms.com> wrote:

 

We’re trying to pilot Prometheus services as a container in our enclave (along with the node exporter and Grafana). 

 

This is with podman 3.4.2 on RHEL 8.1.  I’m using the following URL as a reference to try and setup DHCP services from the physical network for the Prometheus container.  We are doing it this way so anyone on the network with a web browser can reach the UI.

 

https://www.redhat.com/sysadmin/leasing-ips-podman

 

I setup a .conflist file under /etc/cni/net.d created the following file:

 

91-prometheus.conflist (just gave it a generic name, wasn’t sure if there was a naming convention)  ç================================

 

 

{

                "cniVersion": "0.4.0",

               "name": "prod_network",  (name of prod_network)   ç============================

                "plugins": [

                                {

                                                "type": "macvlan",

                                                "master": "eno1",

                                                "ipam": {

                                                                "type": "dhcp"

                                                                }

                                }

                ]

}

 

 

I enable and started the following .socket file

 

[user_a@computer_a net.d]$ sudo systemctl list-unit-files --type=socket | grep -i "podman"

io.podman.dhcp.socket           enabled

 

[user_a@computer_a net.d]$ sudo systemctl status io.podman.dhcp.socket

● io.podman.dhcp.socket - DHCP Client for CNI

   Loaded: loaded (/usr/lib/systemd/system/io.podman.dhcp.socket; enabled; vendor preset: disabled)

   Active: active (running) since Fri 2022-02-25 13:41:44 EST; 1 weeks 3 days ago

   Listen: /run/cni/dhcp.sock (Stream)

   CGroup: /system.slice/io.podman.dhcp.socket

 

 

Feb 25 13:41:44 computer_a systemd[1]: Listening on DHCP Client for CNI.

[user_a@computer_a net.d]$ sudo systemctl is-enabled io.podman.dhcp.socket

enabled

 

 

[user_a@computer_a net.d]$ sudo systemctl status io.podman.dhcp.service

● io.podman.dhcp.service - DHCP Client CNI Service

   Loaded: loaded (/usr/lib/systemd/system/io.podman.dhcp.service; enabled; vendor preset: disabled)

   Active: active (running) since Mon 2022-03-07 15:11:45 EST; 1h 35min ago

Main PID: 49378 (dhcp)

    Tasks: 7 (limit: 45874)

   Memory: 9.1M

   CGroup: /system.slice/io.podman.dhcp.service

           └─49378 /usr/libexec/cni/dhcp daemon

 

Mar 07 15:16:19 computer_a dhcp[49378]: 2022/03/07 15:16:19 network is down

Mar 07 15:16:19 computer_a dhcp[49378]: 2022/03/07 15:16:19 retrying in 3.131274 seconds

Mar 07 15:16:32 computer_a dhcp[49378]: 2022/03/07 15:16:32 no DHCP packet received within 10s

Mar 07 15:16:32 computer_a dhcp[49378]: 2022/03/07 15:16:32 retrying in 7.313039 seconds

Mar 07 15:16:49 computer_a dhcp[49378]: 2022/03/07 15:16:49 no DHCP packet received within 10s

Mar 07 15:16:49 computer_a dhcp[49378]: 2022/03/07 15:16:49 retrying in 15.601824 seconds

Mar 07 15:17:15 computer_a dhcp[49378]: 2022/03/07 15:17:15 no DHCP packet received within 10s

Mar 07 15:17:15 computer_a dhcp[49378]: 2022/03/07 15:17:15 retrying in 32.030425 seconds

Mar 07 15:17:58 computer_a dhcp[49378]: 2022/03/07 15:17:58 no DHCP packet received within 10s

Mar 07 15:17:58 computer_a dhcp[49378]: 2022/03/07 15:17:58 retrying in 64.627280 seconds

 

 

[user_a@computer_a net.d]$ sudo systemctl is-enabled io.podman.dhcp.service

enabled

 

 

[user_a@computer_a net.d]$ sudo podman run -dit --name tcs_prometheus --net=prod_network -p 9090:9090 --privileged -v /etc/prometheus/prometheus.yml:/etc/prometheus/prometheus.yml docker.io/bitnami/prometheus:latest

ERRO[0164] error loading cached network config: network "prod_network" not found in CNI cache

WARN[0164] falling back to loading from existing plugins on disk

 

 

The container never runs, just shows started status and then outputs the ERRO and WARN.  Since it doesn’t run, can’t look at the logs for it. 

 

Where is the best place to start to troubleshoot this?  As I followed the directions from the article step-by-step. 

 

Also is there a better way to present a container to our prod network that is running local on my RHEL workstation?

 

Thanks

 

 

Chris Miller

Altron INC.
703-814-7647

Christopher.miller@altroninc.com

Christopher.Miller@gd-ms.com

 

 

 

 

 

_______________________________________________
Podman mailing list -- podman@lists.podman.io
To unsubscribe send an email to podman-leave@lists.podman.io