Version information
This version is compatible with:
- Puppet Enterprise 2023.8.x, 2023.7.x, 2023.6.x, 2023.5.x, 2023.4.x, 2023.3.x, 2023.2.x, 2023.1.x, 2023.0.x, 2021.7.x, 2021.6.x, 2021.5.x, 2021.4.x, 2021.3.x, 2021.2.x, 2021.1.x, 2021.0.x, 2019.8.x, 2019.7.x, 2019.5.x, 2019.4.x, 2019.3.x, 2019.2.x, 2019.1.x, 2019.0.x
- Puppet >= 6.0.0 < 9.0.0
- Fedora, SLES, Debian, Ubuntu, FreeBSD , , , ,
Start using this module
Add this module to your Puppetfile:
mod 'LeLutin-smartd', '2.6.3'
Learn more about managing modules with a PuppetfileDocumentation
Puppet smartd Module
Table of Contents
Overview
Manages the smartmontools package including the smartd daemon
Description
Installs the smartmontools
package
and enables the smartd
service.
If your hardware supports it, smartd
can automatically probe for the drives,
but if they are hidden behind a RAID controller, it will need additional help.
The module includes a facter plugin to identify drives hiding behind an LSI
MegaRAID/Dell PERC/Supermicro controller on Linux systems if you have the LSI
proprietary MegaCli
tool installed; we don't have any FreeBSD machines with
this controller so haven't written the necessary code to use FreeBSD's standard
mfiutil(8)
utility instead.
Currently, drives behind an LSI MegaRAID controller will be automatically
probed and added to the smartd
configuration file, if the MegaCli
utility
is installed. There is no way to turn this behavior off. This is arguably a
bug.
It is planned that in a future release the megaraid
specific facts will be
migrated into the
puppet-megaraid
module.
If your hard drives are hiding behind an LSI Fusion MPT constroller, you can
obtain SMART information by specifying to this module (with the devices
parameter to monitor devices /dev/sgN
which correspond to drive N
behind
the controller.
Forked
This is a fork of
jhoblitt-smartd
to continue
maintenance since activity has stopped on the previously mentioned repository.
jhoblitt-smartd
was itself a fork of
csail/smartd
that was
initially made primarily to fix support of probing SATA
drives behind a LSI
Megaraid controllers. The author has been aware of the fork and it's hoped
that the two modules can be merged. Since the initial fork, a number of small
API changes have been made to improve usage.
Usage
Simple Usage
include smartd
class{ 'smartd': }
Parameters
All parameters are optional.
ensure
String
defaults to: present
Standard Puppet ensure semantics (and supports purged
state if your package
provider does). Valid values are: present
,latest
,absent
,purged
package_name
String
defaults to: smartmontools
Name of the smartmontools package.
service_name
String
defaults to: smartd
Name of the smartmontools monitoring daemon.
service_ensure
String
defaults to: running
State of the smartmontools monitoring daemon. Valid values are:
running
,stopped
config_file
String
defaults to: (OS-specific)
Path to the configuration file for the monitoring daemon.
devicescan
Bool
defaults to: true
Sets the DEVICESCAN
directive in the smart daemon config file. Tells the
smart daemon to automatically detect all of the SMART-capable drives in the
system.
devicescan_options
String
defaults to: undef
Passes options to the DEVICESCAN
directive. devicescan
must equal true
for this to have any effect.
devices
Array
of Hash
defaults to: []
Explicit list of raw block devices to check. Eg.
[{ device => '/dev/sda', options => '-I 194' }]
mail_to
String
defaults to: root
Smart daemon notification email address.
warning_schedule
String
defaults to: daily
Smart daemon problem mail notification frequency. Valid values are:
daily
,once
,diminishing
, exec
If exec
is selected, a value must be provided to exec_script
.
exec_script
String
defaults to: false
Path to the script that should be executed when problem mail notification
should be sent. This parameter should only be set if warning_schedule
is set
to exec
.
enable_default
Bool
defaults to: true
if $::smartmontools_version >= 5.43
, otherwise false
Enables/disables the DEFAULT
directive in the smartd.conf
file. This
directive was added in the 5.43 release of smartmontools and is unsupported in
previous versions.
If enable_default
is set to false
the the values from the mail_to
and warning_schedule
parameters are set on the DEVICESCAN
directive (if enabled) instead of the [absent] DEFAULT
directive.
Example smartd.conf
content based on this setting:
enable_default => true
# Managed by Puppet -- do not edit!
DEFAULT -m root -M daily
DEVICESCAN
enable_default => false
# Managed by Puppet -- do not edit!
DEVICESCAN -m root -M daily
Here is an example of the error message generated by the DEFFAULT
directive
appearing in the configuration file of 5.42.
smartd 5.42 2011-10-20 r3458 [i686-linux-2.6.18-371.6.1.el5PAE] (local build)
Copyright (C) 2002-11 by Bruce Allen, http://smartmontools.sourceforge.net
Opened configuration file /etc/smartd.conf
Drive: DEFAULT, implied '-a' Directive on line 2 of file /etc/smartd.conf
Drive: DEVICESCAN, implied '-a' Directive on line 3 of file /etc/smartd.conf
Configuration file /etc/smartd.conf was parsed, found DEVICESCAN, scanning devices
Device: DEFAULT, unable to autodetect device type
This option could not be named default
to be consistent with the naming
convention of the other parameters in this module due to this bug
PUP-2244 that affects puppet
2.7.x.
Note that RHEL5 ships with 5.42 while RHEL6 ships with 5.43.
default_options
String
defaults to: undef
Additional arguments to be set on the DEFAULT
directive.
If default
is set to false
, this parameter's value will be set on the
DEVICESCAN
directive (if enabled) instead of the [absent] DEFAULT
directive.
Pedantic Example
class{ 'smartd':
ensure => 'present',
package_name => 'smartmontools',
service_name => 'smartd',
service_ensure => 'running',
config_file => '/etc/smartd.conf',
devicescan => true,
devicescan_options => '-H -m admin@example.com',
devices => [
{ device => '/dev/sg1', options => '-o on -S on -a' },
{ device => '/dev/sg2', options => '-o on -S on -a' },
],
mail_to => 'root',
warning_schedule => 'diminishing',
default => 'false',
default_options => '-H',
}
Hiera Data Bindings
---
smartd::mail_to: "root@%{::domain}"
smartd::devicescan: false
smartd::devices:
-
device: '/dev/cciss/c0d0'
options: '-d cciss,0 -a -o on -S on -s (S/../.././19|L/../../3/21)'
-
device: '/dev/cciss/c0d0'
options: '-d cciss,1 -a -o on -S on -s (S/../.././18|L/../../3/20)'
-
device: '/dev/sda'
options: '-a -o on -S on -s (S/../.././18|L/../../3/20|C/../.././19)'
Facts
megacli
Path to the MegaCli
executable. Example:
megacli => /usr/bin/MegaCli
megacli_version
Version string of the MegaCli
executable. Example:
megacli_version => 8.07.07
megaraid_adapters
The count of LSI MegaRAID adapters detected in the system. Note that this module presently only supports a single adapter per system. Example:
megaraid_adapters => 1
megaraid_fw_package_build
The LSI MegaRAID adapter firmware package string. Example:
megaraid_fw_package_build => 23.22.0-0012
megaraid_fw_version
The LSI MegaRAID adapter firmware version string. Example:
megaraid_fw_version => 3.340.05-2939
megaraid_physical_drives
The LSI MegaRAID unique device ID(s) for all attached disks. Example:
megaraid_physical_drives => 116,117,120,121,122,123,124,125,126,127,128,129,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,200,201,202,203,204,205,206,207
megaraid_physical_drives_sas
The LSI MegaRAID unique device ID(s) for only attached SAS disks. Example:
megaraid_physical_drives_sas => 116,117,120,121,122,123,124,125,126,127,128,129,131,132,133,134,135,136,137,138,139,140,187,188,189,190,191,192,193,194,195,196,197,198,200,201,202,203,204,205,206,207
megaraid_physical_drives_sata
The LSI MegaRAID unique device ID(s) for only attached SATA disks. Example:
megaraid_physical_drives_sata => 141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186
megaraid_product_name
The LSI MegaRAID product name string. Example:
megaraid_product_name => LSI MegaRAID SAS 9286CV-8e
megaraid_serial
The LSI MegaRAID serial number string. Example:
megaraid_serial => SV22925366
megaraid_virtual_drives
A listing of /dev/<foo>
devices exported by a LSI MegaRAID controller. Example:
megaraid_virtual_drives => sda,sdb,sdc,sdd,sde,sdf,sdg,sdh,sdk,sdl
smartd
Path to the smartd
executable. Example:
smartd => /usr/sbin/smartd
smartmontools_version
Version of the install smartmontools
package. Example:
smartmontools_version => 5.43
Limitations
Tested Platforms
These are the platforms that have had integration testing since the fork.
- el6.x
- el5.x
Versioning
This module is versioned according to the Semantic Versioning 2.0.0 specification.
Support
Please log tickets and issues at github
See Also
Reference
Table of Contents
Classes
smartd
: Manage the smartmontools package including the smartd daemonsmartd::params
: == Class: smartd::params This class should be considered private. === Authors MIT Computer Science & Artificial Intelligence Laboratory Jo
Data types
Smartd::Ensure
: Valid values for ensure parameterSmartd::Warning_schedule
: Type of warning schedule, used for -M option of devicescan
Classes
smartd
smartd/manifests/init.pp
- Copyright (C) 2012 MIT Computer Science & Artificial Intelligence Laboratory
- Copyright (C) 2013-2015 Joshua Hoblitt jhoblitt@cpan.org
- Copyright (C) 2015-2023 Gabriel Filion gabster@lelutin.ca
Examples
basic usage
class { 'smartd': }
Parameters
The following parameters are available in the smartd
class:
ensure
package_name
service_name
service_ensure
manage_service
config_file
devicescan
devicescan_options
devices
mail_to
warning_schedule
exec_script
enable_default
default_options
ensure
Data type: Smartd::Ensure
Standard Puppet ensure semantics (supports purged
state if your
package provider does). Defaults to present
. Valid values are:
present
,latest
,absent
,purged
Default value: 'present'
package_name
Data type: String[1]
Name of the smartmontools package.
Default value: $smartd::params::package_name
service_name
Data type: String[1]
Name of the smartmontools monitoring daemon.
Default value: $smartd::params::service_name
service_ensure
Data type: Enum['running', 'stopped']
State of the smartmontools monitoring daemon. Defaults to running
. Valid
values are:
running
,stopped
Default value: $smartd::params::service_ensure
manage_service
Data type: Boolean
Set this to false to disable managing the smartmontools service. This parameter is disregarded when $ensure = absent|purge.
Default value: $smartd::params::manage_service
config_file
Data type: Stdlib::Absolutepath
Path to the configuration file for the monitoring daemon.
Default value: $smartd::params::config_file
devicescan
Data type: Boolean
Sets the DEVICESCAN
directive in the smart daemon config file. Tells the
smart daemon to automatically detect all of the SMART-capable drives in the
system. Defaults totrue
.
Default value: $smartd::params::devicescan
devicescan_options
Data type: String
String of options to the DEVICESCAN
directive. devicescan
must equal true
for this to have any effect.
Default value: $smartd::params::devicescan_options
devices
Data type: Array[Hash]
Array
of Hash
. Explicit list of raw block devices to check. Eg.
[{ device => '/dev/sda', options => '-I 194' }]
Default value: $smartd::params::devices
mail_to
Data type: String
Local username or email address used by smart daemon for notifcations.
Defaults to root
Default value: $smartd::params::mail_to
warning_schedule
Data type: Smartd::Warning_schedule
Smart daemon problem mail notification frequency. Defaults to daily
.
Valid values are: daily
,once
,diminishing
, exec
Note that if the value exec
is used, then the parameter exec_script
must be specified.
Default value: $smartd::params::warning_schedule
exec_script
Data type: Optional[String]
Path to the script that should be executed if warning_schedule
is set to
exec
.
Default value: $smartd::params::exec_script
enable_default
Data type: Boolean
Set this to false to disable the DEFAULT
directive in the smartd.conf
file. The DEFAULT
directive was added in the 5.43 release of
smartmontools.
If this parameter is set to false, then the values from the mail_to
and
warning_schedule
parameters are set o nthe DEVICESCAN
directive (if
enabled) instead of the (absent) DEFAULT
directive.
Default value: $smartd::params::enable_default
default_options
Data type: String
String of additional arguments to be set on the DEFAULT
directive.
If enable_default
is set to false, the value for this parameter will be
set on the DEVICESCAN
directive (if enabled) instead of the (absent)
DEFAULT
directive.
Default value: $smartd::params::default_options
smartd::params
== Class: smartd::params
This class should be considered private.
=== Authors
MIT Computer Science & Artificial Intelligence Laboratory Joshua Hoblitt jhoblitt@cpan.org
=== Copyright
Copyright 2012 Massachusetts Institute of Technology Copyright (C) 2013 Joshua Hoblitt
Data types
Smartd::Ensure
Valid values for ensure parameter
Alias of Enum['present', 'latest', 'absent', 'purged']
Smartd::Warning_schedule
Type of warning schedule, used for -M option of devicescan
Alias of Enum['daily', 'once', 'diminishing', 'exec']
[Current]
plumbing update
- 97ddb33 - (Joshua Hoblitt) Convert specs to RSpec 3.1.7 syntax with Transpec
This conversion is done by Transpec 3.1.1 with the following command: transpec --keep oneliner
-
65 conversions from: obj.should to: expect(obj).to
-
23 conversions from: == expected to: eq(expected)
For more details: https://github.com/yujinakayama/transpec#supported-conversions
- 5c0628b - (Joshua Hoblitt) fix trailing whitespace
- 4808708 - (Joshua Hoblitt) update copyright notice year to 2015
- 468b608 - (Joshua Hoblitt) Merge pull request #47 from lamawithonel/pr46_remove_shell_config
Remove shell_config dependency
- c51abf8 - (Lucas Yamanishi) Remove shell_config dependency
This replaces the shell_config
resource on Debian-based systems with
an equivalent augeas
resource. It also changes it to depend on the
value of the $svc_enable
variable instead of $file_ensure
, bringing
it in-line with its purpose.
- 5530876 - (Lucas Yamanishi) Fix params.pp version comparison for Puppet 4
If the $::smartmontools_version
fact does not exisist (is undef
)
then versioncmp()
will fail with a type error. This adds a check to
define it as 0.0
in such a case.
Feature/v2.5.0
- 0a288b9 - (Joshua Hoblitt) bump version to v2.5.0
- 2481760 - (Joshua Hoblitt) fixup! fix trailing whitespace
- e772a6a - (Joshua Hoblitt) update rspec-puppet gem version to ~> 2.2
For bugfixes and to allow the 2.x version to float as the API stability has been better than with the 1.x series.
- 570ee00 - (Joshua Hoblitt) remove default nodset symlink
To resolve this PMT error: Puppet::ModuleTool::Errors::ModuleToolError: Found symlinks. Symlinks in modules are not allowed, please remove them.
- d39f0ad - (Joshua Hoblitt) add centos 5.11 nodeset
- 2f8b7ca - (Joshua Hoblitt) add puppet-blacksmith gem
- fe81f90 - (Joshua Hoblitt) add travis_lint rake target
- 78d0124 - (Joshua Hoblitt) add debian 7.8 nodeset
- 49490d8 - (Joshua Hoblitt) fix trailing whitespace
- 0d434ce - (Joshua Hoblitt) Merge pull request #43 from queeno/manage_service_and_dont_attempt_to_stop
Manage smartd service and don't attempt to stop if package is absent
Fix default group for FreeBSD
- 2f976f1 - (Dan Offord) Fix default group for FreeBSD
By default FreeBSD doesn't have a root group, instead has a wheel group instead. This commit changes the default group to call $::gid and fixes the spec tests so it knows about the default group for each O/S (either root or wheel)
- 19be823 - (Simon Aquino) Added unit tests for the $manage_service functionality
I've added and amended some unit tests in order to check the $manage_service functionality introduced in previous commits.
- 8b633d9 - (Simon Aquino) Fix wrong parameter name in params.pp
It should be $manage_service not $service_manage!
- d5ce6ce - (Simon Aquino) Don't manage the smartd service when ensure => absent
If the smartd package is not installed, puppet will attempt to stop a service that doesn't exist. For this reason, the smartd service should not be managed if ensure is set to absent or purged. If smartd is getting uninstalled, the deb script will take care to stop the service anyway.
- 8e0f4bc - (Simon Aquino) Allow users to manage the smartd service
The smartd service resource has been wrapped in an if statement and controlled by the $manage_service parameter, so that a user of the module can choose manage the service externally.
- 7ed901e - (Joshua Hoblitt) add ruby 2.2 to travis matrix
- cae2a8a - (Joshua Hoblitt) Merge pull request #42 from jhoblitt/feature/puppet-4.0
Feature/puppet 4.0
- f7991ae - (Joshua Hoblitt) add bundler_args to .travis.yml
- 62c91d7 - (Joshua Hoblitt) add :validate to default rake target list
- 5859be6 - (Joshua Hoblitt) add metadata-json-lint gem
Needed by rake metadata.json validation target.
- 83bbcb3 - (Joshua Hoblitt) fix puppet 4.0 type compatibility issues
- 7f67f6b - (Joshua Hoblitt) clone shell_config repo to github
Needed to fix fixtures git clone option compatibility issues.
- 27e37a1 - (Joshua Hoblitt) set stdlib requirement to 4.6.0
- 3ffe96b - (Joshua Hoblitt) update travis matrix puppet 3.x minimum version to 3.7
- 91e420e - (Joshua Hoblitt) update rspec-puppet gem version to ~> 2.1.0
For compatibility with puppet 4.0.0
- 62739bf - (Joshua Hoblitt) add junit/ to .gitiginore
Generated by beaker 5
- 72de891 - (Joshua Hoblitt) add puppet 4.0 to travis matrix
- 9219718 - (Joshua Hoblitt) remove puppet 2.7 from travis matrix
4.0.0 has been released; support major release -1
- 3d1a500 - (Joshua Hoblitt) update beaker nodesets to use current chef/bento boxes
- 164b114 - (Joshua Hoblitt) add log/ to .gitignore
Generated by beaker during execution.
- 646933b - (Joshua Hoblitt) remove ruby 2.2 from travis matrix
Per https://github.com/puppetlabs/puppet/pull/3522#issuecomment-72404469 , puppet 3.7.x will not support ruby 2.2.
- 2404339 - (Joshua Hoblitt) pin rspec on Ruby 1.8.7 (rspec/rspec-core#1864)
- a37bf31 - (Joshua Hoblitt) use rspec-puppet 2.0.0 from gems instead of git
- fac6dac - (Joshua Hoblitt) add FACTER_GEM_VERSION to Gemfile
v2.4.0
Feature/v2.4.0
- 9e651a2 - (Joshua Hoblitt) bump version to v2.4.0
- b469715 - (Joshua Hoblitt) update Rakefile boilerplate
- 9b3c52c - (Joshua Hoblitt) replace Modulefile vs metadata.json
- 9311cbe - (Joshua Hoblitt) update fixtures stdlib to 4.2.0
- 6b29744 - (Joshua Hoblitt) update travis matrix
- 951d6a5 - (Joshua Hoblitt) suppress linter 80chars warnings
In params.pp where it's not easy to avoid slightly > 80char lines
- 6100a71 - (Joshua Hoblitt) update rspec-puppet to v2.0.0
- 5a8d71c - (Joshua Hoblitt) Merge pull request #40 from negz/master
Expose PD sizes, and support older MegaCli binaries.
- 18589cc - (Nic Cope) Support ancient versions of MegaCli
At around version 8.02.16 some arguments to MegaCli changed. This change attempts to determine whether MegaCli is modern (8.02.16 or newer) or legacy (everything else). Facts affected by the changed arguments are gated using a confine statement.
This change also handles cases where the MegaCli binary is lowercase (megacli).
- b3cf2b8 - (Nic Cope) Add a fact exposing the sizes of physical disks
- 8e003d1 - (Joshua Hoblitt) Merge pull request #39 from jhoblitt/feature/future_parser
Feature/future parser
- e80c3aa - (Joshua Hoblitt) make #verify_contents usage compatible with rspec-puppet > 1.0.1
The verify_contents method invocations have been updated to work with rspec-puppet 1.0.1+ but are now incompatible with <= 1.0.1 https://github.com/rodjek/rspec-puppet/issues/235
- d5daf1e - (Joshua Hoblitt) add future parser to travis matrix
- 5c219ce - (Joshua Hoblitt) fix megaraid_virtual_drives fact return value
Resolves this test failure: 1) megaraid_virtual_drives on linux no adapters should be nil Failure/Error: Facter.fact(:megaraid_virtual_drives).value.should be_nil expected: nil got: ""
v2.3.0
Feature/v2.3.0
- 925effc - (Joshua Hoblitt) bump version to v2.3.0
- 65306af - (Joshua Hoblitt) mv all rspec-puppet tests under ./spec/unit/
- 155eca5 - (Joshua Hoblitt) remove rspec-system support
- 7306e3a - (Joshua Hoblitt) Merge pull request #37 from razorsedge/fedora_config_location
Fedora config location
- 293a6b2 - (Michael Arnold) Fix the RedHat bits to better match the Fedora PR.
- bbcae38 - (Michael Arnold) Better support for RedHat smartmontools 6.x.
Fixing Fedora support similar to #36.
Add in support for EL 7 new config location.
- 399ac1a - (Michael Arnold) Add in support for EL 7 new config location.
EL 7 now puts the smartd.conf in /etc/smartmontools.
v2.2.3
- a29b3e6 - (Joshua Hoblitt) bump version to v2.2.3
- 2689cb1 - (Joshua Hoblitt) Merge pull request #34 from solarkennedy/debian_support
Added debian support and working tests. Closes #32
- 5554213 - (Kyle Anderson) Added debian support and working tests. Closes #32
- 962c878 - (Joshua Hoblitt) Merge pull request #33 from pauloconnor/after_package
Allow the service to start only after the package is installed
- db01583 - (Paul O'Connor) Allow the service to start only after the package is installed
v2.2.2
bump version to v2.2.2
- 9ab316a - (Joshua Hoblitt) bump version to v2.2.2
- 97af513 - (Joshua Hoblitt) Merge pull request #30 from jhoblitt/feature/megaraid_facts
update megaraid_serial fact to deal with SM motherboards
- 9d2d44b - (Joshua Hoblitt) add megacli output example provided in issue #29
- ebf88cd - (Joshua Hoblitt) update megaraid_serial fact to deal with SM motherboards
Per #29, the LSI controller on at least some models of SuperMicro motherboards does not report a serial number. The megaraid_serial fact has not gracefully handling this case and facter was generating errors.
- 34ccdd4 - (Joshua Hoblitt) fix MD markup typos in README
v2.2.1
bump version to v2.2.1
- 705cb16 - (Joshua Hoblitt) bump version to v2.2.1
- c870d59 - (Joshua Hoblitt) Merge pull request #27 from jhoblitt/feature/megaraid_facts
add -NoLog
flag to all invocations of megacli
- ea4af30 - (Joshua Hoblitt) tweak README formatting of facts (again)
- b6722ec - (Joshua Hoblitt) tweak README formatting of facts
- deef545 - (Joshua Hoblitt) add all module supplied facts to README
Per issue #24
- 4678256 - (Joshua Hoblitt) add
-NoLog
flag to all invocations ofmegacli
To suppress the /MegaSAS.log
file from being created by the megaraid
related facts, per issue #25.
- 4ababa9 - (Joshua Hoblitt) work around travis switching to REE for ruby 1.8.7
See https://github.com/travis-ci/travis-ci/issues/2217
Many thanks to @dominic for sharing this on the puppet-dev channel!
Add default params for SUSE
- 6ad96f1 - (Lars Vogdt) Add default params for SUSE
SUSE uses the same params as Debian and RedHat.
v2.2.0
- 3775d43 - (Joshua Hoblitt) bump version to v2.2.0
- b92efd9 - (Joshua Hoblitt) Merge pull request #23 from jhoblitt/feature/megaraid_facts
Feature/megaraid facts
- 04d71cc - (Joshua Hoblitt) add megaraid_fw_version fact
- 2d12260 - (Joshua Hoblitt) add megaraid_fw_package_build fact
- 7358769 - (Joshua Hoblitt) add megaraid_serial fact
- 512d90e - (Joshua Hoblitt) add megaraid_product_name fact
- f575189 - (Joshua Hoblitt) add megacli_version fact
- e7d78b5 - (Joshua Hoblitt) add el5.x to the tested platforms list
v2.1.0
- 19e67a4 - (Joshua Hoblitt) bump version to v2.1.0
- 333d20a - (Joshua Hoblitt) Merge pull request #22 from jhoblitt/feature/megaraid_facts
add megaraidphysical_drives{sata,sas} facts
- 824e086 - (Joshua Hoblitt) change smartd.conf ERB to use megaraidphysical_drives{sas,sata} facts
This modification add ssupport for polling the SMART values of SAS
drives behind a MegaRAID controller. The megaraid_physical_drives
fact is no longer used internally by this module.
- 29e6a16 - (Joshua Hoblitt) add megaraidphysical_drives{sata,sas} facts
- 4f558f2 - (Joshua Hoblitt) Merge pull request #21 from jhoblitt/feature/smartd_conf_default
Feature/smartd conf default
- aad6db6 - (Joshua Hoblitt) rename $default param to smartd class to $enable_default
To work around this bug in Puppet 2.7.x: https://tickets.puppetlabs.com/browse/PUP-2244
- ff61535 - (Joshua Hoblitt) add $default_options param to smartd class
- fix a few typos in README.md
- a51ca20 - (Joshua Hoblitt) add $default param to smartd class
- 365a6ab - (Joshua Hoblitt) Merge pull request #20 from jhoblitt/feature/smartmon_facts
Feature/smartmon facts
- 60a2988 - (Joshua Hoblitt) add smartmontools_version fact
- 57af86d - (Joshua Hoblitt) do not confine smartd fact to linux
- 8cbfc2b - (Joshua Hoblitt) add smartd fact
Fact for the path to the smartd executable.
Feature/boilerplate update
- 6ea41b2 - (Joshua Hoblitt) tidy Rakefile formatting
- 293eda0 - (Joshua Hoblitt) update LICENSE copyright notice
- 521a114 - (Joshua Hoblitt) update travis matrix
- 4bf961c - (Joshua Hoblitt) update .gitignore
- 860edc7 - (Joshua Hoblitt) Merge pull request #18 from razorsedge/MegaCli_NoLog
Added -NoLog to MegaCli commandline in facts.
- f9b95b0 - (Michael Arnold) Include rspec test updates.
- 1a7eb16 - (Michael Arnold) Added -NoLog to MegaCli commandline in facts.
This keeps the MegaSas.log file from showing up any time factor is run.
- a903ee1 - (Joshua Hoblitt) update README formatting + boilerplate
- 1d5dc37 - (Joshua Hoblitt) Merge pull request #15 from jhoblitt/rspec-system-updates
update rspec-system boilerplate
- 60de1c5 - (Joshua Hoblitt) update rspec-system boilerplate
- edf71eb - (Joshua Hoblitt) Merge pull request #14 from jhoblitt/refactor_facts
refactor megaraid facts + add fact tests
- 2076ecc - (Joshua Hoblitt) trim travis test matrix
- 23f1348 - (Joshua Hoblitt) add :require => false to all Gemfile gems
- 720a1de - (Joshua Hoblitt) fix rspec-puppet 1.0.1 deprecation warning
DEPRECATION: include_class is deprecated. Use contain_class instead.
-
0d15b7e - (Joshua Hoblitt) refactor megaraid facts + add fact tests
-
stop checking for megaraid
/dev/*
files and instead let megacli tell us if it can find any raid controllers -
use blockdevice facts instead of exec'ing
lsscsi
, inspired by Kyle Anderson's gist -
split each fact into it's own .rb file
-
add rspec test coverage of all facts
-
remove non-functioning freebsd facts completely
-
dbdbd4a - (Joshua Hoblitt) fix whitespace for linter
v2.0.0
- e044951 - (Joshua Hoblitt) bump version to v2.0.0
- 6cbd702 - (Joshua Hoblitt) synx up smartd comments with README
- afd6759 - (Joshua Hoblitt) note v2 API changes + full parameter list in README
- 66c4157 - (Joshua Hoblitt) Merge pull request #11 from razorsedge/supermicro
add megaraid fact support for Supermicro branded LSI controllers
Add example Hiera data bindings to README.md.
- fe0c07d - (Michael Arnold) Mention support of Supermicro branded MegaRAID controllers.
- 56b40b3 - (Michael Arnold) Add example Hiera data bindings to README.md.
- aadbcef - (Michael Arnold) Also look for Supermicro-branded controllers.
- f107cc2 - (Joshua Hoblitt) Merge pull request #9 from jhoblitt/merge_devices_and_device_options
merge class smartd $devices and $device_options -> $devices
- b2bb897 - (Joshua Hoblitt) merge class smartd $devices and $device_options -> $devices
$devices is now accepts and Array of Hash. This is to allow multiple smartd.conf entires for the same blockdev as is typically required for probing through to individual disks behind a block device presented by a RAID controller.
- 6029324 - (Joshua Hoblitt) add rspec-system-puppet infrastructure + basic system tests
v1.0.2
- 1f34762 - (Joshua Hoblitt) bump version to v1.0.2
- 40cb57a - (Joshua Hoblitt) lint ignore 'pkg/*/.pp'
v1.0.1
- 23b05cd - (Joshua Hoblitt) bump version to v1.0.1
- 244e7fe - (Joshua Hoblitt) add puppet 3.3.0 to travis test matrix
- ccb590c - (Joshua Hoblitt) reduce stdlib requirement to 3.0.0
- 9968ba4 - (Joshua Hoblitt) add github flavored markdown syntax highlighting to README
- 535b835 - (Joshua Hoblitt) start using shared_examples in rspec
to try to reduce duplicate test statements
v1.0.0
- 3a2d8d2 - (Joshua Hoblitt) README typo
- bc1eaa3 - (Joshua Hoblitt) README markdown tweaks
- 6e9121f - (Joshua Hoblitt) rename $device_opts to $device_options
For naming consistency with $devicescan_options
- 9c9564c - (Joshua Hoblitt) fix rspec-puppet syntax to work with ruby 1.8.7 (again)
- 10d7489 - (Joshua Hoblitt) fix rspec-puppet syntax to work with ruby 1.8.7
- 7c27501 - (Joshua Hoblitt) README/doc cleanup
- 2a24156 - (Joshua Hoblitt) tidy up smartd.conf content tests based on megaraid facts
- 819db0b - (Joshua Hoblitt) set group ownership to 'root' instead of 0
- 8b17d03 - (Joshua Hoblitt) update unsupported OS fail string
- 4c8828e - (Joshua Hoblitt) trivial ws consistency fixes`
- a068b7a - (Joshua Hoblitt) fix lint warnings
- 09fb9d8 - (Joshua Hoblitt) [re-]add[?] class smart $service_name param
- 4c0ef6e - (Joshua Hoblitt) validate all class smartd params
- cede61e - (Joshua Hoblitt) remove monit integration
Not setup to test integration and it's unknown if this functionality is working. Support should be re-added with integration tests.
- 834f73f - (Joshua Hoblitt) add class smartd $service_ensure param
- 6475a9e - (Joshua Hoblitt) merge class smartd $ensure and $autoupdate params
- 4c6b9bc - (Joshua Hoblitt) Merge remote-tracking branch 'skel/master'
- ed6a68b - (Joshua Hoblitt) ignore patch related files *{.orig,.rej,.patch}
- 6a67990 - (Joshua Hoblitt) add puppet-syntax support
- dddb48a - (Michael Arnold) Clean up resource dependencies.
- d78077b - (Michael Arnold) Use puppetlabs/stdlib to validate inputs.
- fb78b8b - (Michael Arnold) Updated rspec tests to deal with fix to template.
Added shell_config to .fixtures.yml. Added a whole lot of testing of various parameters and template configurations on all supported osfamilies.
- 435661d - (Joshua Hoblitt) add travis-ci build placard
- fb932f9 - (Joshua Hoblitt) add example spec test
- 4050f0d - (Joshua Hoblitt) add a default .travis.yml
- 3b28801 - (Joshua Hoblitt) exclude travis-ci testing of puppet < 3.2 with ruby >= 2.0
- be9867d - (Joshua Hoblitt) fix travis-ci placard url
- c1141d8 - (Joshua Hoblitt) add travis-ci testing with ruby 2.0.0 and puppet 3.2.1
- 4732693 - (Joshua Hoblitt) pull gems from https://rubygems instead of :rubygems
- d16cc78 - (Joshua Hoblitt) git ignore Gemfile.lock
- 9b35dd8 - (Michael Arnold) Updated rspec tests to deal with fix to template.
Added shell_config to .fixtures.yml. Added a whole lot of testing of various parameters and template configurations on all supported osfamilies.
- c46ff1e - (Joshua Hoblitt) git ignore Gemfile.lock
- e86f789 - (Joshua Hoblitt) install ruby gems from https://rubygems.org instead of :rubygems
To resolve this warning:
The source :rubygems is deprecated because HTTP requests are insecure.
Please change your source to 'https://rubygems.org' if possible, or
'http://rubygems.org' if not.
- ecd8877 - (Michael Arnold) Make puppetdoc work.
- cedc03d - (Michael Arnold) Format output to have spaces and linefeeds in the right places.
- d4ab6d6 - (Joshua Hoblitt) fix setting megaraid device options via device_opts => { 'megaraid' => ... }
- d487c9a - (Joshua Hoblitt) add travis-ci status to README.md
- 8f82a65 - (Joshua Hoblitt) overhaul smartd.conf template
improve readability sort megaraid device & disks fix some whitespace issues
- bb34e2d - (Joshua Hoblitt) add a couples of spec tests to cover basic usage
- 56c987b - (Joshua Hoblitt) Merge pull request #1 from ucam-cl-dtg/master
Test for megaraid device symbols being :undefined in smartd.conf template
- 9982990 - (Joshua Hoblitt) rename README -> README.md, tweak README, mv all API docs to smartd.pp
- 096eb58 - (Joshua Hoblitt) rename smartd::defaults -> smartd::params
To better adhere to the current defacto naming conventions.
- 65fdc06 - (Joshua Hoblitt) fix all lint issues and add per class docs
- 3463290 - (Andrew Rice) Added a test to see if the lookup variables megaraid_device and megaraid_drive are :undefined
When running without megaraid devices puppet throws an error about being unable to split on :undefined:Symbol so we should test if its undefined and not attempt the split
- 9260f66 - (Joshua Hoblitt) add spec/lint/travis boilerplate
- e02f06c - (Joshua Hoblitt) restart smartd service when smartd.conf is modified
- 8387586 - (Joshua Hoblitt) mv DEVICESCAN to the end of smartd.conf
once DEVICESCAN has probed a block device smartd will ignore any subsequent commands in the smartd.conf file for that block device
- 93d1ef5 - (Joshua Hoblitt) fix SAT warning on Linux (unknown if this breaks SAS disks) fix template .to_i error from trying to convert an array into an integer
This is the SAT error:
/dev/sdc [megaraid_disk_14][SAT]: Device open changed type from 'megaraid' to 'sat' Smartctl open device: /dev/sdc [megaraid_disk_14][SAT] failed: SATA device detected, MegaRAID SAT layer is reportedly buggy, use '-d sat+megaraid,N' to try anyhow
- f2042c3 - (Joshua Hoblitt) rename megaraid_smartd_device_name fact to megaraid_virtual_drives and list all megaraid VD block devices
- 5a1fd71 - (Joshua Hoblitt) change the megaraid_physical_drives fact to probe with lsscsi
The existing smartctl based probe fails on rhel6.x with these package versions:
smartmontools-5.42-2.el6.x86_64 kernel-2.6.32-279.9.1.el6.x86_64
It's unknown if the smartctl probe works with other el6.x tool + kernel combinations. It's hoped that the lsscsi based probe will be more robost (unless the output format of lsscsi changes).
- 73827bb - (Joshua Hoblitt) sort the megaraid_physical_drives fact's drive listing
- 58887e2 - (Joshua Hoblitt) rename class smartd param $scan -> $devicescan
it's slightly better 'self documenting' if the class params match the configuration file directives
- 0b3f1b9 - (Joshua Hoblitt) rename class smartd param $schedule -> $warning_schedule to silence warning
Warning: schedule is a metaparam; this value will inherit to all contained resources in the smartd definition
- 89c55ce - (Joshua Hoblitt) add param $devicescan_options to class smartd
used to pass arguments to the DEVICESCAN directive in smartd configuration file
- 51b6a10 - (Joshua Hoblitt) add param $enable_monit to class smartd
Used to enable/disable automatic declaration of a monit::monitor resource. Default is false.
Dependencies
- puppetlabs/stdlib (>= 4.13.0 < 9.0.0)
Copyright 2012 Massachusetts Institute of Technology Copyright (C) 2013-2015 Joshua Hoblitt <jhoblitt@cpan.org> Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that both the above copyright notice and this permission notice appear in all copies, that both the above copyright notice and this permission notice appear in all supporting documentation, and that the name of M.I.T. not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. M.I.T. makes no representations about the suitability of this software for any purpose. It is provided "as is" without express or implied warranty. THIS SOFTWARE IS PROVIDED BY M.I.T. ``AS IS''. M.I.T. DISCLAIMS ALL EXPRESS OR IMPLIED WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL M.I.T. BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.