Skip to content

exporter does not work and leaks memory #182

@nishant-dash

Description

@nishant-dash

Description

I am running

openstack-exporter                active      1  openstack-exporter  latest/stable   59  no       

on charmed jammy caracal

and I see that the exporter does not work, no metrics are available

root@juju-d65dda-26-lxd-3:~# curl http://127.0.0.1:9180/metrics 
root@juju-d65dda-26-lxd-3:~# 

Additionally the service is leaking a lot of memory and triggering the OOM killer.
It's currently at 14G, (it was restarted as part of the charm refresh), and previously at 32G.

Over a minute it went from

# uptime && ps aux | grep 195647
root      195647 38.6  0.4 18507972 14478180 ?   Ssl  12:13   3:03 /snap/charmed-openstack-exporter/44/bin/openstack-exporter --cache --cache-ttl=300s --os-client-config=/var/snap/charmed-openstack-exporter/common/clouds.yaml --web.listen-address=:9180 openstack

to

 12:25:45 up 45 days, 17:08,  2 users,  load average: 3.33, 6.14, 10.40
root      195647 38.1  0.4 18780884 14748516 ?   Ssl  12:13   3:23 /snap/charmed-openstack-exporter/44/bin/openstack-exporter --cache --cache-ttl=300s --os-client-config=/var/snap/charmed-openstack-exporter/common/clouds.yaml --web.listen-address=:9180 openstack
root      196712  0.0  0.0   6484     0 pts/2    S+   12:25   0:00 grep --color=auto 195647

thats about 0.25 G per minute, which is really high

Charm revision

59

Juju version

3.6.0

Cloud

OpenStack, MAAS

Expected behaviour

metrics appear

Reproduce / Test

juju deploy it in jammy caracal and relate it to the required entities, we have it with

keystone:identity-admin                                     openstack-exporter:credentials                                keystone-admin           regular      
openstack-exporter:cos-agent                                grafana-agent-container:cos-agent                             cos_agent                subordinate  
openstack-exporter:juju-info                                grafana-agent-container:juju-info                             juju-info                subordinate  
openstack-exporter:juju-info                                landscape-client:container                                    juju-info                subordinate  
openstack-exporter:juju-info                                logrotated:juju-info                                          juju-info                subordinate  
openstack-exporter:juju-info                                nrpe:general-info                                             juju-info                subordinate  
openstack-exporter:juju-info                                ubuntu-advantage:juju-info                                    juju-info                subordinate  

Notes & References

There is no way to set debug in the charm config so I tried to run it manually with

OS_COMPUTE_API_VERSION=2.87 /snap/charmed-openstack-exporter/44/bin/openstack-exporter --cache --cache-ttl=300s --os-client-config=/var/snap/charmed-openstack-exporter/common/clouds.yaml --web.listen-address=:9180 openstack --log.level=debug

but I dont see anything useful in debug logs, but there are a bunch of errors
However, none of the error logs seems to justify why the exporter itself should not be running

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions