-
-
Notifications
You must be signed in to change notification settings - Fork 269
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
Add pcie_errors plugin #911
Conversation
manifests/plugin/pcie_errors.pp
Outdated
Optional[String] $source = 'sysfs', | ||
Optional[String] $access_dir = undef, | ||
Optional[Boolean] $report_masked = false, | ||
Optional[Boolean] $persistent_notifications = false, |
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.
does Optional make sense here? In most cases undef isn't a useful value for a Boolean variable.
manifests/plugin/pcie_errors.pp
Outdated
# | ||
class collectd::plugin::pcie_errors ( | ||
Enum['present', 'absent'] $ensure = 'present', | ||
Optional[String] $source = 'sysfs', |
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.
We are never able to set $source to undef if it has a default value. We can only change sysfs
to another string. Are sysfs and proc the only valid values? In that case we could use an enum here?
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.
Good point. Values other than sysfs and proc are treated as error. As suggested I changed data type to enum and updated test case.
It looks like build failed due to one of the configured repositories failing, which seems to be "random" issue not related to this change. @bastelfreak could failing job be repeated? |
The pcie_errors plugin collects PCI Express errors from Device Status in Capability structure and from Advanced Error Reporting Extended Capability where available.