Mike Loseke
07/30/2025, 9:09 PMsce_mass_mount_opts type fail when trying to update any entry in /etc/fstab (RHEL9, stig). The error I'm getting for all of these controls is basically:
Error: Could not set 'present' on ensure: comparison of NilClass with 14 failed (file: /etc/puppetlabs/puppetserver/code/environments/production/modules/sce_linux/manifests/utils/partitions/non_root_local_options.pp, line: 40)
fstab entries look like the below for all mounts:
UUID=0979b5f9-8ca7-49c4-98de-2058d6cd76c1 /tmp xfs defaults 0 0
/dev/mapper/rootvg-auditlv /var/log/audit xfs defaults 0 0Mike Loseke
07/30/2025, 9:11 PMif $nosuid {
sce_mass_mount_opts { 'sce_non_root_local_mount_options_nosuid':
ensure => present,
mount_point => '/',
option => 'nosuid',
inversematch => true,
local_only => true,
}
}Mike Loseke
07/30/2025, 9:13 PMJason St-Cyr
07/31/2025, 12:24 PMThe error "Could not set 'present' on ensure: comparison of NilClass" can occur if the resource being managed has some attribute or value undefined orwhen Puppet tries to execute operations on it.nil
This can happen for example when:
• A required parameter is missing in the resource definition.
• There is an issue or bug in the provider/implementation for the resource, especially if it fails to handle undefined or empty data scenarios correctly.
Here are a few actions to resolve or debug the problem:
1. Check the resource definitions in your Puppet manifests to ensure all required attributes are provided and valid.
2. If custom types or provider code is being used, verify theproperty implementation. The property should correctly handleensure,nil, and other expected states1.absent
3. Use debug or verbose mode to gather additional logs for the Puppet run, which might give more context about what operation failed. You can do this by running thecommand with thepuppet agentand/or--debugflags.--verbose
Mike Loseke
07/31/2025, 2:09 PM