Incorrect parsing of ceph status (changed format between versions)

Bug #1154080 reported by Andreas Hasenack
6
This bug affects 1 person
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_command_output is health HEALTH_OK
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/cephusage.py _get_ceph_usage():
...
        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=192.168.64.139:6789/0,inst-008=192.168.64.140:6789/0,inst-009=192.168.64.141:6789/0}, election epoch 6, quorum 0,1,2 inst-007,inst-008,inst-009
   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-0ubuntu2~cloud0

Tags: defect

Related branches

tags: removed: kanban
Revision history for this message
Chad Smith (chad.smith) wrote :

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.

Chris Glass (tribaal)
Changed in landscape-client:
status: New → In Progress
Chris Glass (tribaal)
Changed in landscape-client:
status: In Progress → Fix Committed
Changed in landscape-client:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.