-
Notifications
You must be signed in to change notification settings - Fork 314
Add EFS access point support (aws-parallelcluster#2337) #6359
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1109,6 +1109,7 @@ def _add_efs_storage(self, id: str, shared_efs: SharedEfs): | |
shared_efs.encryption_in_transit | ||
) | ||
self.shared_storage_attributes[SharedStorageType.EFS]["IamAuthorizations"].append(shared_efs.iam_authorization) | ||
self.shared_storage_attributes[SharedStorageType.EFS]["AccesspointIds"].append(shared_efs.accesspoint_id) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Here and in other files, we are assuming that more than one access point can be specified for a given file system (AccesspointsIds rather than AccesspointId). It's true that a file system can support multiple access points (https://docs.aws.amazon.com/efs/latest/ug/efs-access-points.html#efs-access-poiont-create), but the mount action is always done using a single access point (https://docs.aws.amazon.com/efs/latest/ug/mounting-access-points.html). So please, let's assume to specify only one access point on the cluster config. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think this is actually a per filesystem array, similar to the encryption in transit array There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, it's actually an array of all the separate FS in config. I just aligned naming and structure to the other properties which are also named in plural. |
||
|
||
return efs_id | ||
|
||
|
@@ -1288,6 +1289,10 @@ def _add_head_node(self): | |
"efs_iam_authorizations": to_comma_separated_string( | ||
self.shared_storage_attributes[SharedStorageType.EFS]["IamAuthorizations"], use_lower_case=True | ||
), | ||
"efs_accesspoint_ids": to_comma_separated_string( | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This change should be captured in unit test here: https://github.com/aws/aws-parallelcluster/blob/develop/cli/tests/pcluster/templates/test_cluster_stack.py#L901 |
||
self.shared_storage_attributes[SharedStorageType.EFS]["AccesspointIds"], | ||
use_lower_case=True, | ||
), | ||
"fsx_fs_ids": get_shared_storage_ids_by_type(self.shared_storage_infos, SharedStorageType.FSX), | ||
"fsx_mount_names": to_comma_separated_string( | ||
self.shared_storage_attributes[SharedStorageType.FSX]["MountNames"] | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -235,6 +235,10 @@ def _add_login_nodes_pool_launch_template(self): | |
self._shared_storage_attributes[SharedStorageType.EFS]["IamAuthorizations"], | ||
use_lower_case=True, | ||
), | ||
"efs_accesspoint_ids": to_comma_separated_string( | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This change should be captured in unit test here: https://github.com/aws/aws-parallelcluster/blob/develop/cli/tests/pcluster/templates/test_login_nodes_stack.py#L23 |
||
self._shared_storage_attributes[SharedStorageType.EFS]["AccesspointIds"], | ||
use_lower_case=True, | ||
), | ||
"enable_intel_hpc_platform": "true" if self._config.is_intel_hpc_platform_enabled else "false", | ||
"ephemeral_dir": DEFAULT_EPHEMERAL_DIR, | ||
"fsx_fs_ids": get_shared_storage_ids_by_type(self._shared_storage_infos, SharedStorageType.FSX), | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -335,6 +335,10 @@ def _add_compute_resource_launch_template( | |
self._shared_storage_attributes[SharedStorageType.EFS]["IamAuthorizations"], | ||
use_lower_case=True, | ||
), | ||
"efs_accesspoint_ids": to_comma_separated_string( | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This change should be captured in unit test here: https://github.com/aws/aws-parallelcluster/blob/develop/cli/tests/pcluster/templates/test_queues_stack.py#L114 |
||
self._shared_storage_attributes[SharedStorageType.EFS]["AccesspointIds"], | ||
use_lower_case=True, | ||
), | ||
"fsx_fs_ids": get_shared_storage_ids_by_type(self._shared_storage_infos, SharedStorageType.FSX), | ||
"fsx_mount_names": to_comma_separated_string( | ||
self._shared_storage_attributes[SharedStorageType.FSX]["MountNames"] | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,7 +18,7 @@ class EfsMountOptionsValidator(Validator): | |
IAM Authorization requires Encryption in Transit. | ||
""" | ||
|
||
def _validate(self, encryption_in_transit: bool, iam_authorization: bool, name: str): | ||
def _validate(self, encryption_in_transit: bool, iam_authorization: bool, accesspoint_id: str, name: str): | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This change should be captured in unit test here: https://github.com/aws/aws-parallelcluster/blob/develop/cli/tests/pcluster/validators/test_efs_validators.py There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The validator should verify that the provided access point exists |
||
if iam_authorization and not encryption_in_transit: | ||
self._add_failure( | ||
"EFS IAM authorization cannot be enabled when encryption in-transit is disabled. " | ||
|
Uh oh!
There was an error while loading. Please reload this page.