]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
mon: fix `ExecStartPre` option in systemd unit file
authorGuillaume Abrioux <gabrioux@redhat.com>
Thu, 6 Sep 2018 12:00:13 +0000 (14:00 +0200)
committerGuillaume Abrioux <gabrioux@redhat.com>
Tue, 11 Sep 2018 08:48:21 +0000 (10:48 +0200)
This command line is not supported.
According to official documentation:

```
Note that shell command lines are not directly supported.
If shell command lines are to be used,
they need to be passed explicitly to a shell implementation of some kind.
```

We must run this using /bin/sh instead.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
roles/ceph-mon/templates/ceph-mon.service.j2

index 157ab7ca032d14d4e9498f2244ca10c07b61084a..5c591b64f5682c6cbb7416e306b19effa4d34753 100644 (file)
@@ -5,7 +5,7 @@ After=docker.service
 [Service]
 EnvironmentFile=-/etc/environment
 ExecStartPre=-/usr/bin/docker rm ceph-mon-%i
-ExecStartPre=$(command -v mkdir) -p /etc/ceph /var/lib/ceph/mon
+ExecStartPre=/bin/sh -c '"$(command -v mkdir)" -p /etc/ceph /var/lib/ceph/mon'
 ExecStart=/usr/bin/docker run --rm --name ceph-mon-%i \
   --memory={{ ceph_mon_docker_memory_limit }} \
 {% if ceph_docker_version.split('.')[0] | version_compare('13', '>=') -%}