-
Notifications
You must be signed in to change notification settings - Fork 619
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
Support firelens for bridge mode ServiceConnect task #3693
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sparrc
reviewed
May 16, 2023
sparrc
previously approved these changes
May 16, 2023
yinyic
changed the title
[WIP]Support firelens for bridge mode ServiceConnect task
Support firelens for bridge mode ServiceConnect task
May 16, 2023
yinyic
force-pushed
the
sc-bridge-firelens
branch
from
May 16, 2023 21:44
846a1b5
to
10002ef
Compare
fierlion
reviewed
May 17, 2023
chienhanlin
reviewed
May 17, 2023
yinyic
commented
May 18, 2023
yinyic
force-pushed
the
sc-bridge-firelens
branch
from
May 18, 2023 00:49
f95a0cc
to
9e7dfbe
Compare
fierlion
approved these changes
May 19, 2023
chienhanlin
approved these changes
May 22, 2023
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Currently, if a task is ServiceConnect-enabled, and runs in bridge network mode, then it won't be able to use
awsfirelens
log driver.This PR makes
awsfirelens
compatible with SC-enabled, bridge mode tasks.Implementation details
ECS Agent is responsible for injecting
FLUENT_HOST
environment variable to application containers. The variable contains the IP address assigned to the FireLens container. See public doc. So far, ECS Agent resolves the container IP by directly querying the container network info from docker inspect. This becomes an issue with ServiceConnect bridge mode tasks, because we are launching pause containers for each application container (for network namespace configuration). In that case, the application container will not have the expected network info, as the info is now associated with its pause container.This PR makes changes in two places -
In both cases, we now retrieve the container IP from the FireLens pause container instead, using the readily available
GetBridgeModePauseContainerForTaskContainer
function.Testing
CreateContainer
andStartContainer
for both SC and non-SC bridge mode tasks.awsfirelens
log driver - verified that 1) task is able to run, and 2) application log was successfully delivered to my fluentd destination (an S3 bucket)Description for the changelog
Support firelens for bridge mode ServiceConnect task
Licensing
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.