Skip to content
Commits on Source (2)
......@@ -2,11 +2,13 @@ piuparts (0.95) UNRELEASED; urgency=medium
* piuparts.py: add /var/lib/debian-security-support/ to self.ignored_files.
(Closes: #749317)
* WIP: reduce number of mails per day, from 34 down to 24, see #912591.
* WIP: reduce number of mails per day, from 34 down to 18, see #912591.
- master-bin/detect_archive_issues: redirect logs to htdocs/logs to spare
us two mails per day.
- master-bin/detect_piuparts_issues: redirect logs to htdocs/logs to spare
us eight mails per day.
- master-bin/detect_network_issues: redirect logs to htdocs/logs to spare
us six mails per day.
- lib/write_log.sh: new helper to publish logs in htdocs/logs.
-- Holger Levsen <holger@debian.org> Thu, 08 Nov 2018 12:12:21 +0100
......
......@@ -18,11 +18,14 @@
. @sharedir@/piuparts/lib/read_config.sh
. @sharedir@/piuparts/lib/write_log.sh
get_config_value MASTER global master-directory
get_config_value SECTIONS global sections
get_config_value HTDOCS global output-directory
STARTDATE=$(date -u +%s)
TEMPORARY_OUTPUT=$(mktemp)
#
# detect network/mirror problems
......@@ -72,18 +75,22 @@ done
if [ -s $FILE ] ; then
FINALDATE=$(date -u +%s)
RUNTIME=$(date -u -d "0 $FINALDATE seconds - $STARTDATE seconds" +%T)
echo "Runtime: $RUNTIME"
echo
echo "Network problems on detected! The following logfiles have been deleted:"
echo
for log in $(sort -u $FILE)
do
echo "$log" | cut -d "/" -f5-
grep -E "$PATTERN" "$log" | perl -e 'print grep !$seen{$_}++, <>;' | head -n 10 | sed "s/^/${tab}/"
rm -f "$log"
done
echo
echo "Those problems were found in failed logs by grep'ing for these patterns:"
echo "$DISPLAY_PATTERN"
(
echo "$(date -u)"
echo "Runtime: $RUNTIME"
echo
echo "Network problems on detected! The following logfiles have been deleted:"
echo
for log in $(sort -u $FILE)
do
echo "$log" | cut -d "/" -f5-
grep -E "$PATTERN" "$log" | perl -e 'print grep !$seen{$_}++, <>;' | head -n 10 | sed "s/^/${tab}/"
rm -f "$log"
done
echo
echo "Those problems were found in failed logs by grep'ing for these patterns:"
echo "$DISPLAY_PATTERN"
) > $TEMPORARY_OUTPUT
publish_logs $TEMPORARY_OUTPUT $HTDOCS network_issues
fi
rm $FILE
......@@ -22,9 +22,10 @@
get_config_value MASTER global master-directory
get_config_value SECTIONS global sections
get_config_value HTDOCS global output-directory
STARTDATE=$(date -u +%s)
TEMPORARY_OUTPUT=`mktemp`
TEMPORARY_OUTPUT=$(mktemp)
#
# detect piuparts problems
......