Skip to content

Commit

Permalink
Add a log message describing the active processes using a mount point…
Browse files Browse the repository at this point in the history
… during unmounting
  • Loading branch information
dreambeyondorange committed May 2, 2024
1 parent 44b2a39 commit 7f87090
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,14 @@
# Path needs to be fully qualified, for example "shared/temp" becomes "/shared/temp"
efs_shared_dir = "/#{efs_shared_dir}" unless efs_shared_dir.start_with?('/')
# Unmount EFS
Chef::Log.info("Unmounting #{efs_shared_dir} with the following")
execute "active processes" do
retries 3
retry_delay 3
timeout 10
live_stream true
command "fuser -mv #{efs_shared_dir}"
end
execute 'unmount efs' do
command "umount -fl #{efs_shared_dir}"
retries 10
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,14 @@
return if on_docker?
new_resource.fsx_fs_id_array.dup.each_with_index do |_fsx_fs_id, index|
fsx = FSx.new(node, new_resource, index)

Chef::Log.info("Unmounting #{fsx.shared_dir} with the following")
execute "active processes" do
retries 3
retry_delay 3
timeout 10
live_stream true
command "fuser -mv #{fsx.shared_dir}"
end
execute "unmount fsx #{fsx.shared_dir}" do
command "umount -fl #{fsx.shared_dir}"
retries 10
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,14 @@

action :unmount do
shared_dir = format_directory(new_resource.shared_dir)

Chef::Log.info("Unmounting #{shared_dir} with the following")
execute "active processes" do
retries 3
retry_delay 3
timeout 10
live_stream true
command "fuser -mv #{shared_dir}"
end
# TODO: can we use mount resource to unmount and disable (see raid)
execute "unmount volume #{shared_dir}" do
command "umount -fl #{shared_dir}"
Expand Down

0 comments on commit 7f87090

Please sign in to comment.