Missing binary package for octavia prometheus-proxy

Bug #1982969 reported by Frode Nordahl
36
This bug affects 9 people
Affects Status Importance Assigned to Milestone
snap-octavia-diskimage-retrofit
Invalid
Wishlist
Unassigned
octavia (Ubuntu)
Triaged
Wishlist
Unassigned

Bug Description

Yoga introduced a new daemon for use in the Octavia HAProxy Amphorae instances [0].

The Ubuntu Jammy package does not appear to have a binary package for this new daemon.

0: https://github.com/openstack/octavia/commit/0d9674bd87fd1e3d45c529a90cc5e35c23a38250

Revision history for this message
Pedro Victor Lourenço Fragola (pedrovlf) wrote :

I tested the diskimage-create[0] and was possible to have the prometheus-proxy using Jammy... so I guess this is configured during the building of the image in this case I filed an LP#2027585[1]

ubuntu@amphora-ca520687-d2b9-4d96-beda-9d787ac2fb78:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 22.04.3 LTS
Release: 22.04
Codename: jammy

root 615 1 0 13:10 ? 00:00:00 /opt/amphora-agent-venv/bin/python3 /usr/local/bin/prometheus-proxy

 sudo systemctl status prometheus-proxy.service
sudo: unable to resolve host amphora-ca520687-d2b9-4d96-beda-9d787ac2fb78: Name or service not known
● prometheus-proxy.service - OpenStack Octavia Prometheus Proxy
     Loaded: loaded (/lib/systemd/system/prometheus-proxy.service; enabled; vendor preset: enabled)
     Active: active (running) since Tue 2023-08-15 15:13:10 UTC; 28min ago
   Main PID: 614 (prometheus-prox)
      Tasks: 2 (limit: 1112)
     Memory: 13.6M
        CPU: 860ms
     CGroup: /system.slice/prometheus-proxy.service
             └─614 /opt/amphora-agent-venv/bin/python3 /usr/local/bin/prometheus-proxy

[0] https://github.com/openstack/octavia/blob/master/diskimage-create/diskimage-create.sh
[1] https://bugs.launchpad.net/snap-octavia-diskimage-retrofit/+bug/2027585

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in octavia (Ubuntu):
status: New → Confirmed
James Page (james-page)
Changed in octavia (Ubuntu):
importance: Undecided → Wishlist
status: Confirmed → Triaged
Changed in snap-octavia-diskimage-retrofit:
status: New → Triaged
importance: Undecided → Wishlist
Revision history for this message
Felipe Alencastro (falencastro) wrote :
Download full text (3.6 KiB)

I believe this is not a RFE/Wishlist, but rather a deb packaging issue, the package python3-octavia already ships the prometheus-proxy binary, but fails to include it's systemd unit[1].

By just creating the unit everything works as expected.

-----------------------------------------------------------------------------------------------------------

root@amphora-90334dfd-e3fa-4977-bf74-a6a9ab69ea01:~# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 20.04.6 LTS
Release: 20.04
Codename: focal

root@amphora-90334dfd-e3fa-4977-bf74-a6a9ab69ea01:~# dpkg -S /usr/bin/prometheus-proxy
python3-octavia: /usr/bin/prometheus-proxy

root@amphora-90334dfd-e3fa-4977-bf74-a6a9ab69ea01:~# dpkg -S /usr/lib/systemd/system/prometheus-proxy.service
dpkg-query: no path found matching pattern /usr/lib/systemd/system/prometheus-proxy.service

root@amphora-90334dfd-e3fa-4977-bf74-a6a9ab69ea01:~# ls -l /usr/lib/systemd/system/prometheus-proxy.service
ls: cannot access '/usr/lib/systemd/system/prometheus-proxy.service': No such file or directory

root@amphora-90334dfd-e3fa-4977-bf74-a6a9ab69ea01:~# cat > /usr/lib/systemd/system/prometheus-proxy.service <<EOF
[Unit]
Description=OpenStack Octavia Prometheus Proxy
After=network.target syslog.service amphora-agent.service
Wants=amphora-agent.service

[Service]
ExecStart=/usr/bin/prometheus-proxy
KillMode=mixed
Restart=always
ExecStartPost=/bin/sh -c "echo \$MAINPID > /var/run/prometheus-proxy.pid"
PIDFile=/var/run/prometheus-proxy.pid

[Install]
WantedBy=multi-user.target
EOF

root@amphora-90334dfd-e3fa-4977-bf74-a6a9ab69ea01:~# systemctl daemon-reload
root@amphora-90334dfd-e3fa-4977-bf74-a6a9ab69ea01:~# systemctl start prometheus-proxy
root@amphora-90334dfd-e3fa-4977-bf74-a6a9ab69ea01:~# systemctl status prometheus-proxy
● prometheus-proxy.service - OpenStack Octavia Prometheus Proxy
     Loaded: loaded (/lib/systemd/system/prometheus-proxy.service; enabled; vendor preset: enabled)
     Active: active (running) since Wed 2024-07-03 15:48:42 UTC; 3s ago
    Process: 57115 ExecStartPost=/bin/sh -c echo $MAINPID > /var/run/prometheus-proxy.pid (code=exited, status=0/SUCCESS)
   Main PID: 57114 (prometheus-prox)
      Tasks: 2 (limit: 2324)
     Memory: 14.8M
     CGroup: /system.slice/prometheus-proxy.service
             └─57114 /usr/bin/python3 /usr/bin/prometheus-proxy

Jul 03 15:48:42 amphora-90334dfd-e3fa-4977-bf74-a6a9ab69ea01 systemd[1]: Starting OpenStack Octavia Prometheus Proxy...
Jul 03 15:48:42 amphora-90334dfd-e3fa-4977-bf74-a6a9ab69ea01 systemd[1]: Started OpenStack Octavia Prometheus Proxy.

root@amphora-90334dfd-e3fa-4977-bf74-a6a9ab69ea01:~# ip netns exec amphora-haproxy bash

root@amphora-90334dfd-e3fa-4977-bf74-a6a9ab69ea01:~# curl -s http://127.0.0.1:9102|tail -n 5
# HELP octavia_member_idle_connections_limit Limit on the number of available idle connections
# TYPE octavia_member_idle_connections_limit gauge
octavia_member_idle_connections_limit{pool="de7983a9-f1fd-40e1-afe0-fd7830d462d7:734b3ed3-738d-4a79-8189-5e025d19491d",member="3a4e01ff-8e99-490c-9f12-bc7e9eaa4b65"} 0
octavia_member_idle_connections_limit{pool="de7983a9-f1fd-40e1-afe0-fd7830d462d7:734b3ed3-7...

Read more...

Changed in snap-octavia-diskimage-retrofit:
status: Triaged → Invalid
Revision history for this message
Andre Ruiz (andre-ruiz) wrote :

I have taken a look at this with the customer and indeed it seems a matter of adding a file to the deb package (file which is already in the sources, just being missed while packaging). Half of the functionality is there (the proxy itself) but the systemd-unit that starts the proxy is missing. Adding that file manually to the file-system fixes the issue.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.