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

feat(fsx): add support for FSx Lustre Persistent_2 deployment type #18626

Merged
merged 6 commits into from
Feb 2, 2022

Conversation

siddharthsalot
Copy link
Contributor

@siddharthsalot siddharthsalot commented Jan 24, 2022

FSx Lustre released support for a new deployment type "Persistent_2" at re:Invent 2021.
It provides long term storage with higher throughput tiers (125, 250, 500, 1000 MiB/s/TiB).
See https://docs.aws.amazon.com/fsx/latest/LustreGuide/using-fsx-lustre.html for more details.
As part of this commit, we want to add support for this new deployment type in LustreDeploymentType enum.
This will allow customers to create FSx Lustre file systems by specifying this new deployment type.


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

AWS FSx Lustre released a new deployment type PERSISTENT_2 during re:Invent 2021.
It is a newer deployment type that provides long term storage with higher throughput tiers (125, 250, 500, 1000).
Data is replicated and file servers are replaced if they fail.
@gitpod-io
Copy link

gitpod-io bot commented Jan 24, 2022

@github-actions github-actions bot added the @aws-cdk/aws-fsx Related to Amazon FSx label Jan 24, 2022
@siddharthsalot siddharthsalot marked this pull request as ready for review January 24, 2022 15:47
Copy link
Contributor

@skinny85 skinny85 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution @siddharthsalot! In general looks good, two tiny comments before we merge this in.

* Newer type of long term storage with higher throughput tiers.
* Data is replicated and file servers are replaced if they fail.
*/
PERSISTENT_2 = 'PERSISTENT_2'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's add a trailing comma here, to avoid the ugly diff that just happened above 🙂.

Suggested change
PERSISTENT_2 = 'PERSISTENT_2'
PERSISTENT_2 = 'PERSISTENT_2',

@skinny85 skinny85 assigned skinny85 and unassigned rix0rrr Jan 24, 2022
@skinny85 skinny85 changed the title feat(aws-fsx): Add support for FSx Lustre Persistent_2 deployment type feat(fsx): add support for FSx Lustre Persistent_2 deployment type Jan 24, 2022
Adds unit test cases for FSx Lustre Persistent_2 deployment type.
@mergify mergify bot dismissed skinny85’s stale review January 25, 2022 14:48

Pull request has been modified.

@siddharthsalot
Copy link
Contributor Author

Unit test results:

sssalot@3c22fb0da50a aws-fsx % yarn test
yarn run v1.22.17
$ cdk-test
PASS test/maintenance-time.test.js
PASS test/lustre-file-system.test.js

=============================== Coverage summary ===============================
Statements   : 100% ( 103/103 )
Branches     : 100% ( 54/54 )
Functions    : 100% ( 16/16 )
Lines        : 100% ( 98/98 )
================================================================================

Test Suites: 2 passed, 2 total
Tests:       63 passed, 63 total
Snapshots:   0 total
Time:        3.169 s, estimated 4 s
Ran all test suites.
Verifying integ.lustre-file-system.js against integ.lustre-file-system.expected.json ... OK.
Tests successful. Total time (4.7s) | /Users/sssalot/Projects/aws-cdk/node_modules/jest/bin/jest.js (3.9s) | cdk-integ-assert (0.8s)
✨  Done in 4.97s.

@skinny85 skinny85 added the pr-linter/exempt-readme The PR linter will not require README changes label Jan 25, 2022
Copy link
Contributor

@skinny85 skinny85 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great @siddharthsalot! A few tiny comments before we merge this in.

if (deploymentType !== LustreDeploymentType.PERSISTENT_1) {
throw new Error('perUnitStorageThroughput can only be set for the PERSISTENT_1 deployment type');
if (deploymentType !== LustreDeploymentType.PERSISTENT_1 && deploymentType !== LustreDeploymentType.PERSISTENT_2) {
throw new Error('perUnitStorageThroughput can only be set for the PERSISTENT_1/PERSISTENT_2 deployment types');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's add what was provided here (this is a good practice with all error messages):

Suggested change
throw new Error('perUnitStorageThroughput can only be set for the PERSISTENT_1/PERSISTENT_2 deployment types');
throw new Error('perUnitStorageThroughput can only be set for the PERSISTENT_1/PERSISTENT_2 deployment types, received: ' + deploymentType);

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed. Updated as part of Revision 4


if (deploymentType === LustreDeploymentType.PERSISTENT_1) {
if (![50, 100, 200].includes(perUnitStorageThroughput)) {
throw new Error('perUnitStorageThroughput must be 50, 100, or 200 MB/s/TiB');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same note here:

Suggested change
throw new Error('perUnitStorageThroughput must be 50, 100, or 200 MB/s/TiB');
throw new Error('perUnitStorageThroughput must be 50, 100, or 200 MB/s/TiB for PERSISTENT_1 deployment type, got: ' + perUnitStorageThroughput);

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed. Updated as part of Revision 4

throw new Error('perUnitStorageThroughput must be 50, 100, or 200 MB/s/TiB');
if (deploymentType === LustreDeploymentType.PERSISTENT_2) {
if (![125, 250, 500, 1000].includes(perUnitStorageThroughput)) {
throw new Error('perUnitStorageThroughput must be 125, 250, 500 or 1000 MB/s/TiB');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here:

Suggested change
throw new Error('perUnitStorageThroughput must be 125, 250, 500 or 1000 MB/s/TiB');
throw new Error('perUnitStorageThroughput must be 125, 250, 500 or 1000 MB/s/TiB for PERSISTENT_2 storage type, got: ' + perUnitStorageThroughput);

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed. Updated as part of Revision 4

Comment on lines 515 to 528
test('setting perUnitStorageThroughput on wrong deploymentType', () => {
lustreConfiguration = {
deploymentType: LustreDeploymentType.SCRATCH_2,
perUnitStorageThroughput: 125,
};

expect(() => {
new LustreFileSystem(stack, 'FsxFileSystem', {
lustreConfiguration,
storageCapacityGiB: storageCapacity,
vpc,
vpcSubnet,
});
}).toThrowError('perUnitStorageThroughput can only be set for the PERSISTENT_1/PERSISTENT_2 deployment types');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have to say, I don't quite understand why this test is here...? It's under a describe('perUnitStorageThroughput_Persistent_2', () => {, but it doesn't use DeploymentTime. PERSISTENT_2 at all?

We have a test above called test('setting perUnitStorageThroughput on wrong deploymentType' which I think covers this already...?

I think we can safely remove this test.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed. Updated as part of Revision 4

Comment on lines 499 to 513
test('invalid perUnitStorageThroughput', () => {
lustreConfiguration = {
deploymentType: LustreDeploymentType.PERSISTENT_2,
perUnitStorageThroughput: 1,
};

expect(() => {
new LustreFileSystem(stack, 'FsxFileSystem', {
lustreConfiguration,
storageCapacityGiB: storageCapacity,
vpc,
vpcSubnet,
});
}).toThrowError('perUnitStorageThroughput must be 125, 250, 500 or 1000 MB/s/TiB');
});
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would probably make this test also parametrized, so that it covers more scenarios than just 1, like the tests for invalid storageCapacity below.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed. Updated as part of Revision 4

@mergify mergify bot dismissed skinny85’s stale review January 27, 2022 19:24

Pull request has been modified.

Copy link
Contributor

@skinny85 skinny85 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome, thanks for the contribution @siddharthsalot!

@mergify
Copy link
Contributor

mergify bot commented Feb 1, 2022

Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@mergify
Copy link
Contributor

mergify bot commented Feb 2, 2022

Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@skinny85 skinny85 enabled auto-merge (squash) February 2, 2022 03:01
@skinny85 skinny85 disabled auto-merge February 2, 2022 03:01
@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildProject89A8053A-LhjRyN9kxr8o
  • Commit ID: adc93ce
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@mergify mergify bot merged commit 6036d99 into aws:master Feb 2, 2022
@mergify
Copy link
Contributor

mergify bot commented Feb 2, 2022

Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

kornicameister added a commit to kornicameister/aws-cdk that referenced this pull request Feb 6, 2022
* origin/master: (27 commits)
  chore(eks): deprecate older versions of EKS (aws#18842)
  fix(tooling): update vscode devcontainer image (aws#18455)
  chore: npm-check-updates && yarn upgrade (aws#18832)
  chore(docs): Fix broken md links (aws#18384)
  chore(lambda-layer-awscli): install awscli with pip and requirements.txt (aws#18800)
  fix(aws-appsync): Strip unsupported characters from Lambda DataSource (aws#18765)
  feat(cfnspec): cloudformation spec v55.0.0 (aws#18827)
  docs(cfnspec): update CloudFormation documentation (aws#18826)
  chore(cxapi): plugin context provider limited by cx schema (aws#18709)
  feat(iotevents): add grant method to Input class (aws#18617)
  chore(cx-api): break circular dependencies (aws#18767)
  docs(core): clarify that `addOverride` does not change property casing (aws#18687)
  feat(s3-deployment): deploy data with deploy-time values (aws#18659)
  docs(cfnspec): update CloudFormation documentation (aws#18808)
  feat(cli): `cdk diff` works for Nested Stacks (aws#18207)
  docs(cfnspec): update CloudFormation documentation (aws#18783)
  chore(lambda-layer-awscli): add update mechanism for AWS CLI (aws#18780)
  chore(release): 1.143.0
  feat(fsx): add support for FSx Lustre Persistent_2 deployment type (aws#18626)
  feat(amplify): support performance mode in Branch (aws#18598)
  ...
TikiTDO pushed a commit to TikiTDO/aws-cdk that referenced this pull request Feb 21, 2022
…ws#18626)

FSx Lustre released support for a new deployment type "Persistent_2" at re:Invent 2021.
It provides long term storage with higher throughput tiers (125, 250, 500, 1000 MiB/s/TiB).
See https://docs.aws.amazon.com/fsx/latest/LustreGuide/using-fsx-lustre.html for more details.
As part of this commit, we want to add support for this new deployment type in LustreDeploymentType enum.
This will allow customers to create FSx Lustre file systems by specifying this new deployment type.

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/aws-fsx Related to Amazon FSx pr-linter/exempt-readme The PR linter will not require README changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants