From: Sage Weil Date: Fri, 21 Dec 2018 17:22:17 +0000 (-0600) Subject: osd: update metadata and smart code to report get_device_id errors X-Git-Tag: v14.1.0~499^2~3 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=f879f88a27439728bcd05785b698ed8a6ddb3077;p=ceph.git osd: update metadata and smart code to report get_device_id errors Signed-off-by: Sage Weil --- diff --git a/src/osd/OSD.cc b/src/osd/OSD.cc index 0cd46a8812cd..db30fb3686c3 100644 --- a/src/osd/OSD.cc +++ b/src/osd/OSD.cc @@ -5753,14 +5753,16 @@ void OSD::_collect_metadata(map *pm) (*pm)["devices"] = stringify(devnames); string devids; for (auto& dev : devnames) { - if (!devids.empty()) { - devids += ","; - } - string id = get_device_id(dev); + string err; + string id = get_device_id(dev, &err); if (id.size()) { + if (!devids.empty()) { + devids += ","; + } devids += dev + "=" + id; } else { - dout(10) << __func__ << " no unique device id for " << dev << dendl; + dout(10) << __func__ << " no unique device id for " << dev << ": " + << err << dendl; } } (*pm)["device_ids"] = devids; @@ -6621,10 +6623,11 @@ void OSD::probe_smart(const string& only_devid, ostream& ss) continue; } - string devid = get_device_id(dev); + string err; + string devid = get_device_id(dev, &err); if (devid.size() == 0) { - dout(10) << __func__ << " no unique id for dev " << dev << ", skipping" - << dendl; + dout(10) << __func__ << " no unique id for dev " << dev << " (" + << err << "), skipping" << dendl; continue; } if (only_devid.size() && devid != only_devid) {