Project

General

Profile

Actions

Bug #51554

closed

mgr/devicehealth: health warning caused by AttributeError: 'NoneType' object has no attribute 'get'

Added by Robert Sander almost 3 years ago. Updated about 2 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
devicehealth module
Target version:
-
% Done:

0%

Source:
Community (user)
Tags:
Backport:
pacific, quincy
Regression:
No
Severity:
3 - minor
Reviewed:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

health warning caused by AttributeError: 'NoneType' object has no attribute 'get'

The cluster status is not healthy because the devicehealth module throws an exception.

Environment

  • ceph version string: 16.2.4
  • Platform (OS/distro/release): Container images from docker.io/ceph/ceph

How reproducible

Restarting the mgr containers does not fix the issue.

Actual results

Jun 30 16:07:09 al111 bash171790: debug 2021-06-30T14:07:09.939+0000 7f2a31d64700 -1 devicehealth.serve:
Jun 30 16:07:09 al111 bash171790: debug 2021-06-30T14:07:09.939+0000 7f2a31d64700 -1 Traceback (most recent call last):
Jun 30 16:07:09 al111 bash171790: File "/usr/share/ceph/mgr/devicehealth/module.py", line 330, in serve
Jun 30 16:07:09 al111 bash171790: self.scrape_all()
Jun 30 16:07:09 al111 bash171790: File "/usr/share/ceph/mgr/devicehealth/module.py", line 390, in scrape_all
Jun 30 16:07:09 al111 bash171790: self.put_device_metrics(ioctx, device, data)
Jun 30 16:07:09 al111 bash171790: File "/usr/share/ceph/mgr/devicehealth/module.py", line 477, in put_device_metrics
Jun 30 16:07:09 al111 bash171790: wear_level = get_ata_wear_level(data)
Jun 30 16:07:09 al111 bash171790: File "/usr/share/ceph/mgr/devicehealth/module.py", line 33, in get_ata_wear_level
Jun 30 16:07:09 al111 bash171790: if page.get("number") != 7:
Jun 30 16:07:09 al111 bash171790: AttributeError: 'NoneType' object has no attribute 'get'

Expected results

No Python exception.


Files

eVtran-smartctl.json (37.2 KB) eVtran-smartctl.json Rob Logan, 02/22/2022 03:26 PM
smart.json (44.2 KB) smart.json "smartctl -x --json" output Alfredo Rezinovsky, 02/22/2022 03:29 PM

Related issues 2 (0 open2 closed)

Copied to mgr - Backport #54394: quincy: mgr/devicehealth: health warning caused by AttributeError: 'NoneType' object has no attribute 'get'ResolvedActions
Copied to mgr - Backport #54395: pacific: mgr/devicehealth: health warning caused by AttributeError: 'NoneType' object has no attribute 'get'ResolvedActions
Actions

Also available in: Atom PDF