Fix the shutdown command for when the builder terminates itself.

This commit is contained in:
Jake Moshenko 2014-12-23 17:08:16 -05:00
parent cece94e1da
commit 1005c29b6b

View file

@ -31,8 +31,8 @@ coreos:
[Service]
TimeoutStartSec=600
TimeoutStopSec=2000
ExecStartPre=/usr/bin/sudo /bin/sh -xc "echo '{{ manager_ip }} buildman.quay.io' >> /etc/hosts; exit 0"
ExecStartPre=/bin/sh -xc "echo '{{ manager_ip }} buildman.quay.io' >> /etc/hosts; exit 0"
ExecStartPre=/usr/bin/docker login -u {{ quay_username }} -p {{ quay_password }} -e unused quay.io
ExecStart=/usr/bin/docker run --rm --net=host --name quay-builder --privileged --env-file /root/overrides.list -v /var/run/docker.sock:/var/run/docker.sock quay.io/coreos/registry-build-worker:latest
ExecStop=/usr/bin/docker stop quay-builder
ExecStopPost=/usr/bin/sudo /bin/sh -xc "/bin/sleep 600; /sbin/shutdown -h now"
ExecStopPost=/bin/sh -xc "/bin/sleep 600; /usr/bin/systemctl --no-block poweroff"