[Git][qa/jenkins.debian.net][master] reproducible debian: Define a rb.slice to group all relevant services

Mattia Rizzolo (@mattia) gitlab at salsa.debian.org
Sun Mar 10 23:09:25 GMT 2024



Mattia Rizzolo pushed to branch master at Debian QA / jenkins.debian.net


Commits:
ec93ea70 by Mattia Rizzolo at 2024-03-11T00:07:55+01:00
reproducible debian: Define a rb.slice to group all relevant services

move the main build process into a sub-slice rb-build.slice, to
potentially have different limits for that futher down the path

Signed-off-by: Mattia Rizzolo <mattia at debian.org>

- - - - -


4 changed files:

- bin/reproducible_worker.sh
- + jenkins-home/rb.slice
- jenkins-home/reproducible_build at .service
- update_jdn.sh


Changes:

=====================================
bin/reproducible_worker.sh
=====================================
@@ -118,7 +118,7 @@ main_loop() {
 	echo
 	RETCODE=0
 	systemd-run --user --send-sighup --collect --pipe --wait \
-		--slice=rb.slice -u "rb-build-$WORKER_NAME-$BUILD_ID" \
+		--slice=rb-build.slice -u "rb-build-$WORKER_NAME-$BUILD_ID" \
 		-E BUILD_ID -E JOB_NAME -E BUILD_URL \
 		/srv/jenkins/bin/reproducible_build.sh "$NODE1" "$NODE2" \
 		> "$BUILD_BASE/$BUILD_ID/console.log" 2>&1 || RETCODE=$?


=====================================
jenkins-home/rb.slice
=====================================
@@ -0,0 +1,10 @@
+[Unit]
+Description=Slice grouping all Reproducible Builds related services
+Before=slices.target
+
+[Slice]
+MemoryAccounting=true
+IOAccounting=true
+CPUAccounting=true
+MemoryMax=60%
+MemorySwapMax=80%


=====================================
jenkins-home/reproducible_build at .service
=====================================
@@ -1,6 +1,7 @@
 [Unit]
 Description=Build service for reproducible-builds jobs
 ConditionPathExists=!/var/lib/jenkins/NO-RB-BUILDERS-PLEASE
+Slice=rb.slice
 
 [Service]
 # Restart whenever the script exits, without rate limiting:


=====================================
update_jdn.sh
=====================================
@@ -807,6 +807,7 @@ if [ "$HOSTNAME" = "jenkins" ] ; then
 	sudo -u jenkins cp jenkins-home/offline_nodes /var/lib/jenkins/offline_nodes
 	sudo -u jenkins mkdir -p /var/lib/jenkins/.config/systemd/user
 	sudo -u jenkins cp jenkins-home/reproducible_build at .service /var/lib/jenkins/.config/systemd/user/
+	sudo -u jenkins cp jenkins-home/rb.slice /var/lib/jenkins/.config/systemd/user/
 	sudo -u jenkins XDG_RUNTIME_DIR="/run/user/$(id -u jenkins)" systemctl --user daemon-reload
 else
 	sudo cp jenkins-nodes-home/authorized_keys /var/lib/jenkins/.ssh/authorized_keys



View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/-/commit/ec93ea70716f45096ba99e77315bd81799cc8517

-- 
View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/-/commit/ec93ea70716f45096ba99e77315bd81799cc8517
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/qa-jenkins-scm/attachments/20240310/f0f0530f/attachment-0001.htm>


More information about the Qa-jenkins-scm mailing list