Add a swap file to build machines 54/71654/1
authorThanh Ha <thanh.ha@linuxfoundation.org>
Fri, 9 Feb 2018 16:10:24 +0000 (11:10 -0500)
committerThanh Ha <thanh.ha@linuxfoundation.org>
Wed, 2 May 2018 04:21:03 +0000 (00:21 -0400)
We have heard this a few times now and again on the TSC mailing list
https://lists.opendaylight.org/pipermail/tsc/2018-February/008824.html

It might be beneficial to have some kind of swap available on the
system. There is a pretty good writeup about swap here:
https://chrisdown.name/2018/01/02/in-defence-of-swap.html

This was originally merged as Ifc9d57045b54e1b4f9943214e418b41fabf49d04
but then reverted to troubleshoot build issues. With CI stable now it is
worth trying again.

Change-Id: I85e491eb8944f3a672a11da9840275beadb104fa
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
jenkins-scripts/jenkins-init-script.sh

index e79228f336442c5164aded132bf7455a0bf7e21b..3309b00ab11322912a3e9d0c924f74ef84091f44 100755 (executable)
@@ -24,3 +24,9 @@ source /tmp/system_type.sh
 
 ## add local environment changes post scripts
 ./jenkins-init-script-local-env.sh
+
+# Create a swap file
+dd if=/dev/zero of=/swap count=1024 bs=1MiB
+chmod 600 /swap
+mkswap /swap
+swapon /swap