Skip to content

Commit 51e70c6

Browse files
DaanHooglanddhslove
authored andcommitted
set ulimit for server according to redhat spec (apache#10040)
1 parent 743fcbf commit 51e70c6

File tree

4 files changed

+46
-0
lines changed

4 files changed

+46
-0
lines changed

packaging/centos7/cloud.spec

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,7 @@ mkdir -p ${RPM_BUILD_ROOT}%{_datadir}/%{name}-management/lib
263263
mkdir -p ${RPM_BUILD_ROOT}%{_datadir}/%{name}-management/setup
264264
mkdir -p ${RPM_BUILD_ROOT}%{_localstatedir}/log/%{name}/management
265265
mkdir -p ${RPM_BUILD_ROOT}%{_sysconfdir}/%{name}/management
266+
mkdir -p ${RPM_BUILD_ROOT}%{_sysconfdir}/systemd/system/%{name}-management.service.d
266267
mkdir -p ${RPM_BUILD_ROOT}%{_localstatedir}/run
267268
mkdir -p ${RPM_BUILD_ROOT}%{_datadir}/%{name}-management/setup/wheel
268269

@@ -311,6 +312,7 @@ install -D utils/target/cloud-utils-%{_maventag}-bundled.jar ${RPM_BUILD_ROOT}%{
311312

312313
install -D packaging/centos7/cloud-ipallocator.rc ${RPM_BUILD_ROOT}%{_initrddir}/%{name}-ipallocator
313314
install -D packaging/centos7/cloud.limits ${RPM_BUILD_ROOT}%{_sysconfdir}/security/limits.d/cloud
315+
install -D packaging/centos7/filelimit.conf ${RPM_BUILD_ROOT}%{_sysconfdir}/systemd/system/%{name}-management.service.d
314316
install -D packaging/systemd/cloudstack-management.service ${RPM_BUILD_ROOT}%{_unitdir}/%{name}-management.service
315317
install -D packaging/systemd/cloudstack-management.default ${RPM_BUILD_ROOT}%{_sysconfdir}/default/%{name}-management
316318
install -D server/target/conf/cloudstack-sudoers ${RPM_BUILD_ROOT}%{_sysconfdir}/sudoers.d/%{name}-management
@@ -595,6 +597,7 @@ pip3 install --upgrade urllib3
595597
%config(noreplace) %{_sysconfdir}/default/%{name}-management
596598
%config(noreplace) %{_sysconfdir}/sudoers.d/%{name}-management
597599
%config(noreplace) %{_sysconfdir}/security/limits.d/cloud
600+
%config(noreplace) %{_sysconfdir}/systemd/system/%{name}-management.service.d
598601
%config(noreplace) %attr(0640,root,cloud) %{_sysconfdir}/%{name}/management/db.properties
599602
%config(noreplace) %attr(0640,root,cloud) %{_sysconfdir}/%{name}/management/server.properties
600603
%config(noreplace) %attr(0640,root,cloud) %{_sysconfdir}/%{name}/management/config.json

packaging/centos7/filelimit.conf

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing,
12+
# software distributed under the License is distributed on an
13+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
# KIND, either express or implied. See the License for the
15+
# specific language governing permissions and limitations
16+
# under the License.
17+
18+
# should go in /etc/systemd/system/cloudstack-management.service.d/
19+
[Service]
20+
LimitNPROC=infinity

packaging/centos8/cloud.spec

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,7 @@ mkdir -p ${RPM_BUILD_ROOT}%{_datadir}/%{name}-management/lib
246246
mkdir -p ${RPM_BUILD_ROOT}%{_datadir}/%{name}-management/setup
247247
mkdir -p ${RPM_BUILD_ROOT}%{_localstatedir}/log/%{name}/management
248248
mkdir -p ${RPM_BUILD_ROOT}%{_sysconfdir}/%{name}/management
249+
mkdir -p ${RPM_BUILD_ROOT}%{_sysconfdir}/systemd/system/%{name}-management.service.d
249250
mkdir -p ${RPM_BUILD_ROOT}%{_localstatedir}/run
250251
mkdir -p ${RPM_BUILD_ROOT}%{_datadir}/%{name}-management/setup/wheel
251252

@@ -298,6 +299,7 @@ install -D utils/target/cloud-utils-%{_maventag}-tests.jar ${RPM_BUILD_ROOT}%{_d
298299

299300
install -D packaging/centos8/cloud-ipallocator.rc ${RPM_BUILD_ROOT}%{_initrddir}/%{name}-ipallocator
300301
install -D packaging/centos8/cloud.limits ${RPM_BUILD_ROOT}%{_sysconfdir}/security/limits.d/cloud
302+
install -D packaging/centos8/filelimit.conf ${RPM_BUILD_ROOT}%{_sysconfdir}/systemd/system/%{name}-management.service.d
301303
install -D packaging/systemd/cloudstack-management.service ${RPM_BUILD_ROOT}%{_unitdir}/%{name}-management.service
302304
install -D packaging/systemd/cloudstack-management.default ${RPM_BUILD_ROOT}%{_sysconfdir}/default/%{name}-management
303305
install -D server/target/conf/cloudstack-sudoers ${RPM_BUILD_ROOT}%{_sysconfdir}/sudoers.d/%{name}-management
@@ -579,6 +581,7 @@ pip3 install --upgrade /usr/share/cloudstack-marvin/Marvin-*.tar.gz
579581
%config(noreplace) %{_sysconfdir}/default/%{name}-management
580582
%config(noreplace) %{_sysconfdir}/sudoers.d/%{name}-management
581583
%config(noreplace) %{_sysconfdir}/security/limits.d/cloud
584+
%config(noreplace) %{_sysconfdir}/systemd/system/%{name}-management.service.d
582585
%config(noreplace) %attr(0640,root,cloud) %{_sysconfdir}/%{name}/management/db.properties
583586
%config(noreplace) %attr(0640,root,cloud) %{_sysconfdir}/%{name}/management/server.properties
584587
%config(noreplace) %attr(0640,root,cloud) %{_sysconfdir}/%{name}/management/config.json

packaging/centos8/filelimit.conf

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing,
12+
# software distributed under the License is distributed on an
13+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
# KIND, either express or implied. See the License for the
15+
# specific language governing permissions and limitations
16+
# under the License.
17+
18+
# should go in /etc/systemd/system/cloudstack-management.service.d/
19+
[Service]
20+
LimitNPROC=infinity

0 commit comments

Comments
 (0)