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

Check if nsenter is available and bind mount it on Agent container #4341

Merged
merged 3 commits into from
Sep 17, 2024

Conversation

amogh09
Copy link
Contributor

@amogh09 amogh09 commented Sep 17, 2024

Summary

This PR make ecs-init look for /usr/bin/nsenter on the container instance and creates a bind mount for it on Agent container if found. This tool is used by fault-injection feature.

Testing

Tested with and without /usr/bin/nsenter on the host.

When it was not available then it was not bind mounted on the container and the following warning is seen.

level=warn time=2024-09-17T02:29:06Z msg="nsenter not found at /usr/bin/nsenter, skip binding it to Agent container: stat /usr/bin/nsenter: no such file or directory"

When it was available then it was bind mounted on the Agent container.

New tests cover the changes: yes

Description for the changelog

Check if nsenter is available and bind mount it on Agent container for fault injection.

Additional Information

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

Does this PR include the addition of new environment variables in the README?

Licensing

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

@amogh09 amogh09 marked this pull request as ready for review September 17, 2024 02:32
@amogh09 amogh09 requested a review from a team as a code owner September 17, 2024 02:32
@amogh09 amogh09 merged commit 34ec291 into aws:feature/fis Sep 17, 2024
40 checks passed
mye956 pushed a commit to mye956/amazon-ecs-agent that referenced this pull request Oct 3, 2024
mye956 pushed a commit to mye956/amazon-ecs-agent that referenced this pull request Oct 3, 2024
harishxr pushed a commit to harishxr/amazon-ecs-agent that referenced this pull request Oct 11, 2024
amogh09 added a commit to amogh09/amazon-ecs-agent that referenced this pull request Oct 21, 2024
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.

4 participants