-
Notifications
You must be signed in to change notification settings - Fork 542
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[plugins][scsi] Enhance data gathering of tape devices #3473
base: main
Are you sure you want to change the base?
[plugins][scsi] Enhance data gathering of tape devices #3473
Conversation
Add get_tape_devs() function and other logic to iterate and gather information about tape devices. Related: sosreport#2463 Signed-off-by: Jose Castillo <[email protected]>
Draft PR for now because I'm still testing this. |
Congratulations! One of the builds has completed. 🍾 You can install the built RPMs by following these steps:
Please note that the RPMs should be used only in a testing environment. |
At this point I wonder if it wouldn't be better to have a 'tape' or 'tapes' plugin by itself, like we have for block devices... |
sos/report/__init__.py
Outdated
'lin_tape' | ||
] | ||
for devdir in devdirs: | ||
if os.path.isdir(f"/sys/class/{devdir}"): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is redundant test:
>>> os.path.isdir("/blah")
False
>>> glob.glob("/blah")
[]
>>>
(purely from performance point of view, I even did a test comparing both approaches. It seems Python spends bit more time in isdir
test every time than in (sometimes) running extra glob
and adding empty list)
Capture udevadm info for tape devices. Related: sosreport#2463 Signed-off-by: Jose Castillo <[email protected]>
a4bb44c
to
063d112
Compare
_get_block_devs() and _get_fibre_devs(), and
Please place an 'X' inside each '[]' to confirm you adhere to our Contributor Guidelines