Skip to content

Commit

Permalink
Merge pull request os-autoinst#5323 from os-autoinst/memory-limits
Browse files Browse the repository at this point in the history
Apply memory limit for openqa-worker services
  • Loading branch information
mergify[bot] authored Oct 11, 2023
2 parents b53571d + 858bf7a commit c52fd98
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ install-generic:
install -d -m 755 "$(DESTDIR)"/usr/lib/systemd/system
install -d -m 755 "$(DESTDIR)"/usr/lib/systemd/system-generators
install -d -m 755 "$(DESTDIR)"/usr/lib/tmpfiles.d
for i in systemd/*.{service,target,timer,path}; do \
for i in systemd/*.{service,slice,target,timer,path}; do \
install -m 644 $$i "$(DESTDIR)"/usr/lib/systemd/system ;\
done
ln -s [email protected] "$(DESTDIR)"/usr/lib/systemd/system/[email protected]
Expand Down
1 change: 1 addition & 0 deletions dist/rpm/openQA.spec
Original file line number Diff line number Diff line change
Expand Up @@ -695,6 +695,7 @@ fi
%dir %{_unitdir}
%{_systemdgeneratordir}
%{_unitdir}/openqa-worker.target
%{_unitdir}/openqa-worker.slice
%{_unitdir}/[email protected]
%{_unitdir}/[email protected]
%{_unitdir}/openqa-worker-cacheservice-minion.service
Expand Down
7 changes: 7 additions & 0 deletions systemd/openqa-worker.slice
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[Unit]
Description=Slice for openqa-worker units

[Slice]
# Apply memory limit to this slice to ensure that memory cannot be exhausted
# exclusively by openqa-worker services.
MemoryMax=90%

0 comments on commit c52fd98

Please sign in to comment.