From 6594f79314deb5048dc5e5c16df2c95f6c80171d Mon Sep 17 00:00:00 2001 From: Ryan Anderson Date: Thu, 4 Apr 2024 10:23:41 -0400 Subject: [PATCH] Force update_shared_storages to pass the string `true` for _mount_unmount in the efs resource Updates to a cluster result in boolean values for the iam_authorization and efs_encryption_in_transit variables when the mapping yaml file is loaded. Need to force strings to be consistent with the dna.json pattern. --- CHANGELOG.md | 10 ++++++++++ .../recipes/config/update_shared_storages.rb | 5 +++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7143695585..04a2c43368 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,16 @@ aws-parallelcluster-cookbook CHANGELOG This file is used to list changes made in each version of the AWS ParallelCluster cookbook. +3.10.0 +------ + +**ENHANCEMENTS** + +**CHANGES** + +**BUG FIXES** +- Fixed an issue that prevented cluster updates from including EFS filesystems with encryption in transit. + 3.9.0 ------ diff --git a/cookbooks/aws-parallelcluster-environment/recipes/config/update_shared_storages.rb b/cookbooks/aws-parallelcluster-environment/recipes/config/update_shared_storages.rb index c93393a039..951ebb5377 100644 --- a/cookbooks/aws-parallelcluster-environment/recipes/config/update_shared_storages.rb +++ b/cookbooks/aws-parallelcluster-environment/recipes/config/update_shared_storages.rb @@ -83,8 +83,9 @@ def get_efs(action) next unless not_in_shared_storages_mapping["efs"].nil? || !not_in_shared_storages_mapping["efs"].include?(storage) shared_dir_array.push(storage["mount_dir"]) efs_fs_id_array.push(storage["efs_fs_id"]) - efs_encryption_in_transit_array.push(storage["efs_encryption_in_transit"]) - efs_iam_authorization_array.push(storage["efs_iam_authorization"]) + # The EFS resource expects strings for these attributes, not booleans + efs_encryption_in_transit_array.push(String(storage["efs_encryption_in_transit"])) + efs_iam_authorization_array.push(String(storage["efs_iam_authorization"])) end end [shared_dir_array, efs_fs_id_array, efs_encryption_in_transit_array, efs_iam_authorization_array]