From 1c88c444a30570dfeacc03a9424a10b088e7b344 Mon Sep 17 00:00:00 2001 From: Guillaume Abrioux Date: Thu, 6 Sep 2018 14:00:13 +0200 Subject: [PATCH] mon: fix `ExecStartPre` option in systemd unit file 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 --- roles/ceph-mon/templates/ceph-mon.service.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/ceph-mon/templates/ceph-mon.service.j2 b/roles/ceph-mon/templates/ceph-mon.service.j2 index 157ab7ca0..5c591b64f 100644 --- a/roles/ceph-mon/templates/ceph-mon.service.j2 +++ b/roles/ceph-mon/templates/ceph-mon.service.j2 @@ -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', '>=') -%}