Skip to content

Commit

Permalink
Remove dhclient resources
Browse files Browse the repository at this point in the history
Newer ECS agent versions don't rely on the host's dhclient binary, so don't
mount those paths into the container.
  • Loading branch information
Noah Meyerhans committed Sep 12, 2019
1 parent c0bd807 commit 28ebd97
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions integration/systemd/ecs-agent.service
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ After=docker.service
WantedBy=multi-user.target

[Service]
Environment=AGENT_TAG=v1.17.2
Environment=AGENT_TAG=v1.30.0
Type=simple
# Load an updated agent, if it exists:
ExecStartPre=-/bin/sh -c 'test -f /var/cache/ecs/desired-image && docker load $(cat /var/cache/ecs/desired-image) && rm -f $(cat /var/cache/ecs/desired-image) /var/cache/ecs/desired-image'
Expand All @@ -42,21 +42,15 @@ ExecStartPre=/sbin/iptables -t nat -A OUTPUT -d 169.254.170.2/32 \
-p tcp -m tcp --dport 80 -j REDIRECT --to-ports 51679
ExecStartPre=/sbin/sysctl -w net.ipv4.conf.all.route_localnet=1
ExecStartPre=-/usr/bin/docker rm ecs-agent
ExecStartPre=-/bin/mkdir -p /var/lib/ecs/dhclient
ExecStart=/usr/bin/docker run --name ecs-agent \
--init \
--restart=on-failure:10 \
--volume=/var/run:/var/run \
--volume=/var/log/ecs/:/log \
--volume=/var/lib/ecs/data:/data \
--volume=/etc/ecs:/etc/ecs \
--volume=/sbin:/sbin \
--volume=/lib:/lib \
--volume=/lib64:/lib64 \
--volume=/usr/lib:/usr/lib \
--volume=/proc:/host/proc \
--volume=/sys/fs/cgroup:/sys/fs/cgroup \
--volume=/var/lib/ecs/dhclient:/var/lib/dhclient \
--net=host \
--env ECS_LOGFILE=/log/ecs-agent.log \
--env ECS_DATADIR=/data \
Expand Down

0 comments on commit 28ebd97

Please sign in to comment.