From: 胡玮文 Date: Wed, 7 Apr 2021 13:18:52 +0000 (+0800) Subject: cephadm: cleanup extra slash in runtime dir X-Git-Tag: v17.1.0~2293^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=9a864f086bedb7098060637ffb27ccc5dc92a88b;p=ceph.git cephadm: cleanup extra slash in runtime dir %t already contains a slash, no need to add an extra one Signed-off-by: 胡玮文 --- diff --git a/src/cephadm/cephadm b/src/cephadm/cephadm index c9b7e76804496..9597aec2f756f 100755 --- a/src/cephadm/cephadm +++ b/src/cephadm/cephadm @@ -2978,10 +2978,10 @@ def get_unit_file(ctx, fsid): # type: (CephadmContext, str) -> str extra_args = '' if isinstance(ctx.container_engine, Podman): - extra_args = ('ExecStartPre=-/bin/rm -f /%t/%n-pid /%t/%n-cid\n' - 'ExecStopPost=-/bin/rm -f /%t/%n-pid /%t/%n-cid\n' + extra_args = ('ExecStartPre=-/bin/rm -f %t/%n-pid %t/%n-cid\n' + 'ExecStopPost=-/bin/rm -f %t/%n-pid %t/%n-cid\n' 'Type=forking\n' - 'PIDFile=/%t/%n-pid\n') + 'PIDFile=%t/%n-pid\n') if ctx.container_engine.version >= CGROUPS_SPLIT_PODMAN_VERSION: extra_args += 'Delegate=yes\n'