Project

General

Profile

Actions

Bug #58331

open

cephadm gather-facts fails enumerating wwid of hyper-v disks.

Added by Anthony Clack over 1 year ago. Updated 11 months ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
ceph cli
Target version:
-
% Done:

0%

Source:
Community (user)
Tags:
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
12/21/2022
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

When running "cephadm gather-facts" on a ceph cluster deployed to hyper-v based virtual machines the script fails with the error below due to the wwid value of the hyper-v virtual disks.

Traceback (most recent call last):
File "/usr/sbin/cephadm", line 9468, in <module>
main()
File "/usr/sbin/cephadm", line 9456, in main
r = ctx.func(ctx)
File "/usr/sbin/cephadm", line 8625, in command_gather_facts
print(host.dump())
File "/usr/sbin/cephadm", line 8613, in dump
k: getattr(self, k) for k in dir(self)
File "/usr/sbin/cephadm", line 8615, in <dictcomp>
and isinstance(getattr(self, k), (float, int, str, list, dict, tuple))
File "/usr/sbin/cephadm", line 8266, in hdd_list
return self._dev_list(devs)
File "/usr/sbin/cephadm", line 8246, in _dev_list
disk_wwid = read_file(['/sys/block/{}/device/wwid'.format(dev)]).strip()
File "/usr/sbin/cephadm", line 8095, in read_file
content = f.read().strip()
File "/usr/lib64/python3.6/codecs.py", line 321, in decode
(result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xbd in position 16: invalid start byte

Problematic code is here - line 8532
https://github.com/ceph/ceph/blob/514895cdfa394fd764ec67da8c002116fac20139/src/cephadm/cephadm.py

Example of the wwid value below.
t10.MSFT \207M-&H'\233\027M-DKM-*\003\213\222@M-;8\027$

This casues the cluster to always be in a warning state.

Actions #1

Updated by Ilya Dryomov 11 months ago

  • Target version deleted (v17.2.6)
Actions

Also available in: Atom PDF