[Qa-jenkins-scm] [Git][qa/jenkins.debian.net][master] djm: prevent concurrent remote logfile fetches by using a lockfile
Holger Levsen (@holger)
gitlab at salsa.debian.org
Thu Jun 1 17:49:38 BST 2023
Holger Levsen pushed to branch master at Debian QA / jenkins.debian.net
Commits:
dc3e5808 by Holger Levsen at 2023-06-01T18:49:24+02:00
djm: prevent concurrent remote logfile fetches by using a lockfile
Signed-off-by: Holger Levsen <holger at layer-acht.org>
- - - - -
2 changed files:
- TODO
- bin/djm
Changes:
=====================================
TODO
=====================================
@@ -32,6 +32,8 @@ See link:https://jenkins.debian.net/userContent/about.html["about jenkins.debian
** maybe: rm /tmp/mmdebstrap.* older than 3 days
* split TODO in TODO and TODO.legacy?
* djm:
+** action: rk / remove-oldest-kernel
+** action: sm / shell-monitor
** action: rj / restart-jenkins
** action: mo / mark-offline
** action: so / show-offline
=====================================
bin/djm
=====================================
@@ -264,10 +264,17 @@ djm_fetch() {
#
# parse jenkins build logs and copy the result over
#
- ssh $DJM_USER at jenkins.debian.net "DJM_USER=$DJM_USER /srv/jenkins/bin/djm-jenkins-parser"
- scp $DJM_USER at jenkins.debian.net:$(basename $UI_LOGFILE) $UI_LOGFILE
- scp $DJM_USER at jenkins.debian.net:$(basename $PARSER_LOGFILE) $PARSER_LOGFILE
- ssh $DJM_USER at jenkins.debian.net "cd ~jenkins/jobs ; ls -1d reproducible_* |wc -l" > $JOBS
+ LOCK=${LOCAL_LOGFILE}.lock
+ if [ ! -f ${LOCK} ] ; then
+ touch $LOCK
+ ssh $DJM_USER at jenkins.debian.net "DJM_USER=$DJM_USER /srv/jenkins/bin/djm-jenkins-parser"
+ scp $DJM_USER at jenkins.debian.net:$(basename $UI_LOGFILE) $UI_LOGFILE
+ scp $DJM_USER at jenkins.debian.net:$(basename $PARSER_LOGFILE) $PARSER_LOGFILE
+ ssh $DJM_USER at jenkins.debian.net "cd ~jenkins/jobs ; ls -1d reproducible_* |wc -l" > $JOBS
+ rm $LOCK
+ else
+ echo "Warning: $LOCK exists, not fetching remote log files."
+ fi
}
djm_report() {
View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/-/commit/dc3e580862226c0927cde083b58708915ea9defa
--
View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/-/commit/dc3e580862226c0927cde083b58708915ea9defa
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/20230601/d473b9ae/attachment-0001.htm>
More information about the Qa-jenkins-scm
mailing list