set nofile ulimit in /etc/security/limits.d/ceph only

Specify the nofile ulimit in one standard place, where everyone expects it
to be.  Drop it from the ceph-osd unit file.

Leave upstart and sysvinit untouched for the time being to avoid compat
issues.

Signed-off-by: Sage Weil <sage@redhat.com>
This commit is contained in:
Sage Weil 2015-08-06 11:37:30 -04:00
parent 7c9fdf44f2
commit c7ee798a0f
6 changed files with 13 additions and 1 deletions

View File

@ -10,6 +10,7 @@ EXTRA_DIST += \
src/test/cli \
src/test/downloads \
systemd/ceph.tmpfiles.d \
etc/ceph.limits.d \
udev/50-rbd.rules \
udev/60-ceph-partuuid-workaround.rules \
udev/95-ceph-osd.rules \

View File

@ -577,6 +577,7 @@ find $RPM_BUILD_ROOT -type f -name "*.la" -exec rm -f {} ';'
find $RPM_BUILD_ROOT -type f -name "*.a" -exec rm -f {} ';'
install -D src/rbdmap $RPM_BUILD_ROOT%{_sysconfdir}/ceph/rbdmap
install -D src/init-rbdmap $RPM_BUILD_ROOT%{_initrddir}/rbdmap
install -D ceph.limits.d $RPM_BUILD_ROOT%{_sysconfdir}/security/limits.d/ceph
%if 0%{?_with_systemd}
install -m 0644 -D systemd/ceph.tmpfiles.d $RPM_BUILD_ROOT%{_tmpfilesdir}/%{name}.conf
install -m 0644 -D systemd/ceph-rgw.tmpfiles.d $RPM_BUILD_ROOT%{_tmpfilesdir}/%{name}-rgw.conf

View File

@ -25,5 +25,6 @@ usr/share/ceph/id_dsa_drop.ceph.com
usr/share/ceph/id_dsa_drop.ceph.com.pub
etc/ceph/rbdmap
etc/init.d/rbdmap
etc/security/limits.d/ceph
lib/udev/rules.d/50-rbd.rules
usr/lib/python*/dist-packages/ceph_argparse.py*

1
debian/rules vendored
View File

@ -85,6 +85,7 @@ install: build
install -D -m 644 udev/95-ceph-osd.rules $(DESTDIR)/lib/udev/rules.d/95-ceph-osd.rules
install -D -m 644 src/rbdmap $(DESTDIR)/etc/ceph/rbdmap
install -D -m 755 src/init-rbdmap $(DESTDIR)/etc/init.d/rbdmap
install -D -m 644 etc/ceph.limits.d $(DESTDIR)/etc/security/limits.d/ceph
# Add here commands to install the package into debian/testpack.
# Build architecture-independent files here.

9
etc/ceph.limits.d Normal file
View File

@ -0,0 +1,9 @@
# /etc/security/limits.d/ceph
#
#<domain> <type> <item> <value>
#
# We want a very large value for nofile for the ceph user as the ceph
# clients and daemons consume lots and lots of file descriptors.
ceph - nofile 4194304

View File

@ -9,7 +9,6 @@ EnvironmentFile=-/etc/sysconfig/ceph
Environment=CLUSTER=ceph
ExecStart=/usr/bin/ceph-osd -f --cluster ${CLUSTER} --id %i --setuser ceph --setgroup ceph
ExecStartPre=/usr/libexec/ceph/ceph-osd-prestart.sh --cluster ${CLUSTER} --setuser ceph --setgroup ceph --id %i
LimitNOFILE=131072
ExecReload=/bin/kill -HUP $MAINPID
[Install]