From 68ff61290a2bab32273272734cc51729ffb2e5df Mon Sep 17 00:00:00 2001 From: Enrico Usai Date: Tue, 27 Jun 2023 07:47:53 +0200 Subject: [PATCH] Export default ENV when PATH is required for command execution 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: https://github.com/sous-chefs/nfs/issues/106 Signed-off-by: Enrico Usai --- .../resources/raid/partial/_raid_common.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cookbooks/aws-parallelcluster-environment/resources/raid/partial/_raid_common.rb b/cookbooks/aws-parallelcluster-environment/resources/raid/partial/_raid_common.rb index 80ed01343..e9d28ab1b 100644 --- a/cookbooks/aws-parallelcluster-environment/resources/raid/partial/_raid_common.rb +++ b/cookbooks/aws-parallelcluster-environment/resources/raid/partial/_raid_common.rb @@ -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