Skip to content

Commit e7848af

Browse files
authored
Merge pull request #3358 from DataDog/xvello/ecsutil_gateway
fix ecsutil gateway fetching if ecs-agent is using host network
2 parents aebe2ef + d368f71 commit e7848af

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

utils/orchestrator/ecsutil.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ def _get_ecs_address(self):
3838
port = ECS_INTROSPECT_DEFAULT_PORT
3939
if self._is_ecs_agent_local():
4040
ip = "localhost"
41-
elif Platform.is_containerized() and self.docker_gateway:
42-
ip = self.docker_gateway
41+
elif Platform.is_containerized():
42+
ip = self.docker_util.get_gateway()
4343
else:
4444
raise Exception("Unable to determine ecs-agent IP address")
4545

0 commit comments

Comments
 (0)