(MODULES-11788) Pass converted boolean parameter#379
Merged
amitkarsale merged 3 commits intomainfrom Apr 29, 2026
Merged
Conversation
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Previously, we converted true/false to yes/no, but passed the original value to
the crfs command, resulting in
crfs: 0507-587 Invalid value for isnapshot option specified, true.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
joshcooper
commented
Apr 28, 2026
| it 'converts :true attribute values to "yes"' do | ||
| # large_files has no entry in attribute_flag's rename map (only large_file does), | ||
| # so the attribute name passes through as-is: "-a large_files=yes" | ||
| resource[:large_files] = :true |
Contributor
Author
There was a problem hiding this comment.
There are multiple bugs with large_files unrelated to this PR:
- It should pass
bfnotlarge_files. Thecrfscommand ignores the unknownlarge_filesoption. - The
bfparameter accepts true/false, not yes/no
# crfs -a bf=yes -a size=32M -v jfs -m /mnt/test -g rootvg -A no
crfs: 0506-974 Please specify one of the following values for the -a bf option: true, false.
- The
bfparametr is not supported in JFS2 (because large files are already enabled)
# crfs -a bf=yes -a size=32M -v jfs2 -m /mnt/test -g rootvg -A no
crfs: 0506-940 JFS2 does not support attribute bf.
Since large_files is not an option in modern JFS2 and is a special case when it comes to parsing boolean values, I left it as-is.
cthorn42
approved these changes
Apr 29, 2026
Collaborator
cthorn42
left a comment
There was a problem hiding this comment.
Looks good to me, validated the bug with this manifest and then applied this fix and it is now compiling:
filesystem { '/mnt/test':
ensure => present,
fs_type => 'jfs2',
volume_group => 'rootvg',
size => '32M',
isnapshot => false,
atboot => false,
}
/opt/puppetlabs/puppet/bin/puppet apply bah.pp
Notice: Compiled catalog for aix73-1-pix.delivery.puppetlabs.net in environment production in 0.10 seconds
Error: Execution of '/usr/sbin/crfs -a size=32M -a isnapshot=false -v jfs2 -m /mnt/test -g rootvg -A no' returned 1: crfs: 0507-587 Invalid value for isnapshot option specified, false.
Valid values for the isnapshot option: yes, no
Error: /Stage[main]/Main/Filesystem[/mnt/test]/ensure: change from 'absent' to 'present' failed: Execution of '/usr/sbin/crfs -a size=32M -a isnapshot=false -v jfs2 -m /mnt/test -g rootvg -A no' returned 1: crfs: 0507-587 Invalid value for isnapshot option specified, false.
Valid values for the isnapshot option: yes, no
/opt/puppetlabs/puppet/bin/puppet apply bah.pp
Notice: Compiled catalog for aix73-1-pix.delivery.puppetlabs.net in environment production in 0.09 seconds
Notice: /Stage[main]/Main/Filesystem[/mnt/test]/ensure: created
Notice: Applied catalog in 1.33 seconds
amitkarsale
approved these changes
Apr 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Previously, we converted true/false to yes/no, but passed the original value to
the crfs command, resulting in
Adds missing tests and CLAUDE.md
Checklist
puppet apply)Before
After
Also