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

Add support for finding EBS devices on Xen instances #3971

Merged
merged 5 commits into from
Oct 20, 2023

Conversation

amogh09
Copy link
Contributor

@amogh09 amogh09 commented Oct 19, 2023

Summary

Add support to EBSDiscoveryClient for discovering EBS devices on Xen instances. An EBS device can appear on a Xen instance with sd or xvd prefix of its name interchanged as compared to its name on the AWS backend. This PR updates the device discovery logic of EBSDiscoveryClient accordingly.

Implementation details

  • A new function matchXenBlockDevice is added that checks if a block device matches a device name on Xen instances as per the matching logic explained in the summary.
  • parseLsblkOutput function is updated with a new hasXenSupport bool parameter. When this parameter is true the function will call matchXenBlockDevice function to match block devices in addition to the regular matching logic.
  • EBSDiscoveryClient is updated with a new hasXenSupport bool field and its constructor function is updated to take any number of options of type EBSDiscoveryClientOption. A new WithXenSupport function is added that returns a EBSDiscoveryClientOption that enables Xen support on an EBSDiscoveryClient.

Testing

New tests cover the changes: yes

Description for the changelog

Add support for finding EBS devices on Xen instances

Does this PR include breaking model changes? If so, Have you added transformation functions?

no

Licensing

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

@amogh09 amogh09 requested a review from a team as a code owner October 19, 2023 17:30
@amogh09 amogh09 changed the title Add support for finding EBS devices on xen instances Add support for finding EBS devices on Xen instances Oct 19, 2023
fierlion
fierlion previously approved these changes Oct 19, 2023
mye956
mye956 previously approved these changes Oct 19, 2023
@amogh09 amogh09 dismissed stale reviews from mye956 and fierlion via 034e758 October 19, 2023 21:09
@amogh09 amogh09 merged commit 3500ac2 into aws:dev Oct 20, 2023
7 checks passed
timj-hh pushed a commit to timj-hh/amazon-ecs-agent that referenced this pull request Oct 23, 2023
singholt added a commit to singholt/amazon-ecs-agent that referenced this pull request Oct 26, 2023
This reverts commit 75db5cb.

2. Revert "update daemon log path host root in container (aws#3982)"

This reverts commit 6166b6e.

3. Revert "Fix loading CSI driver container from state if it exists"

This reverts commit 1391502.

4. Revert "Latest FE model files (aws#3974)"

This reverts commit b589a08.

5. Revert "Move utils function Uint16SliceToStringSlice to shared lib"

This reverts commit 882bcb2.

6. Revert "Move remaining credentials module to shared library"

This reverts commit f58f228.

7. Revert "fix merge import failure (aws#3976)"

This reverts commit 46e21e6.

8. Revert "Fixing task volumes from payload for EBS-backed tasks"

This reverts commit fc97633.

9. Revert "Create Generic Attachment to decouple from ENI and save attachment state. (aws#3969)"

This reverts commit 12e23ed.

10. Revert "Add support for finding EBS devices on Xen instances (aws#3971)"

This reverts commit 3500ac2.

11. Revert "Add network builder and platform APIs (aws#3939)"

This reverts commit b8d2a7f.

12. Revert "Minor refactor of TTL cache (allow nil TTL + get TTL)"

This reverts commit 4b33664.

13. Revert "Move httpclient to ecs-agent/ and minor refactor"

This reverts commit 041ca3f.

14. Revert "Add missing EBSTaskAttach changes from feature branch"

This reverts commit 7a0d116.
singholt added a commit to singholt/amazon-ecs-agent that referenced this pull request Oct 26, 2023
1. Revert "Load Managed Daemon images in background (aws#3984)"

This reverts commit 75db5cb.

2. Revert "update daemon log path host root in container (aws#3982)"

This reverts commit 6166b6e.

3. Revert "Fix loading CSI driver container from state if it exists"

This reverts commit 1391502.

4. Revert "Latest FE model files (aws#3974)"

This reverts commit b589a08.

5. Revert "Move utils function Uint16SliceToStringSlice to shared lib"

This reverts commit 882bcb2.

6. Revert "Move remaining credentials module to shared library"

This reverts commit f58f228.

7. Revert "fix merge import failure (aws#3976)"

This reverts commit 46e21e6.

8. Revert "Fixing task volumes from payload for EBS-backed tasks"

This reverts commit fc97633.

9. Revert "Create Generic Attachment to decouple from ENI and save attachment state. (aws#3969)"

This reverts commit 12e23ed.

10. Revert "Add support for finding EBS devices on Xen instances (aws#3971)"

This reverts commit 3500ac2.

11. Revert "Add network builder and platform APIs (aws#3939)"

This reverts commit b8d2a7f.

12. Revert "Minor refactor of TTL cache (allow nil TTL + get TTL)"

This reverts commit 4b33664.

13. Revert "Move httpclient to ecs-agent/ and minor refactor"

This reverts commit 041ca3f.

14. Revert "Add missing EBSTaskAttach changes from feature branch"

This reverts commit 7a0d116.
singholt added a commit that referenced this pull request Oct 26, 2023
1. Revert "Load Managed Daemon images in background (#3984)"

This reverts commit 75db5cb.

2. Revert "update daemon log path host root in container (#3982)"

This reverts commit 6166b6e.

3. Revert "Fix loading CSI driver container from state if it exists"

This reverts commit 1391502.

4. Revert "Latest FE model files (#3974)"

This reverts commit b589a08.

5. Revert "Move utils function Uint16SliceToStringSlice to shared lib"

This reverts commit 882bcb2.

6. Revert "Move remaining credentials module to shared library"

This reverts commit f58f228.

7. Revert "fix merge import failure (#3976)"

This reverts commit 46e21e6.

8. Revert "Fixing task volumes from payload for EBS-backed tasks"

This reverts commit fc97633.

9. Revert "Create Generic Attachment to decouple from ENI and save attachment state. (#3969)"

This reverts commit 12e23ed.

10. Revert "Add support for finding EBS devices on Xen instances (#3971)"

This reverts commit 3500ac2.

11. Revert "Add network builder and platform APIs (#3939)"

This reverts commit b8d2a7f.

12. Revert "Minor refactor of TTL cache (allow nil TTL + get TTL)"

This reverts commit 4b33664.

13. Revert "Move httpclient to ecs-agent/ and minor refactor"

This reverts commit 041ca3f.

14. Revert "Add missing EBSTaskAttach changes from feature branch"

This reverts commit 7a0d116.
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.

5 participants