prometheus stats endpoints 500s without machines or pods
Bug #1813281 reported by
Alberto Donato
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MAAS |
Fix Released
|
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://
* 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
~ack/maas:backport-1813281
- Alberto Donato (community): Approve
-
Diff: 152 lines (+75/-15)2 files modifiedsrc/maasserver/stats.py (+18/-15)
src/maasserver/tests/test_stats.py (+57/-0)
~ack/maas:fix-prometheus-stats
Merged
into
maas:master
- Björn Tillenius: Approve
- MAAS Lander: Needs Fixing
-
Diff: 152 lines (+75/-15)2 files modifiedsrc/maasserver/stats.py (+18/-15)
src/maasserver/tests/test_stats.py (+57/-0)
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 |
Changed in maas: | |
milestone: | next → none |
To post a comment you must log in.