-
Notifications
You must be signed in to change notification settings - Fork 541
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
[block] Refine the '/sys/block' disks query #1897
Comments
It currently does generate error in Ubuntu, and we suspect systemd-udevd to be the cause, but still while it is harmless at sosreport point of view, I don't think sosreport should query unused disk anyway. |
For reference about the Ubuntu bug: |
I'm also wondering if querying parted on Because we could simply do this instead:
|
@BryanQuigley brought to my attention the following PR: #1508 |
What are the errors you are seeing on Ubuntu? Unfortunately there are cases where these unused devices are relevant to support engineers, so I think excluding all loop devices isn't the right answer here. I haven't taken a close look at the block device iterators work for a while but I'll try to go through it again before the new year. |
Somewhat unfortunately it has been possible to configure partitioned loop devices for some time now (since 2.6ish) - and that can create problems when users don't fully understand the configuration or its implications. I'm generally not a fan of parted for diagnostics but there is at least occasional need to understand if loop devices contain partition metadata or not (or have been configured as partitionable loop devices). |
Looking at the LP report, I think it's safe to say the error being generated is not something sos can address, and as Bryn notes there are times the unused loop device info is relevant to support cases. With that said, I'm closing this as the block plugin uses the (now) standardized device list via If there are further concerns with capturing unused loop device info, or if there should be further restrictions on the block plugin's device iteration, feel free to re-open this. |
The
[block]
plugin is instruct to look inside/sys/block
and perform some query cmd against every disk(s) found.https://github.com/sosreport/sos/blob/master/sos/plugins/block.py#L42-L54
I think sosreport should be smarter and query only valid (in-used/mounted) devices, and not everything. Inside
/sys/block
one can find unused loop devices for instance pre-created for future needs.Using the above loop device example, sosreport should only be querying what its in used, and don't bother querying unused loop device, but only list them, as it may or may not generate unwanted error for nothing.
The text was updated successfully, but these errors were encountered: