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

Handle Facter errors as failures #50

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

PaulSD
Copy link

@PaulSD PaulSD commented Oct 22, 2024

Facter errors are currently ignored (not included in any metrics). Count them as failures.

Copy link
Member

@ekohl ekohl left a comment

Choose a reason for hiding this comment

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

@bastelfreak I think you've seen more reports in practice. Are there more things we should keep in mind?

files/report.rb Outdated Show resolved Hide resolved
@alexjfisher
Copy link

This could actually be quite annoying in cases where you have a few older boxes running old versions of puppet and ruby as even if an old system doesn't use 90% of your modules, they will try and evaluate facts from all modules. Personally, I'm quite happy ignoring such errors. Maybe it needs to be configurable?

@PaulSD
Copy link
Author

PaulSD commented Oct 23, 2024

In my case, we had a custom fact that was failing on all of our boxes (due to a logic error in the collector code) and was leading to some misconfigurations.
We regularly look at the "Config Management" page in Satellite to check for any Puppet issues in our environment, but nothing appeared on that page because the failing fact collector didn't count toward any of the metrics. The error did show up if you view the report for a specific puppet run on a specific box, but we don't normally look at those individual reports unless Satellite shows a failure on the "Config Management" page (which it didn't). Hence, we didn't notice the error until someone happened to run puppet agent -t on the command line on a box.
So, for us, it is important for facter errors to be counted, not ignored.

I've added a configuration option.

files/report.rb Outdated Show resolved Hide resolved
files/report.rb Outdated Show resolved Hide resolved
Copy link
Member

@ekohl ekohl left a comment

Choose a reason for hiding this comment

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

@alexjfisher thanks for your input. I'm leaning to enabling this by default. Is the (hiera) parameter sufficient for you?

templates/puppet.yaml.erb Outdated Show resolved Hide resolved
manifests/init.pp Outdated Show resolved Hide resolved
files/report.rb Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants