Skip to content

Commit

Permalink
Export default ENV when PATH is required for command execution
Browse files Browse the repository at this point in the history
mdadm execution during the update was failing with:
No such file or directory - mdadm

### References
* `default_env true` documentation: https://docs.chef.io/resources/execute/#properties
* Related issue: sous-chefs/nfs#106

Signed-off-by: Enrico Usai <[email protected]>
  • Loading branch information
enrico-usai committed Jun 29, 2023
1 parent 9ad85e7 commit 111c2cd
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -112,11 +112,13 @@
# Stop mdadm RAID device
execute "Deactivate array, releasing all resources" do
command "mdadm --stop #{raid_dev}"
default_env true
end

# Remove the Superblocks
execute "Erase the MD superblock from a device" do
command "mdadm --zero-superblock #{devices_list}"
default_env true
end

# Remove RAID from /etc/mdadm.conf
Expand Down

0 comments on commit 111c2cd

Please sign in to comment.