We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
When using action :mount on mount resource is failing future runs because previous runs have already mounted the drive.
:mount
17.10.3
rhel8
Using something like this:
mount '/my/mount' do device '/dev/my_mount' device_type :device fstype 'xfs' options %w(defaults) dump 1 pass 1 enabled true action [ :mount, :enable ] end
================================================================================ Error executing action `mount` on resource 'mount[/var/lib/containers]' ================================================================================ Mixlib::ShellOut::ShellCommandFailed ------------------------------------ Expected process to exit with [0], but received '32' ---- Begin output of ["mount", "-t", "xfs", "-o", "defaults", "/dev/my_mount", "/var/lib/containers"] ---- STDOUT: STDERR: mount: /var/lib/containers: /dev/mapper/my_mount already mounted on /var/lib/containers. ---- End output of ["mount", "-t", "xfs", "-o", "defaults", "/dev/my_mount", "/var/lib/containers"] ---- Ran ["mount", "-t", "xfs", "-o", "defaults", "/dev/my_mount", "/var/lib/containers"] returned 32 Resource Declaration: --------------------- # In /var/chef/cache/cookbooks/podman/recipes/default.rb 11: mount <obfuscated>[:mount_point] do 12: device <obfuscated>[:device] 13: device_type <obfuscated>[:device_type] 14: fstype <obfuscated>[:fstype] 15: options <obfuscated>[:options] 16: dump <obfuscated>[:dump] 17: pass <obfuscated>[:pass] 18: enabled <obfuscated>[:enabled] 19: action [ :mount, :enable ] 20: only_if { <obfuscated>[:enabled] == true } 21: end 22: Compiled Resource: ------------------ # Declared in /var/chef/cache/cookbooks/podman/recipes/default.rb:11:in `from_file' mount("/var/lib/containers") do action [:mount, :enable] default_guard_interpreter :default declared_type :mount cookbook_name "podman" recipe_name "default" device "/dev/my_mount" device_type :device fstype "xfs" options ["defaults"] dump 1 pass 1 enabled true mount_point "/var/lib/containers" supports {:remount=>false} fsck_device "-" only_if { #code block } end System Info: ------------ chef_version=17.10.3 platform=redhat platform_version=8.8 ruby=ruby 3.0.3p157 (2021-11-24 revision 3fb7d2cadc) [x86_64-linux] program_name=/usr/bin/chef-client executable=/opt/chef/bin/chef-client
See above
The text was updated successfully, but these errors were encountered:
Running in trace I also see that Chef reconizes that its already mounted during some evaulation.
[2023-10-25T11:56:05-04:00] TRACE: Found mount /dev/mapper/my_mount to /var/lib/containers in /etc/fstab
Sorry, something went wrong.
No branches or pull requests
Description
When using action
:mount
on mount resource is failing future runs because previous runs have already mounted the drive.Chef Version
17.10.3
Platform Version
rhel8
Replication Case
Using something like this:
mount '/my/mount' do
device '/dev/my_mount'
device_type :device
fstype 'xfs'
options %w(defaults)
dump 1
pass 1
enabled true
action [ :mount, :enable ]
end
Client Output
Stacktrace
See above
The text was updated successfully, but these errors were encountered: