Skip to content

Commit 1d8fc8c

Browse files
author
Matthew Fisher
committed
fix(controller): remove /run/deis/determine_registry
This script is backwards-incompatible with existing clusters. Moving the calls to etcd directly into the unit file removes the dependency and ultimately makes master backwards-compatible again.
1 parent 509b12e commit 1d8fc8c

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

scheduler/coreos.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -222,9 +222,9 @@ def attach(self, name):
222222
Description={name}
223223
224224
[Service]
225-
ExecStartPre=/bin/sh -c "IMAGE=`/run/deis/bin/determine_registry {image}`; docker pull $IMAGE"
225+
ExecStartPre=/bin/sh -c "IMAGE=$(etcdctl get /deis/registry/host 2>&1):$(etcdctl get /deis/registry/port 2>&1)/{image}; docker pull $IMAGE"
226226
ExecStartPre=/bin/sh -c "docker inspect {name} >/dev/null 2>&1 && docker rm -f {name} || true"
227-
ExecStart=/bin/sh -c "IMAGE=`/run/deis/bin/determine_registry {image}`; port=$(docker inspect -f '{{{{range $k, $v := .ContainerConfig.ExposedPorts }}}}{{{{$k}}}}{{{{end}}}}' $IMAGE | cut -d/ -f1) ; docker run --name {name} -P -e PORT=$port $IMAGE {command}"
227+
ExecStart=/bin/sh -c "IMAGE=$(etcdctl get /deis/registry/host 2>&1):$(etcdctl get /deis/registry/port 2>&1)/{image}; port=$(docker inspect -f '{{{{range $k, $v := .ContainerConfig.ExposedPorts }}}}{{{{$k}}}}{{{{end}}}}' $IMAGE | cut -d/ -f1) ; docker run --name {name} -P -e PORT=$port $IMAGE {command}"
228228
ExecStop=/usr/bin/docker rm -f {name}
229229
TimeoutStartSec=20m
230230
"""

0 commit comments

Comments
 (0)