prevent hanging upon service restart

This commit is contained in:
Egon Rijpkema 2017-07-12 11:07:36 +02:00
parent 056b383723
commit 588a32b450

View File

@ -6,11 +6,11 @@ Requires=docker.service
[Service] [Service]
TimeoutStartSec=0 TimeoutStartSec=0
Restart=always Restart=always
ExecStartPre=-/usr/bin/docker stop %n ExecStartPre=-/usr/bin/docker rm -f %n
ExecStartPre=-/usr/bin/docker rm %n
ExecStart=/usr/bin/docker run --name %n \ ExecStart=/usr/bin/docker run --name %n \
--add-host=mariadb:{{ hostvars[groups['databases'][0]]['ansible_default_ipv4']['address'] }} \ --add-host=mariadb:{{ hostvars[groups['databases'][0]]['ansible_default_ipv4']['address'] }} \
--add-host=controller:{{ hostvars[groups['keystone'][0]]['ansible_default_ipv4']['address'] }} \ --add-host=controller:{{ hostvars[groups['keystone'][0]]['ansible_default_ipv4']['address'] }} \
--add-host=keystone:{{ hostvars[groups['keystone'][0]]['ansible_default_ipv4']['address'] }} \
-p 8774:8774 \ -p 8774:8774 \
-p 8778:8778 \ -p 8778:8778 \
hpc/novacontroller /etc/run.sh hpc/novacontroller /etc/run.sh