icinga2: Add systemd limits.conf on systemd > 228
Also see: * https://github.com/Icinga/icinga2/issues/5611 * https://github.com/Icinga/icinga2/pull/5612
This commit is contained in:
parent
7f39bb5a16
commit
45a20b93cc
|
@ -0,0 +1,9 @@
|
||||||
|
# Icinga 2 sets some default values to extend OS defaults
|
||||||
|
#
|
||||||
|
# Please refer to our troubleshooting documentations for details
|
||||||
|
# and reasons on these values.
|
||||||
|
[Service]
|
||||||
|
TasksMax=infinity
|
||||||
|
|
||||||
|
# May also cause problems, uncomment if you have any
|
||||||
|
#LimitNPROC=62883
|
25
icinga2.spec
25
icinga2.spec
|
@ -40,6 +40,12 @@
|
||||||
%else
|
%else
|
||||||
# fedora and el>=7
|
# fedora and el>=7
|
||||||
%define use_systemd 1
|
%define use_systemd 1
|
||||||
|
%if 0%{?fedora} >= 24
|
||||||
|
# for installing limits.conf on systemd >= 228
|
||||||
|
%define configure_systemd_limits 1
|
||||||
|
%else
|
||||||
|
%define configure_systemd_limits 0
|
||||||
|
%endif
|
||||||
%endif
|
%endif
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
@ -51,6 +57,12 @@
|
||||||
%define apachegroup www
|
%define apachegroup www
|
||||||
%if 0%{?suse_version} >= 1310
|
%if 0%{?suse_version} >= 1310
|
||||||
%define use_systemd 1
|
%define use_systemd 1
|
||||||
|
%if 0%{?suse_version} >= 120200 && 0%{?is_opensuse}
|
||||||
|
# for installing limits.conf on systemd >= 228
|
||||||
|
%define configure_systemd_limits 1
|
||||||
|
%else
|
||||||
|
%define configure_systemd_limits 0
|
||||||
|
%endif
|
||||||
%else
|
%else
|
||||||
%define use_systemd 0
|
%define use_systemd 0
|
||||||
%endif
|
%endif
|
||||||
|
@ -72,9 +84,12 @@ Name: icinga2
|
||||||
Version: 2.7.1
|
Version: 2.7.1
|
||||||
Release: %{revision}%{?dist}
|
Release: %{revision}%{?dist}
|
||||||
License: GPL-2.0+
|
License: GPL-2.0+
|
||||||
|
URL: https://www.icinga.com/
|
||||||
Group: Applications/System
|
Group: Applications/System
|
||||||
Source: https://github.com/Icinga/%{name}/archive/v%{version}.tar.gz
|
Source: https://github.com/Icinga/%{name}/archive/v%{version}.tar.gz
|
||||||
URL: https://www.icinga.com/
|
|
||||||
|
Source1: icinga2.service.limits.conf
|
||||||
|
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
Requires: %{name}-bin = %{version}-%{release}
|
Requires: %{name}-bin = %{version}-%{release}
|
||||||
|
|
||||||
|
@ -399,6 +414,11 @@ install -D -m 0644 etc/icinga/icinga-classic-apache.conf %{buildroot}%{apachecon
|
||||||
# DEPRECATED, disable builds on Amazon
|
# DEPRECATED, disable builds on Amazon
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
# install custom limits.conf for systemd
|
||||||
|
%if 0%{?configure_systemd_limits}
|
||||||
|
install -D -m 0644 etc/initsystem/icinga2.service.limits.conf %{buildroot}%{_userunitdir}/%{name}.service.d/limits.conf
|
||||||
|
%endif
|
||||||
|
|
||||||
# remove features-enabled symlinks
|
# remove features-enabled symlinks
|
||||||
rm -f %{buildroot}/%{_sysconfdir}/%{name}/features-enabled/*.conf
|
rm -f %{buildroot}/%{_sysconfdir}/%{name}/features-enabled/*.conf
|
||||||
|
|
||||||
|
@ -716,6 +736,9 @@ fi
|
||||||
%{_sysconfdir}/bash_completion.d/%{name}
|
%{_sysconfdir}/bash_completion.d/%{name}
|
||||||
%if 0%{?use_systemd}
|
%if 0%{?use_systemd}
|
||||||
%attr(644,root,root) %{_unitdir}/%{name}.service
|
%attr(644,root,root) %{_unitdir}/%{name}.service
|
||||||
|
%if 0%{?configure_systemd_limits}
|
||||||
|
%attr(644,root,root) %{_userunitdir}/%{name}.service.d/limits.conf
|
||||||
|
%endif
|
||||||
%else
|
%else
|
||||||
%attr(755,root,root) %{_sysconfdir}/init.d/%{name}
|
%attr(755,root,root) %{_sysconfdir}/init.d/%{name}
|
||||||
%endif
|
%endif
|
||||||
|
|
Loading…
Reference in New Issue