Skip to content

Commit

Permalink
init-ceph: fix systemd-run cant't start ceph daemon sometimes
Browse files Browse the repository at this point in the history
Fixes: #13474
Signed-off-by: Chuanhong Wang <wang.chuanhong@zte.com.cn>
(cherry picked from commit 2f36909)
  • Loading branch information
wangchaunhong authored and smithfarm committed Dec 7, 2015
1 parent af86215 commit c968a40
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/init-ceph.in
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,8 @@ for name in $what; do
[ -n "$max_open_files" ] && files="ulimit -n $max_open_files;"

if [ -n "$SYSTEMD_RUN" ]; then
cmd="$SYSTEMD_RUN -r bash -c '$files $cmd --cluster $cluster --setuser ceph --setgroup ceph -f'"
time=`date +%s.%N`
cmd="$SYSTEMD_RUN --unit=ceph-$name.$time -r bash -c '$files $cmd --cluster $cluster --setuser ceph --setgroup ceph -f'"
else
cmd="$files $wrap $cmd --cluster $cluster --setuser ceph --setgroup ceph $runmode"
fi
Expand Down

0 comments on commit c968a40

Please sign in to comment.