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

Add support for setting primary and secondary cache properties #4

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion metadata.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
license 'Apache 2.0'
description 'Manages Solaris zfs'
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
version '0.0.6'
version '0.0.7'

%w(solaris2 ubuntu freebsd).each do |os|
supports os
Expand Down
4 changes: 2 additions & 2 deletions providers/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ def load_current_resource
case node['platform']
# freebsd's zfs doesn't support the 'zone' functionality
when 'freebsd'
@managed_props = %w(mountpoint recordsize atime compression quota refquota reservation refreservation dedup)
@managed_props = %w(mountpoint recordsize atime compression quota refquota reservation refreservation dedup primarycache secondarycache)
else
@managed_props = %w(mountpoint zoned recordsize atime compression quota refquota reservation refreservation dedup)
@managed_props = %w(mountpoint zoned recordsize atime compression quota refquota reservation refreservation dedup primarycache secondarycache)
end

@zfs.info(info?)
Expand Down
2 changes: 2 additions & 0 deletions resources/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
attribute :reservation, kind_of: String, default: 'none'
attribute :refreservation, kind_of: String, default: 'none'
attribute :dedup, kind_of: String, equal_to: %w(on off), default: 'off'
attribute :primarycache, kind_of: String, equal_to: %w(all none metadata), default: 'all'
attribute :secondarycache, kind_of: String, equal_to: %w(all none metadata), default: 'all'

attribute :info, kind_of: Mixlib::ShellOut, default: nil
attribute :current_props, kind_of: Hash, default: nil
Expand Down