Skip to content

Commit

Permalink
[scsi] Capture udevadm information for tape devices
Browse files Browse the repository at this point in the history
Capture udevadm info for tape devices.

Related: #2463

Signed-off-by: Jose Castillo <[email protected]>
  • Loading branch information
jcastill committed Jan 15, 2024
1 parent 5f01d9f commit 063d112
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
3 changes: 1 addition & 2 deletions sos/report/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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}")
Expand Down
1 change: 1 addition & 0 deletions sos/report/plugins/scsi.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 063d112

Please sign in to comment.