[Git][qa/jenkins.debian.net][master] reproducible Debian: automatically cleanup failed rb-diffoscope* user...
Holger Levsen (@holger)
gitlab at salsa.debian.org
Wed Apr 10 08:49:47 BST 2024
Holger Levsen pushed to branch master at Debian QA / jenkins.debian.net
Commits:
e829e6e7 by Holger Levsen at 2024-04-10T09:49:32+02:00
reproducible Debian: automatically cleanup failed rb-diffoscope* user services, if there are too many failures
Signed-off-by: Holger Levsen <holger at layer-acht.org>
- - - - -
1 changed file:
- bin/reproducible_node_health_check.sh
Changes:
=====================================
bin/reproducible_node_health_check.sh
=====================================
@@ -206,7 +206,16 @@ if ! systemctl --user is-system-running > /dev/null; then
systemctl --user list-units --state=error,failed | grep " failed " > $SERVICES || true
echo "$(date -u) - problematic services found:"
cat $SERVICES
- echo "Manual cleanup needed."
+ # if there are more than 10 failed user services...
+ if [ $(cat $SERVICES|wc -l) -gt 10 ] ; then
+ # only resetting failed rb-diffoscope*.services
+ for SCOPE in $(grep rb-diffoscope $SERVICES| awk '{ print $2} ') ; do
+ echo "$(date -u) - resetting failed $SCOPE..."
+ sudo systemctl reset-failed $SCOPE
+ done
+ else
+ echo "Manual cleanup needed."
+ fi
DIRTY=true
rm -f $SERVICES
fi
View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/-/commit/e829e6e717bbb403fb7961bad8b95bd38d4802ec
--
View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/-/commit/e829e6e717bbb403fb7961bad8b95bd38d4802ec
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/20240410/f6b9499e/attachment-0001.htm>
More information about the Qa-jenkins-scm
mailing list