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

MODULES-11423: add zfs attribute defaultuserquota #63

Merged
merged 1 commit into from
Jun 24, 2024

Conversation

eg-roberts
Copy link
Contributor

May we please add the zfs attribute 'defaultuserquota' to the zfs type/provider?

@eg-roberts eg-roberts requested a review from a team as a code owner April 24, 2023 18:41
@CLAassistant
Copy link

CLAassistant commented Apr 24, 2023

CLA assistant check
All committers have signed the CLA.

@puppet-community-rangefinder
Copy link

zfs is a type

Breaking changes to this file MAY impact these 4 modules (near match):

This module is declared in 1 of 580 indexed public Puppetfiles.


These results were generated with Rangefinder, a tool that helps predict the downstream impact of breaking changes to elements used in Puppet modules. You can run this on the command line to get a full report.

Exact matches are those that we can positively identify via namespace and the declaring modules' metadata. Non-namespaced items, such as Puppet 3.x functions, will always be reported as near matches only.

@joshcooper
Copy link
Contributor

@eg-roberts thank you for your contribution! Could you sign the CLA?

Copy link
Contributor

@joshcooper joshcooper left a comment

Choose a reason for hiding this comment

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

Thanks @eg-roberts! This will need a few tweaks to wrap up.

Can you add newproperty(:defaultuserquota) to the zfs type here

newproperty(:dedup) do
desc 'The dedup property. Valid values are `on`, `off`.'
end
newproperty(:devices) do
desc 'The devices property. Valid values are `on`, `off`.'
end

Then use this rake task to autogenerate the reference:

$ bundle install
$ bundle exec rake strings:generate:reference
...

And include the modified REFERENCE.md in your commit.

@joshcooper
Copy link
Contributor

Hi @eg-roberts friendly ping to see if you can update your PR?

@h0tw1r3 h0tw1r3 force-pushed the attribute-defaultuserquota branch from 1bea418 to cb3f040 Compare May 17, 2024 00:03
@h0tw1r3 h0tw1r3 requested a review from joshcooper May 17, 2024 16:20
@mhashizume mhashizume added the enhancement New feature or request label May 17, 2024
@joshcooper
Copy link
Contributor

@h0tw1r3 was the bcrypt native extension issue resolved? Maybe that was in bolt?

@h0tw1r3
Copy link

h0tw1r3 commented Jun 24, 2024

@h0tw1r3 was the bcrypt native extension issue resolved? Maybe that was in bolt?

@joshcooper, yes it was updated in Puppet runtime, puppetlabs/puppet-runtime#854
but still needs including in bolt puppetlabs/bolt#3248

@joshcooper joshcooper closed this Jun 24, 2024
@joshcooper joshcooper reopened this Jun 24, 2024
@joshcooper joshcooper merged commit e16b1c2 into puppetlabs:main Jun 24, 2024
22 of 27 checks passed
@AriaXLi
Copy link
Contributor

AriaXLi commented Jun 25, 2024

Hi again @h0tw1r3 thanks again for contributing! Like relatime, defaultuserquote attribute is causing some errors in CI that lead me to believe this attribute may also only be supported on Linux.

00:28:33   Error: Could not run: Execution of '/usr/sbin/zfs get -H -o value defaultuserquota tstpool/tstfs' returned 2: bad property list: invalid property 'defaultuserquota'
00:28:35   For more info, run: zfs help get

When you can, could you please update this PR too to account for this?
We have some other Linux-only properties that handle this in type (for overlay):

newproperty(:overlay) do
desc 'The overlay property. Valid values are `on`, `off`.'
validate do |_value|
raise Puppet::Error _('This property is only supported on Linux') unless Facter.value(:kernel) == 'Linux'
end
end

Or in provider (for aclmode):

[:aclmode, :acltype, :shareiscsi, :overlay].each do |field|
# The zfs commands use the property value '-' to indicate that the
# property is not set. We make use of this value to indicate that the
# property is not set since it is not available. Conversely, if these
# properties are attempted to be unset, and resulted in an error, our
# best bet is to catch the exception and continue.
define_method(field) do
zfs(:get, '-H', '-o', 'value', field, @resource[:name]).strip
rescue
PARAMETER_UNSET_OR_NOT_AVAILABLE

@h0tw1r3
Copy link

h0tw1r3 commented Jun 27, 2024

@AriaXLi I'm not working at Puppet any longer and this is an internal CI issue. Someone else will need to pick this up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants