[Qa-jenkins-scm] [Git][qa/jenkins.debian.net][master] reproducible maintenance: try to unmount mount points before cleaning up old chroots

Holger Levsen gitlab at salsa.debian.org
Tue Jan 21 14:01:12 GMT 2020



Holger Levsen pushed to branch master at Debian QA / jenkins.debian.net


Commits:
9f58a8df by Holger Levsen at 2020-01-21T15:00:45+01:00
reproducible maintenance: try to unmount mount points before cleaning up old chroots

Signed-off-by: Holger Levsen <holger at layer-acht.org>

- - - - -


1 changed file:

- bin/reproducible_maintenance.sh


Changes:

=====================================
bin/reproducible_maintenance.sh
=====================================
@@ -412,6 +412,12 @@ echo "$(date -u) - Removing schroots older than 3 days."
 regex="/schroots/(reproducible-.+-[0-9]{1,5}|schroot-install-.+)"
 OLDSTUFF=$(find /schroots/ -maxdepth 1 -type d -regextype posix-extended -regex "$regex" -mtime +2 -exec ls -lad {} \; || true)
 if [ ! -z "$OLDSTUFF" ] ; then
+	# try to unmount mounts first
+	for MP in $(find /schroots/ -maxdepth 1 -type d -regextype posix-extended -regex "$regex" -mtime +2 ) ; do
+		if [ -d $MP/proc ] ; then
+			sudo umount -l $MP/proc 2>/dev/null
+		fi
+	done
 	echo
 	echo "schroots older than 3 days found in /schroots, which will be deleted:"
 	find /schroots/ -maxdepth 1 -type d -regextype posix-extended -regex "$regex" -mtime +2 -exec sudo rm -rf --one-file-system {} \; || true



View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/commit/9f58a8df769d21182b069308169d27d54e951f52

-- 
View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/commit/9f58a8df769d21182b069308169d27d54e951f52
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/20200121/72db4b11/attachment-0001.html>


More information about the Qa-jenkins-scm mailing list