[ceph-users] "ceph osd status" fails

John Spray jspray at redhat.com
Fri Oct 6 09:54:55 PDT 2017


On Fri, Oct 6, 2017 at 5:01 PM, Richard Hesketh
<richard.hesketh at rd.bbc.co.uk> wrote:
> When I try to run the command "ceph osd status" on my cluster, I just get an error. Luckily unlike the last issue I had with ceph fs commands it doesn't seem to be crashing any of the daemons.
>
> root at vm-ds-01:/var/log/ceph# ceph osd status
> Error EINVAL: Traceback (most recent call last):
>   File "/usr/lib/ceph/mgr/status/module.py", line 293, in handle_command
>     return self.handle_osd_status(cmd)
>   File "/usr/lib/ceph/mgr/status/module.py", line 273, in handle_osd_status
>     stats = osd_stats[osd_id]
> KeyError: (78L,)

Looks like this will happen if an OSD is in the OSDMap but for
whatever reason isn't present in the statistics stored in the PG map.
Possibly the OSD has no PGs, or something is wrong with how the OSDs
report PGs to the manager.  Ticket here:
http://tracker.ceph.com/issues/21707.  If you are proficient in python
you can quickly add an exception handler to the code and things will
be okay.

The other (crashing) backtrace in your log is
http://tracker.ceph.com/issues/17737, which is pending backport of the
fix.

Cheers,
John

>
> Example and relevant excerpt from the ceph-mgr log shown at https://gist.github.com/rjhesketh/378ec118e42289a2dd0b1dd2462aae92
>
> Is this trying to poll stats for an OSD which doesn't exist and therefore breaking?
>
> Rich
>
>
> _______________________________________________
> ceph-users mailing list
> ceph-users at lists.ceph.com
> http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com
>


More information about the ceph-users mailing list