Prometheus interface: list index out of range
Bug #1846707 reported by
David
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Canonical-OSM |
Fix Released
|
High
|
David |
Bug Description
There's one issue that sometimes happen, and is that the following:
```
application-
File "/var/lib/
prometheus_url = prometheus.
IndexError: list index out of range
```
It seems like the `endpoint.
Grafana-k8s code: https:/
Prometheus-
Related branches
~davigar15/interface-prometheus:bug/ingressaddr-not-set
- Stuart Bishop (community): Approve
- Prometheus Charmers: Pending requested
- Canonical IS Reviewers: Pending requested
-
Diff: 44 lines (+7/-5)2 files modifiedprovides.py (+4/-2)
requires.py (+3/-3)
description: | updated |
Changed in canonical-osm: | |
assignee: | nobody → David (davigar15) |
importance: | Undecided → High |
status: | New → In Progress |
Changed in canonical-osm: | |
status: | In Progress → Fix Committed |
Changed in canonical-osm: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
This seems to be running afoul of https:/ /discourse. jujucharms. com/t/caas- network- get-and- private- address- unit-data/ with it likely being the case that the flag is being set before the K8s service is up and thus the ingress-address comes up empty. Because the interface layer only checks the port for setting the flag, it gets the flag set even though there are not actually any targets due to them being filtered out for lack of ingress-address.
The manage_flags code in interface- prometheus' s requires side should check `len(self. targets( )) > 0` instead of has_port for the two flags.