Skip to content
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

Ignore kmod fact read errors #81

Merged
merged 1 commit into from
May 3, 2022
Merged

Ignore kmod fact read errors #81

merged 1 commit into from
May 3, 2022

Conversation

jcpunk
Copy link
Contributor

@jcpunk jcpunk commented Feb 8, 2022

Pull Request (PR) description

The more targeted rescue seems to have a few edges I didn't expect. This PR just puts all the errors into the facter debug level. This should let folks track them if needed, but hide the results for the various edges folks are encountering.

This Pull Request (PR) fixes the following issues

Fixes #79

@silug
Copy link
Contributor

silug commented Feb 23, 2022

I can confirm that this eliminates the

Warning: Facter: Operation not permitted @ io_fread - /sys/module/kdb_main/parameters/enable_nmi

message that I see on CentOS 7 without the change.

Copy link
Member

@smortex smortex left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Better I think, spotted another minor thing you may want to review.

lib/facter/kmod.rb Show resolved Hide resolved
lib/facter/kmod.rb Outdated Show resolved Hide resolved
Copy link
Member

@smortex smortex left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, Thanks!

@jcpunk
Copy link
Contributor Author

jcpunk commented Apr 12, 2022

I'll look into reworking this as something less intrusive, but for now can we get this merged so folks at least aren't actively bugged with the read errors?

@jcpunk jcpunk changed the title Just toss all facter errors into the debug log Ignore kmod fact read errors Apr 28, 2022
@jcpunk jcpunk requested a review from smortex April 28, 2022 04:37
Copy link
Member

@bastelfreak bastelfreak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good to me. Some people around that want to test it on their workstation?

@gcoxmoz
Copy link

gcoxmoz commented Apr 28, 2022

Runs cleanly on both CentOS7 and 8, does what it says, comments make sense explaining why values/errors are being suppressed.

@bastelfreak bastelfreak added the bug Something isn't working label May 3, 2022
@bastelfreak bastelfreak merged commit 3e5d610 into voxpupuli:master May 3, 2022
@jcpunk jcpunk deleted the facter-error branch May 3, 2022 17:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Warning after upgrading to v3.1.0
5 participants