Skip to content
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

FSx: Enable file_system_type_version property for LustreFileSystem construct #31130

Closed
2 tasks
LArkema opened this issue Aug 16, 2024 · 3 comments · Fixed by #31136
Closed
2 tasks

FSx: Enable file_system_type_version property for LustreFileSystem construct #31130

LArkema opened this issue Aug 16, 2024 · 3 comments · Fixed by #31136
Labels
@aws-cdk/aws-fsx Related to Amazon FSx effort/small Small work item – less than a day of effort feature-request A feature should be added or improved. p2

Comments

@LArkema
Copy link

LArkema commented Aug 16, 2024

Describe the feature

When creating a FSx Lustre File System with the fsx.LustreFileSystem() construct, users should be able to specify the File System Version just like they are able to do with the CloudFormation construct (using the file_system_type_version property). Currently, CDK creates a 2.10 File System, which lacks many core FSx features.

At the very least, CDK should create the File System with the latest / recommended version. Per the CloudFormation docs "2.15 is supported by all Lustre deployment types and is recommended for all new file systems." Per the Getting Started docs, "All FSx for Lustre file systems are built on Lustre version 2.15 when created using the Amazon FSx console."

Use Case

When creating a FSx filesystem with CDK, I want to be able to use the latest version of the File System, not be stuck with version 2.10. While I can get around the problem by using the CfnFileSystem Resource, CDK is much preferred.

Proposed Solution

Add a property to the CDK construct that maps to the equivalent property for the CloudFormation 'file_system_type_version' property, and/or update the default Lustre version to 2.15

Other Information

No response

Acknowledgements

  • I may be able to implement this feature request
  • This feature might incur a breaking change

CDK version used

2.152.0

Environment details (OS name and version, etc.)

Various

@LArkema LArkema added feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. labels Aug 16, 2024
@github-actions github-actions bot added the @aws-cdk/aws-fsx Related to Amazon FSx label Aug 16, 2024
@ashishdhingra ashishdhingra self-assigned this Aug 16, 2024
@ashishdhingra ashishdhingra added p2 investigating This issue is being investigated and/or work is in progress to resolve the issue. and removed needs-triage This issue or PR still needs to be triaged. labels Aug 16, 2024
@ashishdhingra
Copy link
Contributor

CfnFileSystem and AWS::FSx::FileSystem appear to support FileSystemTypeVersion, which is not modeled in L2 LustreFileSystem construct.

@LArkema Thanks for opening the issue. Feel free to contribute PR, if possible, that could be reviewed by the team.

@ashishdhingra ashishdhingra added effort/small Small work item – less than a day of effort and removed investigating This issue is being investigated and/or work is in progress to resolve the issue. labels Aug 16, 2024
@ashishdhingra ashishdhingra removed their assignment Aug 16, 2024
@rvencu
Copy link

rvencu commented Oct 10, 2024

this is bad, for instance RHEL 9.x is not compatible with version 2.10

@mergify mergify bot closed this as completed in #31136 Oct 16, 2024
mergify bot pushed a commit that referenced this issue Oct 16, 2024
#31136)

### Issue # (if applicable)

Closes #31130

### Reason for this change

We cannot specify Lustre version for the file system.

### Description of changes

Add `fileSystemTypeVersion` prop to `LustreFileSystemProps`.

There are some restrictions about `fileSystemTypeVersion`. 

- 2.10 is supported by the Scratch and Persistent_1 Lustre deployment types.
- 2.12 is supported by all Lustre deployment types, except for PERSISTENT_2 with a metadata configuration mode.
- 2.15 is supported by all Lustre deployment types and is recommended for all new file systems.

https://docs.aws.amazon.com/ja_jp/AWSCloudFormation/latest/UserGuide/aws-resource-fsx-filesystem.html#cfn-fsx-filesystem-filesystemtypeversion

I've only added validation of V2.10 is supported by the Scratch and Persistent_1 deployment types because `LustreFileSystemProps` does not have metadata configuration props.

```ts
  private validateFiileSystemTypeVersion(deploymentType: LustreDeploymentType, fileSystemTypeVersion?: FileSystemTypeVersion): void {
    if (fileSystemTypeVersion === undefined) {
      return;
    }

    if (fileSystemTypeVersion === FileSystemTypeVersion.V_2_10) {
      if (!deploymentType.startsWith('SCRATCH') && deploymentType !== LustreDeploymentType.PERSISTENT_1) {
        throw new Error('fileSystemTypeVersion V_2_10 is only supported for SCRATCH and PERSISTENT_1 deployment types');
      }
    }
  }
```

### Description of how you validated changes

 Add both unit and integ tests.

### Checklist
- [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md)

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Copy link

Comments on closed issues and PRs are hard for our team to see.
If you need help, please open a new issue that references this one.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 16, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
@aws-cdk/aws-fsx Related to Amazon FSx effort/small Small work item – less than a day of effort feature-request A feature should be added or improved. p2
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants