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

Fix netns model creation issue #4076

Merged
merged 1 commit into from
Jan 22, 2024
Merged

Fix netns model creation issue #4076

merged 1 commit into from
Jan 22, 2024

Conversation

samjkon
Copy link
Contributor

@samjkon samjkon commented Jan 19, 2024

Summary

Fixes a bug in the creation of network namespace models for AWSVPC mode tasks which causes the agent to crash in an edge case situation.

Implementation details

This change the condition which decides if the task requires a single network namespace or multiple. Previously, presence of ENI names in task payload indicated that the task multiple network namespaces, but we encountered a customer that included ENI names in the run task API for single netns tasks. This change also checks container's interface names to make the decision.

Testing

Manually verified tasks start successful with the fix.
Added tests

New tests cover the changes:
Yes

Description for the changelog

Fixes a bug in the creation of network namespace models for AWSVPC mode tasks which causes the agent to crash in an edge case situation.

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.

An nil pointer exception was noticed when a customer specified multi-ENI
v1 type task but also included ENI names in their run task call. Added a
fix and corresponding unit test for the case.
@samjkon samjkon requested a review from a team as a code owner January 19, 2024 23:57
@samjkon samjkon merged commit f3208a9 into aws:dev Jan 22, 2024
35 of 36 checks passed
@samjkon samjkon deleted the panic-fix branch January 22, 2024 16:27
@chienhanlin chienhanlin mentioned this pull request Jan 31, 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