Skip to content

Commit fa68095

Browse files
committed
chore(*): update CoreOS to 402.2.0; Docker to 1.1.2
Note that this release is important because it has several big fixes: * etcd 0.4.6 (with a fix for a major memory leak) * fleet 0.6.2 (with major rewrites for stability) * Docker 1.1.2 (with additional port allocation and container fixes) Because with this Docker release the format of `docker inspect` has changed, we must change the ANNOUNCE_TEMPLATE. We also have to change `fleetctl list-units` in the CoreOS scheduler because we are getting more columns of output now. We also must change the device name on EC2 back to `/dev/sda`. See coreos/scripts#311
1 parent af2484e commit fa68095

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

scheduler/coreos.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ def _wait_for_announcer(self, name, env):
129129
# we bump to 20 minutes here to match the timeout on the router and in the app unit files
130130
for _ in range(1200):
131131
status = subprocess.check_output(
132-
"fleetctl.sh list-units | grep {name}-announce.service | awk '{{print $5}}'".format(**locals()),
132+
"fleetctl.sh list-units --no-legend --fields unit,sub | grep {name}-announce.service | awk '{{print $2}}'".format(**locals()),
133133
shell=True, env=env).strip('\n')
134134
if status == 'running':
135135
break
@@ -237,8 +237,8 @@ def attach(self, name):
237237
238238
[Service]
239239
EnvironmentFile=/etc/environment
240-
ExecStartPre=/bin/sh -c "until docker inspect -f '{{{{range $i, $e := .HostConfig.PortBindings }}}}{{{{$p := index $e 0}}}}{{{{$p.HostPort}}}}{{{{end}}}}' {name} >/dev/null 2>&1; do sleep 2; done; port=$(docker inspect -f '{{{{range $i, $e := .HostConfig.PortBindings }}}}{{{{$p := index $e 0}}}}{{{{$p.HostPort}}}}{{{{end}}}}' {name}); if [[ -z $port ]]; then echo We have no port...; exit 1; fi; echo Waiting for $port/tcp...; until netstat -lnt | grep :$port >/dev/null; do sleep 1; done"
241-
ExecStart=/bin/sh -c "port=$(docker inspect -f '{{{{range $i, $e := .HostConfig.PortBindings }}}}{{{{$p := index $e 0}}}}{{{{$p.HostPort}}}}{{{{end}}}}' {name}); echo Connected to $COREOS_PRIVATE_IPV4:$port/tcp, publishing to etcd...; while netstat -lnt | grep :$port >/dev/null; do etcdctl set /deis/services/{app}/{name} $COREOS_PRIVATE_IPV4:$port --ttl 60 >/dev/null; sleep 45; done"
240+
ExecStartPre=/bin/sh -c "until docker inspect -f '{{{{range $i, $e := .NetworkSettings.Ports }}}}{{{{$p := index $e 0}}}}{{{{$p.HostPort}}}}{{{{end}}}}' {name} >/dev/null 2>&1; do sleep 2; done; port=$(docker inspect -f '{{{{range $i, $e := .NetworkSettings.Ports }}}}{{{{$p := index $e 0}}}}{{{{$p.HostPort}}}}{{{{end}}}}' {name}); if [[ -z $port ]]; then echo We have no port...; exit 1; fi; echo Waiting for $port/tcp...; until netstat -lnt | grep :$port >/dev/null; do sleep 1; done"
241+
ExecStart=/bin/sh -c "port=$(docker inspect -f '{{{{range $i, $e := .NetworkSettings.Ports }}}}{{{{$p := index $e 0}}}}{{{{$p.HostPort}}}}{{{{end}}}}' {name}); echo Connected to $COREOS_PRIVATE_IPV4:$port/tcp, publishing to etcd...; while netstat -lnt | grep :$port >/dev/null; do etcdctl set /deis/services/{app}/{name} $COREOS_PRIVATE_IPV4:$port --ttl 60 >/dev/null; sleep 45; done"
242242
ExecStop=/usr/bin/etcdctl rm --recursive /deis/services/{app}/{name}
243243
TimeoutStartSec=20m
244244

0 commit comments

Comments
 (0)