Incorrect parsing of ceph status (changed format between versions)
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Landscape Client |
Fix Released
|
High
|
Chris Glass |
Bug Description
Turns out the output of ceph status changed a bit:
2013-03-11 19:07:49,461 INFO [MainThread] andreas In _get_ceph_usage, _get_ceph_
2013-03-11 19:07:49,461 INFO [MainThread] andreas Got pg_line = ['pgmap', 'v193420:', '208', 'pgs:', '208', 'active+clean;', '5514', 'MB', 'data,', '18267', 'MB', 'used,', '43139', 'MB', '/', '61406', 'MB', 'avail;', '134KB/s', 'wr,', '24op/s']
2013-03-11 19:07:49,462 INFO [MainThread] andreas set total to 134KB/s
2013-03-11 19:07:49,462 INFO [MainThread] andreas set available to 61406
2013-03-11 19:08:09,408 INFO [MainThread] andreas in exchange()
Total having "KB/s" breaks int():
manager/
...
total = pg_line[-3] # Total space
...
filled = int(total) - int(available)
Unfortunately the backtrace is swallowed by something.
This is the current output of ceph status:
root@inst-007:~# ceph status
health HEALTH_OK
monmap e2: 3 mons at {inst-007=
osdmap e28: 3 osds: 3 up, 3 in
pgmap v193861: 208 pgs: 208 active+clean; 5514 MB data, 18267 MB used, 43139 MB / 61406 MB avail; 1739KB/s wr, 54op/s
mdsmap e1: 0/0/1 up
root@inst-007:~#
This is version 0.56.3-
Related branches
- Geoff Teale (community): Approve
- Alberto Donato: Approve
-
Diff: 145 lines (+45/-19)2 files modifiedlandscape/manager/cephusage.py (+9/-12)
landscape/manager/tests/test_ceph.py (+36/-7)
tags: | removed: kanban |
Changed in landscape-client: | |
status: | New → In Progress |
Changed in landscape-client: | |
status: | In Progress → Fix Committed |
Changed in landscape-client: | |
status: | Fix Committed → Fix Released |
Maybe we can test that the pgmap line adheres to an expected template (or split length) and log an error on the client side if the template isn't matched. So we know that the ceph status format has changed and we don't parse it properly.