]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
set nofile ulimit in /etc/security/limits.d/ceph only
authorSage Weil <sage@redhat.com>
Thu, 6 Aug 2015 15:37:30 +0000 (11:37 -0400)
committerSage Weil <sage@redhat.com>
Thu, 27 Aug 2015 00:34:15 +0000 (20:34 -0400)
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>
Makefile.am
ceph.spec.in
debian/ceph-common.install
debian/rules
etc/ceph.limits.d [new file with mode: 0644]
systemd/ceph-osd@.service.in

index d6f7bbdf19edf48b001890dc3a98f879d4ad682d..fcf40707d45c3a2b61d37f606d9af4b6187c8e4a 100644 (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 \
index 7b0fc3bdf0ccc86967a5c5103b7d6c7cf2a8eb52..bc0e981c0b5bcfd42f9a2091fd2f711fa9f27707 100644 (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
index 4e21adff9c47439dd7b177892b4603f0b1e8489b..1fa4c1309f0869bc6e52dcf661051c207d133b0d 100644 (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*
index bb0aeaf3da18ee592f04d047511ec08af19f419e..5521d05bb2fd4ea9ace09bfb3ae8cfc8402419df 100755 (executable)
@@ -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.
diff --git a/etc/ceph.limits.d b/etc/ceph.limits.d
new file mode 100644 (file)
index 0000000..702aa03
--- /dev/null
@@ -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
index 69ab8c358a5acec343a3faefd6e2b9675f39a508..5c7f77c7fe721e080e83716ec79c6c13a7a71f82 100644 (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]