From 063d1124b6397879aeb1bc0a24dc8736349857f3 Mon Sep 17 00:00:00 2001 From: Jose Castillo Date: Fri, 12 Jan 2024 16:39:50 +0000 Subject: [PATCH] [scsi] Capture udevadm information for tape devices Capture udevadm info for tape devices. Related: #2463 Signed-off-by: Jose Castillo --- sos/report/__init__.py | 3 +-- sos/report/plugins/scsi.py | 1 + 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sos/report/__init__.py b/sos/report/__init__.py index 21c9a1bde0..41d79d2776 100644 --- a/sos/report/__init__.py +++ b/sos/report/__init__.py @@ -520,8 +520,7 @@ def _get_tape_devs(self): 'lin_tape' ] for devdir in devdirs: - if os.path.isdir(f"/sys/class/{devdir}"): - devs.extend(glob.glob(f"/sys/class/{devdir}/*")) + devs.extend(glob.glob(f"/sys/class/{devdir}/*")) return devs except Exception as err: self.soslog.error(f"Could not get tape device list: {err}") diff --git a/sos/report/plugins/scsi.py b/sos/report/plugins/scsi.py index 1589c20ac7..bf55a394ad 100644 --- a/sos/report/plugins/scsi.py +++ b/sos/report/plugins/scsi.py @@ -63,6 +63,7 @@ def setup(self): scsi_hosts = glob("/sys/class/scsi_host/*") self.add_device_cmd("udevadm info -a %(dev)s", devices=scsi_hosts) + self.add_device_cmd("udevadm info -a %(dev)s", devices="tape") self.add_device_cmd([ "sg_persist --in -k -d %(dev)s",