Fix rexray systemd unit

* remove existing rexray containers in ExecStartPre
* set volume tag to rshared
* fix indentation

Closes-Bug: #1686421
Change-Id: I71ffd708baac0403dae7d8f38a073240c44e0434
(cherry picked from commit ad94578a2f)
This commit is contained in:
Mathieu Velten 2017-05-09 12:14:38 +02:00 committed by M V P Nitesh
parent 21eb5de7b9
commit dacadc2afd
1 changed files with 16 additions and 9 deletions

View File

@ -46,16 +46,23 @@ After=docker.service
[Service]
RemainAfterExit=yes
ExecStartPre=-/usr/bin/docker rm -f rexray
ExecStartPre=-/usr/bin/docker pull openstackmagnum/rexray:alpine
ExecStart=/usr/bin/rm -f /var/run/rexray/rexray.pid && \
/usr/bin/docker run -d --name=rexray --privileged -p 7979:7979 \
-v /run/docker/plugins:/run/docker/plugins \
-v /var/lib/rexray:/var/lib/rexray:z \
-v /var/log/rexray:/var/log/rexray \
-v /var/run/rexray:/var/run/rexray \
-v /dev:/dev \
-v /etc/rexray/config.yml:/etc/rexray/config.yml \
openstackmagnum/rexray:alpine
ExecStartPre=-/usr/bin/rm -f /var/run/rexray/rexray.pid
ExecStart=/usr/bin/docker run -d --name=rexray --privileged \\
--pid host \\
--net host \\
-p 7979:7979 \\
-v /run/docker/plugins:/run/docker/plugins \\
-v /var/lib/rexray:/var/lib/rexray:Z \\
-v /var/lib/libstorage:/var/lib/libstorage:rshared \\
-v /var/log/rexray:/var/log/rexray \\
-v /var/run/rexray:/var/run/rexray \\
-v /var/lib/docker:/var/lib/docker:rshared \\
-v /var/run/docker:/var/run/docker \\
-v /dev:/dev \\
-v /etc/rexray/config.yml:/etc/rexray/config.yml \\
openstackmagnum/rexray:alpine
ExecStop=/usr/bin/docker stop rexray
[Install]