Comments (4)
@razorsedge Sorry for the delay in responding, github email notifications continue to be MIA most of the time for me.
You've obviously encountered a case that was never considered by the API. device_options
is a hash so in your example the '/dev/cciss/c0d0'
key is being redefined over and over again.
I think the API needs to be changed to devices
being an Array of Array or an Array of Hash with device_options
being removed. Something like:
class { 'smartd':
devices => [
[ '/dev/cciss/c0d0', '-d cciss,0 -a -o on -S on' ],
[ '/dev/cciss/c0d0', '-d cciss,1 -a -o on -S on' ],
[ '/dev/cciss/c0d0', '-d cciss,2 -a -o on -S on' ],
[ '/dev/cciss/c0d0', '-d cciss,3 -a -o on -S on' ],
[ '/dev/cciss/c0d0', '-d cciss,4 -a -o on -S on' ],
[ '/dev/cciss/c0d0', '-d cciss,5 -a -o on -S on' ],
],
}
or
class { 'smartd':
devices => [
{ 'dev' => '/dev/cciss/c0d0', options => '-d cciss,0 -a -o on -S on' },
{ 'dev' => '/dev/cciss/c0d0', options => '-d cciss,1 -a -o on -S on' },
...
],
}
Another possibility would be to abandon both attributes and try to use a defined type but that would require setting a unique namevar for your case.
smartd::device { 'cciss1':
device => '/dev/cciss/c0d0',
options => '-d cciss,1 -a -o on -S on',
}
What are your thoughts?
from puppet-smartd.
@jhoblitt I am kind of ambivalent. I know that right now I want to use Hiera data bindings to provide the settings with the possibility to merge parts of the hierarchy into the smartd.conf. This probably precludes defined types. A hash would allow for Hiera hash merging.
Long-term I would want fact discovery to automatically find all DASD block devices, figure out if they are behind hardware RAID, and apply the correct '/dev/cciss/c0d0', '-d cciss,4'
'/dev/sdg', '-d megaraid,2'
pairings to the smartd.conf.
from puppet-smartd.
Could you take a look at #9 and see if it covers your needs? I added a test based on your example.
from puppet-smartd.
#9 fixes it. Thanks.
from puppet-smartd.
Related Issues (15)
- megaraid_virtual_drives: undefined method `map' HOT 13
- Auto-generating the devices array programmatically HOT 8
- facts are undocumented HOT 1
- Use -NoLog for all megacli commands HOT 3
- Error in megaraid_serial HOT 2
- merge autoupdate parameter into ensure HOT 1
- The config is now /etc/smartmontools/smartd.conf on EL7
- Invalid relationship: File[/etc/smartd.conf] when ensure is changed from present to (absent|purged) HOT 4
- -M exec not supported
- -n option is not set by default HOT 2
- New release? HOT 1
- SAS & SATA disks behind megaraid controllers need to be probed differently HOT 1
- megacli_legacy.rb: cannot load such file -- semver HOT 4
- Lower the puppetlabs/stdlib dependency version HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from puppet-smartd.