[Qa-jenkins-scm] [jenkins.debian.net] 01/01: reproducible archlinux: be more patient and use more force to end schroot sessions

Holger Levsen holger at moszumanska.debian.org
Sat Dec 19 11:15:43 UTC 2015


This is an automated email from the git hooks/post-receive script.

holger pushed a commit to branch master
in repository jenkins.debian.net.

commit e6ab9c407874e767fca55c684dab0e69172fd561
Author: Holger Levsen <holger at layer-acht.org>
Date:   Sat Dec 19 12:15:18 2015 +0100

    reproducible archlinux: be more patient and use more force to end schroot sessions
---
 bin/reproducible_build_archlinux_pkg.sh | 28 ++++++++++++++++++++--------
 1 file changed, 20 insertions(+), 8 deletions(-)

diff --git a/bin/reproducible_build_archlinux_pkg.sh b/bin/reproducible_build_archlinux_pkg.sh
index 3cf3eea..d7540df 100755
--- a/bin/reproducible_build_archlinux_pkg.sh
+++ b/bin/reproducible_build_archlinux_pkg.sh
@@ -141,12 +141,18 @@ first_build() {
 	schroot --end-session -c $SESSION | tee -a $LOG
 	PRESULT=${PIPESTATUS[0]}
 	if [ $PRESULT -ne 0 ] ; then
-		echo "$(date -u) - could not end schroot session, maybe some processes are still running? Sleeping 30 seconds and trying again…" | tee -a $LOG
-		sleep 30
-		schroot --end-session -c $SESSION | tee -a $LOG
+		echo "$(date -u) - could not end schroot session, maybe some processes are still running? Sleeping 60 seconds and trying again…" | tee -a $LOG
+		sleep 60
+		schroot --end-session -f -c $SESSION | tee -a $LOG
 		P2RESULT=${PIPESTATUS[0]}
 		if [ $P2RESULT -ne 0 ] ; then
-			exit 23
+			echo "$(date -u) - could not end schroot session even with force. Sleeping 10 seconds and trying once more…" | tee -a $LOG
+			sleep 10
+			schroot --end-session -f -c $SESSION | tee -a $LOG
+			P3RESULT=${PIPESTATUS[0]}
+			if [ $P3RESULT -ne 0 ] ; then
+				exit 23
+			fi
 		fi
 	fi
 	if ! "$DEBUG" ; then set +x ; fi
@@ -185,12 +191,18 @@ second_build() {
 	schroot --end-session -c $SESSION | tee -a $LOG
 	PRESULT=${PIPESTATUS[0]}
 	if [ $PRESULT -ne 0 ] ; then
-		echo "$(date -u) - could not end schroot session, maybe some processes are still running? Sleeping 30 seconds and trying again…" | tee -a $LOG
-		sleep 30
-		schroot --end-session -c $SESSION | tee -a $LOG
+		echo "$(date -u) - could not end schroot session, maybe some processes are still running? Sleeping 60 seconds and trying again…" | tee -a $LOG
+		sleep 60
+		schroot --end-session -f -c $SESSION | tee -a $LOG
 		P2RESULT=${PIPESTATUS[0]}
 		if [ $P2RESULT -ne 0 ] ; then
-			exit 23
+			echo "$(date -u) - could not end schroot session even with force. Sleeping 10 seconds and trying once more…" | tee -a $LOG
+			sleep 10
+			schroot --end-session -f -c $SESSION | tee -a $LOG
+			P3RESULT=${PIPESTATUS[0]}
+			if [ $P3RESULT -ne 0 ] ; then
+				exit 23
+			fi
 		fi
 	fi
 	if ! "$DEBUG" ; then set +x ; fi

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/qa/jenkins.debian.net.git



More information about the Qa-jenkins-scm mailing list