prometheus stats endpoints 500s without machines or pods

Bug #1813281 reported by Alberto Donato on 2019-01-25
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MAAS
High
Alberto Donato

Bug Description

If no machines and/or no PODs are registered in MAAS, the prometheus stats endpoint returns a 500 error.

$ curl -v http://localhost:5240/MAAS/stats
* Trying 127.0.0.1...
* TCP_NODELAY set
* Connected to localhost (127.0.0.1) port 5240 (#0)
> GET /MAAS/stats HTTP/1.1
> Host: localhost:5240
> User-Agent: curl/7.58.0
> Accept: */*
>
< HTTP/1.1 500 Internal Server Error
< Server: TwistedWeb/17.9.0
< Date: Fri, 25 Jan 2019 10:59:00 GMT
< Content-Type: text/plain; charset=utf-8
< X-Frame-Options: SAMEORIGIN
< Content-Length: 61
<
* Connection #0 to host localhost left intact
float() argument must be a string or a number, not 'NoneType'

Related branches

Alberto Donato (ack) on 2019-01-25
Changed in maas:
importance: Undecided → High
Changed in maas:
milestone: none → next
status: In Progress → Fix Committed
Changed in maas:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers