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

Migrate internal storage to EFS from NFS exports #2465

Merged
merged 2 commits into from
Sep 22, 2023

Conversation

dreambeyondorange
Copy link
Contributor

@dreambeyondorange dreambeyondorange commented Sep 19, 2023

Description of changes

[Develop] Migrate internal storage to EFS from NFS exports

  • Add backup and restore recipes to move data in second stage images to shared filesystems
  • Create a new mount_internal_use_fs.rb recipe to mount the internal shared filesystems
  • Filter the efs filesystem arrays to mount internal shared fses in init and cx fses in config
  • Refactor environment recipes to be clearer in functional description and remove unnecessary recipes

Tests

  • Launched a cluster with 2 static nodes and verified the fses were mounted on the head node and compute nodes
  • Head node had all 4 fses
  • Compute node had all except shared_login_dir

Checklist

  • Make sure you are pointing to the right branch.
  • If you're creating a patch for a branch other than develop add the branch name as prefix in the PR title (e.g. [release-3.6]).
  • Check all commits' messages are clear, describing what and why vs how.
  • Make sure to have added unit tests or integration tests to cover the new/modified code.
  • Check if documentation is impacted by this change.

Please review the guidelines for contributing and Pull Request Instructions.

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

@codecov
Copy link

codecov bot commented Sep 19, 2023

Codecov Report

Patch and project coverage have no change.

Comparison is base (47c6354) 76.06% compared to head (2e361ef) 76.06%.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #2465   +/-   ##
========================================
  Coverage    76.06%   76.06%           
========================================
  Files           13       13           
  Lines         1876     1876           
========================================
  Hits          1427     1427           
  Misses         449      449           
Flag Coverage Δ
unittests 76.06% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@dreambeyondorange dreambeyondorange force-pushed the develop branch 5 times, most recently from 0f79ce2 to b2be028 Compare September 19, 2023 21:29
@dreambeyondorange dreambeyondorange force-pushed the develop branch 2 times, most recently from 1364a59 to cffa14f Compare September 20, 2023 17:35
@dreambeyondorange dreambeyondorange marked this pull request as ready for review September 20, 2023 17:41
@dreambeyondorange dreambeyondorange requested review from a team as code owners September 20, 2023 17:41
@dreambeyondorange dreambeyondorange force-pushed the develop branch 5 times, most recently from 28c41d9 to 46b03bd Compare September 21, 2023 02:01
@dreambeyondorange dreambeyondorange enabled auto-merge (squash) September 21, 2023 02:13
@aws aws deleted a comment from dreambeyondorange Sep 21, 2023
@dreambeyondorange dreambeyondorange force-pushed the develop branch 4 times, most recently from 29a478c to 937d422 Compare September 21, 2023 20:11
Add backup and restore recipes to move data in second stage images to shared filesystems
Create a new mount_internal_use_fs.rb recipe to mount the internal shared filesystems
Filter the efs filesystem arrays to mount internal shared fses in init and cx fses in config
Refactor environment recipes to be clearer in functional description and remove unnecessary recipes
internal_efs_fs_id_array.push(efs_fs_id_array[index])
internal_efs_encryption_array.push(efs_encryption_in_transit_array[index])
internal_efs_iam_array.push(efs_iam_authorization_array[index])
end
Copy link
Contributor

Choose a reason for hiding this comment

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

This block of code, from the beginning, it's "duplicated" in the efs.rb.

What about having a first recipe that parses the efs_shared_dirs creating the two internal_*_array vs cx_*_array ?

Then the mount_internal_use_fs.rb will just call the mount of the efs passing internal_*_array and the efs will mount the cx_* ones.

In the code it's enough to have it at the beginning of the init.rb before the mount, In the inspec tests we just need to add it as dependency to be executed as first.

What do you think?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm not sure. I prefer having code here that just filters the ones we need for the init and a separate one that filters what we need for the cx. We do this filtering process twice, so I wonder if it might be better to just put this into the attributes file and then leverage the attributes we need in each recipe. This did get auto merged with Giacomo's approval, but I will do this refactoring as a follow up

# This is necessary to preserve any data in these directories that was
# generated during the build of ParallelCluster AMIs after converting to
# shared storage and backed up to a temporary location previously
# Remove the backup after the copy is done
Copy link
Contributor

Choose a reason for hiding this comment

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

# Remove the backup after the copy is done can be moved in the code block before the rm.

@dreambeyondorange dreambeyondorange merged commit e4bf17b into aws:develop Sep 22, 2023
27 checks passed
dreambeyondorange added a commit to dreambeyondorange/aws-parallelcluster-cookbook that referenced this pull request Sep 22, 2023
…ws#2465)"

This requires a change to the CLI that is pending review
This reverts commit e4bf17b.
dreambeyondorange added a commit that referenced this pull request Sep 22, 2023
…2465)" (#2469)

This requires a change to the CLI that is pending review
This reverts commit e4bf17b.
dreambeyondorange added a commit to dreambeyondorange/aws-parallelcluster-cookbook that referenced this pull request Sep 25, 2023
Add backup and restore recipes to move data in second stage images to shared filesystems
Create a new mount_internal_use_fs.rb recipe to mount the internal shared filesystems
Filter the efs filesystem arrays to mount internal shared fses in init and cx fses in config
Refactor environment recipes to be clearer in functional description and remove unnecessary recipes
hgreebe pushed a commit to hgreebe/aws-parallelcluster-cookbook that referenced this pull request Nov 13, 2023
Add backup and restore recipes to move data in second stage images to shared filesystems
Create a new mount_internal_use_fs.rb recipe to mount the internal shared filesystems
Filter the efs filesystem arrays to mount internal shared fses in init and cx fses in config
Refactor environment recipes to be clearer in functional description and remove unnecessary recipes
hgreebe pushed a commit to hgreebe/aws-parallelcluster-cookbook that referenced this pull request Nov 13, 2023
…ws#2465)" (aws#2469)

This requires a change to the CLI that is pending review
This reverts commit e4bf17b.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants