-
Notifications
You must be signed in to change notification settings - Fork 32
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
Remove EBS Attach for RFS in GovCloud #1216
Remove EBS Attach for RFS in GovCloud #1216
Conversation
Signed-off-by: Andre Kurait <[email protected]>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1216 +/- ##
=========================================
Coverage 80.49% 80.49%
Complexity 3079 3079
=========================================
Files 421 421
Lines 15650 15650
Branches 1057 1057
=========================================
Hits 12598 12598
Misses 2408 2408
Partials 644 644
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One question I'd like to understand, but otherwise LGTM
@@ -61,7 +61,7 @@ export class MigrationServiceCore extends Stack { | |||
props.taskRolePolicies?.forEach(policy => this.serviceTaskRole.addToPolicy(policy)) | |||
|
|||
const serviceTaskDef = new FargateTaskDefinition(this, "ServiceTaskDef", { | |||
ephemeralStorageGiB: props.ephemeralStorageGiB ? props.ephemeralStorageGiB : 75, | |||
ephemeralStorageGiB: Math.max(props.ephemeralStorageGiB ? props.ephemeralStorageGiB : 75, 21), // valid values 21 - 200 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How does this change in behavior affect the user experience? Can you briefly list all the scenarios and the before/after outcome? I ask because I'm not entirely sure it does change things.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This also ensures for RFS GovCloud we don't attempt to set this less than 21GB which will otherwise result in an deployment error
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got it - so we're preventing a deploy time error by overriding a too-small value with the actual minimum. Thanks!
1 | ||
) | ||
|
||
if (volumeSizeGB > 16000) { | ||
if (shardVolumeSizeGiB > (16*1024)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for cleaning up this logic a bit
// ECS EBS attachment is not supported in GovCloud | ||
// https://docs.aws.amazon.com/govcloud-us/latest/UserGuide/govcloud-ecs.html#govcloud-ecs-diffs | ||
// Use Ephemeral Storage instead, adding size for shard | ||
ephemeralStorageGiB = Math.ceil(shardVolumeSizeGiB + systemStorageGiB) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: Lots of math, that logic is easier to test if it was refactored into a stand-alone function(s)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM - Thanks Andre!
Description
We introduced support for larger shards by using ECS EBS Attach on the tasks, this is not supported in govcloud:
This pr introduces a short-term fix (before EKS) to go back to ephemeral storage for GovCloud. This will limit our max shard size back to 80gb.
Issues Resolved
MIGRATIONS-2293
Testing
Added unit tests for govcloud expected behavior
Deployed to govcloud successfully
![image](https://private-user-images.githubusercontent.com/33106608/400100517-8d6f440f-c635-423a-9130-bafdf075ae70.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkzNTA2ODEsIm5iZiI6MTczOTM1MDM4MSwicGF0aCI6Ii8zMzEwNjYwOC80MDAxMDA1MTctOGQ2ZjQ0MGYtYzYzNS00MjNhLTkxMzAtYmFmZGYwNzVhZTcwLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTIlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjEyVDA4NTMwMVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWQ3ZTE4ZDQxNDQ1YTBlZDM0MjM2OWViZWViYjdlNWI4NmEwYzA0MzY4NGU3NzViMTU1Y2U0ZjRmODg0OTJlMTMmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.3R-S2fxFk_q-fXwrEC_Mh3EC4WD9xVBh8G3MEdDZWso)
Verified the error message is appropriate
![image](https://private-user-images.githubusercontent.com/33106608/400100567-cd7628b3-d087-4ead-8b95-5c018150ca9a.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkzNTA2ODEsIm5iZiI6MTczOTM1MDM4MSwicGF0aCI6Ii8zMzEwNjYwOC80MDAxMDA1NjctY2Q3NjI4YjMtZDA4Ny00ZWFkLThiOTUtNWMwMTgxNTBjYTlhLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTIlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjEyVDA4NTMwMVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWZjNzMzMjU1Yjc0NjY3NTZmOGE2NTI3YTI4ZTEwNWY5YmU0Nzc0NzE2NjNlODUzNzhiMWU5YTkyYmNlZDkzYWMmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.0BnMA_7QltHh3aBmACiQscA6gYwu0vuCuHpYkyMD2Jg)
Check List
Documentation PR:
Add supported regions for Migration Assistant documentation-website#9017
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.