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