Skip to content

Fix network ordering in codedeploy-agent.service#417

Open
bsmojver wants to merge 1 commit intoaws:mainfrom
bsmojver:main
Open

Fix network ordering in codedeploy-agent.service#417
bsmojver wants to merge 1 commit intoaws:mainfrom
bsmojver:main

Conversation

@bsmojver
Copy link

@bsmojver bsmojver commented Mar 5, 2026

Issue #, if available: N/A

Description of changes:

The [Unit] section was missing Wants= and After= for network-online.target and nss-lookup.target, meaning the agent could start before DNS is available. The existing After=network.target in [Service] had no effect as After= is a [Unit] directive and is silently ignored in [Service].

This fixes a boot-time race condition where the agent exits with SocketError on the CodeDeploy commands endpoint before DNS is ready.

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

The [Unit] section was missing Wants= and After= for network-online.target
and nss-lookup.target, meaning the agent could start before DNS is available.
The existing After=network.target in [Service] had no effect as After= is a
[Unit] directive and is silently ignored in [Service].

This fixes a boot-time race condition where the agent exits with SocketError
on the CodeDeploy commands endpoint before DNS is ready.
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.

1 participant