Re: MgrModule returning None on self.get_metadata()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 07/02/2018 03:27 PM, John Spray wrote:
> On Mon, Jul 2, 2018 at 2:13 PM Wido den Hollander <wido@xxxxxxxx> wrote:
>>
>> Hi,
>>
>> I got a report from a crash of the Telegraf module because of this:
>>
>> metadata = self.get_metadata(svc_type, svc_id)
>> ..
>> ..
>> 'host': metadata['hostname'],
>>
>> metadata was None in this case and that exception wasn't caught causing
>> the the module to stop working.
> 
> The None here is expected.  It's a slightly awkward consequence of the
> way ceph-mgr's view of the world is populated from more than one
> place: we might learn about an OSD from the mon (OSDMap), but not yet
> have received the metadata directly from the OSD.
> 
> Here's a PR to improve the documentation a bit:
> https://github.com/ceph/ceph/pull/22792
> 

Thank you for the information. I've also opened a PR with this
information to fix the Influx and Telegraf module:
https://github.com/ceph/ceph/pull/22794

Wido

> John
> 
> 
> 
>>
>> When it happened OSDs were being destroyed and re-added again and it
>> seems that their metadata wasn't available at that time.
>>
>> Before I start patching the Telegraf module (and Influx as well) my
>> question is if it's to be expected that get_metadata() returns None.
>>
>> If so I would have to handle this by doing a 'continue' if it's the
>> case. Otherwise the MgrModule needs some work.
>>
>> Thanks,
>>
>> Wido
>> --
>> To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
>> the body of a message to majordomo@xxxxxxxxxxxxxxx
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [CEPH Users]     [Ceph Large]     [Information on CEPH]     [Linux BTRFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux