init-ceph: pass TCMALLOC_MAX_TOTAL_THREAD_CACHE_BYTES through

..when set in the sysconfig/default file.

Signed-off-by: Sage Weil <sage@redhat.com>
This commit is contained in:
Sage Weil 2016-01-20 18:36:08 -05:00
parent 141888609a
commit 03e01ae263

View File

@ -338,11 +338,13 @@ for name in $what; do
[ -n "$wrap" ] && runmode="-f &" && runarg="-f"
[ -n "$max_open_files" ] && files="ulimit -n $max_open_files;"
[ -n "$TCMALLOC_MAX_TOTAL_THREAD_CACHE_BYTES" ] && tcmalloc="TCMALLOC_MAX_TOTAL_THREAD_CACHE_BYTES=$TCMALLOC_MAX_TOTAL_THREAD_CACHE_BYTES"
if [ -n "$SYSTEMD_RUN" ]; then
time=`date +%s.%N`
cmd="$SYSTEMD_RUN --unit=ceph-$name.$time -r bash -c '$files $cmd --cluster $cluster --setuser ceph --setgroup ceph -f'"
cmd="$SYSTEMD_RUN --unit=ceph-$name.$time -r bash -c '$files $tcmalloc $cmd --cluster $cluster --setuser ceph --setgroup ceph -f'"
else
cmd="$files $wrap $cmd --cluster $cluster --setuser ceph --setgroup ceph $runmode"
cmd="$files $tcmalloc $wrap $cmd --cluster $cluster --setuser ceph --setgroup ceph $runmode"
fi
if [ $dofsmount -eq 1 ] && [ -n "$fs_devs" ]; then