Skip to content

Commit a734106

Browse files
thheinenmapk-amazon
authored andcommitted
Rename attribute; Revert logic change on shared dirs
Signed-off-by: Thomas Heinen <[email protected]>
1 parent 212d0df commit a734106

File tree

5 files changed

+12
-11
lines changed

5 files changed

+12
-11
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ This file is used to list changes made in each version of the AWS ParallelCluste
99
**ENHANCEMENTS**
1010
- Allow custom actions on login nodes.
1111
- Allow DCV connection on login nodes.
12+
- Add new attribute `efs_access_point_ids` to specify optional EFS access points for the mounts
1213

1314
**BUG FIXES**
1415
- Fix EFA kmod installation with RHEL 8.10 or newer.

cookbooks/aws-parallelcluster-environment/attributes/environment.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
default['cluster']['efs_fs_ids'] = ''
3838
default['cluster']['efs_encryption_in_transits'] = ''
3939
default['cluster']['efs_iam_authorizations'] = ''
40-
default['cluster']['efs_accesspoint_ids'] = ''
40+
default['cluster']['efs_access_point_ids'] = ''
4141
default['cluster']['fsx_shared_dirs'] = ''
4242
default['cluster']['fsx_fs_ids'] = ''
4343
default['cluster']['fsx_dns_names'] = ''

cookbooks/aws-parallelcluster-environment/recipes/config/efs.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,16 @@
1515
id_array = node['cluster']['efs_fs_ids'].split(',')
1616
encryption_array = node['cluster']['efs_encryption_in_transits'].split(',')
1717
iam_array = node['cluster']['efs_iam_authorizations'].split(',')
18-
accesspoint_id_array = node['cluster']['efs_accesspoint_ids'].split(',')
18+
access_point_id_array = node['cluster']['efs_access_point_ids'].split(',')
1919

2020
# Identify the previously mounted filesystems and remove them from the set of filesystems to mount
2121
shared_dir_array.each_with_index do |dir, index|
22-
next unless node['cluster']['internal_shared_dirs'].include?(dir) || dir == node['cluster']['internal_initial_shared_dir']
22+
next unless node['cluster']['internal_shared_dirs'].include?(dir) || dir == "/home" || dir == "home" || dir == node['cluster']['internal_initial_shared_dir']
2323
shared_dir_array.delete(dir)
2424
id_array.delete_at(index)
2525
encryption_array.delete_at(index)
2626
iam_array.delete_at(index)
27-
accesspoint_id_array.delete_at(index)
27+
access_point_id_array.delete_at(index)
2828
end
2929

3030
# Mount EFS directories with the efs resource
@@ -33,7 +33,7 @@
3333
efs_fs_id_array id_array
3434
efs_encryption_in_transit_array encryption_array
3535
efs_iam_authorization_array iam_array
36-
efs_accesspoint_id_array accesspoint_id_array
36+
efs_access_point_id_array access_point_id_array
3737
action :mount
3838
not_if { shared_dir_array.empty? }
3939
end

cookbooks/aws-parallelcluster-environment/recipes/config/mount_home.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@
7373
efs_fs_id_array [node['cluster']['efs_fs_ids'].split(',')[index]]
7474
efs_encryption_in_transit_array [node['cluster']['efs_encryption_in_transits'].split(',')[index]]
7575
efs_iam_authorization_array [node['cluster']['efs_iam_authorizations'].split(',')[index]]
76-
efs_accesspoint_id [node['cluster']['efs_accesspoint_id'].split(',')[index]]
76+
efs_access_point_id [node['cluster']['efs_access_point_id'].split(',')[index]]
7777
action :mount
7878
end
7979
break

cookbooks/aws-parallelcluster-environment/resources/efs/partial/_mount_umount.rb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
property :efs_fs_id_array, Array, required: %i(mount unmount)
1919
property :efs_encryption_in_transit_array, Array, required: false
2020
property :efs_iam_authorization_array, Array, required: false
21-
property :efs_accesspoint_id_array, Array, required: false
21+
property :efs_access_point_id_array, Array, required: false
2222
# This is the mount point on the EFS itself, as opposed to the local system directory, defaults to "/"
2323
property :efs_mount_point_array, Array, required: false
2424
property :efs_unmount_forced_array, Array, required: false
@@ -29,22 +29,22 @@
2929
efs_fs_id_array = new_resource.efs_fs_id_array.dup
3030
efs_encryption_in_transit_array = new_resource.efs_encryption_in_transit_array.dup
3131
efs_iam_authorization_array = new_resource.efs_iam_authorization_array.dup
32-
efs_accesspoint_id_array = new_resource.efs_accesspoint_id_array.dup
32+
efs_access_point_id_array = new_resource.efs_access_point_id_array.dup
3333
efs_mount_point_array = new_resource.efs_mount_point_array.dup
3434

3535
efs_fs_id_array.each_with_index do |efs_fs_id, index|
3636
efs_shared_dir = efs_shared_dir_array[index]
3737
efs_encryption_in_transit = efs_encryption_in_transit_array[index] unless efs_encryption_in_transit_array.nil?
3838
efs_iam_authorization = efs_iam_authorization_array[index] unless efs_iam_authorization_array.nil?
39-
efs_accesspoint_id = efs_accesspoint_id_array[index] unless efs_accesspoint_id_array.nil?
39+
efs_access_point_id = efs_access_point_id_array[index] unless efs_access_point_id_array.nil?
4040

4141
# Path needs to be fully qualified, for example "shared/temp" becomes "/shared/temp"
4242
efs_shared_dir = "/#{efs_shared_dir}" unless efs_shared_dir.start_with?('/')
4343

4444
# See reference of mount options: https://docs.aws.amazon.com/efs/latest/ug/automount-with-efs-mount-helper.html
4545
mount_options = "_netdev,noresvport"
46-
if efs_accesspoint_id
47-
mount_options = "iam,tls,accesspoint=#{efs_accesspoint_id}"
46+
if efs_access_point_id
47+
mount_options = "iam,tls,access_point=#{efs_access_point_id}"
4848
elsif efs_encryption_in_transit == "true"
4949
mount_options += ",tls"
5050
if efs_iam_authorization == "true"

0 commit comments

Comments
 (0)