Don't configure memory swap bytes on cgroups for Trusty

memory.memsw.limit_in_bytes is not supported on Trusty,
setting this raises a 'setting not supported by kernel error'.
Checked with upstream, they confirmed lack of support in several
kernels, so we should skip it.

Change-Id: I511f684776975c3e58f4a341ba2351f8d448f073
This commit is contained in:
Yolanda Robla 2015-08-28 13:54:52 +02:00
parent 74bf1d94fa
commit 897209c899
1 changed files with 4 additions and 0 deletions

View File

@ -54,6 +54,10 @@ group jenkins/children {
<% if (@operatingsystem == "Fedora") and (@operatingsystemrelease == "18") then
# Because of Red Hat bug 918951, swap management doesn't
# work in Fedora 18 but should be fixed in 19. %>
<% elsif (@operatingsystem == "Ubuntu") and (@lsbdistrelease == "14.04") then %>
# memory.memsw.limit_in_bytes is not supported on Trusty, setting this
# raises a 'setting not supported by kernel error'. Checked with upstream,
# they confirmed lack of support in several kernels, so we should skip it.
<% else %>
memory.memsw.limit_in_bytes = <%= (@memorytotalbytes.to_f * 0.9).to_i %>;
<% end %>