This repository has been archived by the owner on Sep 17, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 42
fix: apply container name to elastic-agent Docker services #1336
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
adam-stokes
approved these changes
Jul 20, 2021
💚 Build Succeeded
Expand to view the summary
Build stats
Test stats 🧪
Trends 🧪💚 Flaky test reportTests succeeded. Expand to view the summary
Test stats 🧪
|
cachedout
approved these changes
Jul 20, 2021
v1v
approved these changes
Jul 20, 2021
mergify bot
pushed a commit
that referenced
this pull request
Jul 20, 2021
* fix: apply container name to elastic-agent Docker services * chore: do not override container name for elastic-agent (cherry picked from commit 787b976) # Conflicts: # cli/config/compose/services/elastic-agent/cloud/docker-compose.yml # cli/config/compose/services/elastic-agent/docker-compose.yml
mergify bot
pushed a commit
that referenced
this pull request
Jul 20, 2021
* fix: apply container name to elastic-agent Docker services * chore: do not override container name for elastic-agent (cherry picked from commit 787b976) # Conflicts: # cli/config/compose/services/elastic-agent/cloud/docker-compose.yml # cli/config/compose/services/elastic-agent/docker-compose.yml
mergify bot
pushed a commit
that referenced
this pull request
Jul 20, 2021
* fix: apply container name to elastic-agent Docker services * chore: do not override container name for elastic-agent (cherry picked from commit 787b976) # Conflicts: # cli/config/compose/services/elastic-agent/cloud/docker-compose.yml # cli/config/compose/services/elastic-agent/docker-compose.yml
mdelapenya
added a commit
that referenced
this pull request
Jul 20, 2021
…er services (#1337) * fix: apply container name to elastic-agent Docker services (#1336) * fix: apply container name to elastic-agent Docker services * chore: do not override container name for elastic-agent (cherry picked from commit 787b976) # Conflicts: # cli/config/compose/services/elastic-agent/cloud/docker-compose.yml # cli/config/compose/services/elastic-agent/docker-compose.yml * fix: resolve conflicts Co-authored-by: Manuel de la Peña <mdelapenya@gmail.com>
mdelapenya
added a commit
that referenced
this pull request
Jul 20, 2021
…ocker services (#1339) * fix: apply container name to elastic-agent Docker services (#1336) * fix: apply container name to elastic-agent Docker services * chore: do not override container name for elastic-agent (cherry picked from commit 787b976) # Conflicts: # cli/config/compose/services/elastic-agent/cloud/docker-compose.yml # cli/config/compose/services/elastic-agent/docker-compose.yml * fix: resolve conflicts Co-authored-by: Manuel de la Peña <mdelapenya@gmail.com>
mdelapenya
added a commit
that referenced
this pull request
Jul 20, 2021
…ocker services (#1338) * fix: apply container name to elastic-agent Docker services (#1336) * fix: apply container name to elastic-agent Docker services * chore: do not override container name for elastic-agent (cherry picked from commit 787b976) # Conflicts: # cli/config/compose/services/elastic-agent/cloud/docker-compose.yml # cli/config/compose/services/elastic-agent/docker-compose.yml * fix: resolve conflicts Co-authored-by: Manuel de la Peña <mdelapenya@gmail.com>
mdelapenya
added a commit
to mdelapenya/e2e-testing
that referenced
this pull request
Jul 27, 2021
* master: chore: read elastic-agent logs using native OS' log manager (elastic#1368) Add kubernetes autodiscover scenario without autodiscover (elastic#1361) fix: expose fleet-server port (elastic#1348) chore: improve the automation for the stack version bump (elastic#1351) bump stack version 8.0.0-a6334483 (elastic#1350) bump stack version 8.0.0-1e9bea0f (elastic#1346) chore(ci): be more specific about the underlying ARM OS (elastic#1341) fix: apply container name to elastic-agent Docker services (elastic#1336)
3 tasks
8 tasks
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
What does this PR do?
This PR avoids overridding the
container_name
of the elastic-agent service in a Docker Compose file, which avoids not needed calculations.Why is it important?
I found an error while running the tests against a local version of the stack, and after debugging, found that if the DEV_MODE is enabled (services are not destroyed) the local Docker daemon is not able to recreate the containers properly.
I've not found an open issue related to this in the Compose repo, but I upgraded my local Docker engine very recently.
I could have downgraded my local version and have tested again, but I consider this change (delegating the container name to Docker) should cover this use case.
On the other hand, when running the tests in DEVELOPER_MODE=true, I noticed Docker is not able to recreate containers properly. To reproduce it:
TAGS="fleet_mode_agent && revoke-token && debian" TIMEOUT_FACTOR=5 LOG_LEVEL=TRACE DEVELOPER_MODE=true ELASTIC_APM_ACTIVE=false make -C e2e/_suites/fleet functional-test
TAGS="fleet_mode_agent && revoke-token && debian" TIMEOUT_FACTOR=5 LOG_LEVEL=TRACE DEVELOPER_MODE=true ELASTIC_APM_ACTIVE=false make -C e2e/_suites/fleet functional-test
Because the services are not stopped, the second execution should fail with:
Checklist
make unit-test
), and they are passing locallymake notice
in the proper directory)Author's Checklist
How to test this PR locally
Important: disable DEVELOPER_MODE!!!
TAGS="fleet_mode_agent && revoke-token" TIMEOUT_FACTOR=5 LOG_LEVEL=TRACE DEVELOPER_MODE=false ELASTIC_APM_ACTIVE=false make -C e2e/_suites/fleet functional-test
Related issues