[Piuparts-devel] [Git][debian/piuparts][develop] 2 commits: fixup 71cd6fc8: master-bin/detect_piuparts_issues

Holger Levsen gitlab at salsa.debian.org
Tue Nov 27 19:41:29 GMT 2018


Holger Levsen pushed to branch develop at Debian / piuparts


Commits:
4a28e24e by Holger Levsen at 2018-11-27T19:37:35Z
fixup 71cd6fc8: master-bin/detect_piuparts_issues

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

- - - - -
f1978566 by Holger Levsen at 2018-11-27T19:40:59Z
WIP: reduce number of mails per day, from 24 down to 18, see #912591.

master-bin/detect_network_issues: redirect logs to htdocs/logs to spare us
six mails per day.

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

- - - - -


3 changed files:

- debian/changelog
- master-bin/detect_network_issues.in
- master-bin/detect_piuparts_issues.in


Changes:

=====================================
debian/changelog
=====================================
@@ -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 at debian.org>  Thu, 08 Nov 2018 12:12:21 +0100


=====================================
master-bin/detect_network_issues.in
=====================================
@@ -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


=====================================
master-bin/detect_piuparts_issues.in
=====================================
@@ -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



View it on GitLab: https://salsa.debian.org/debian/piuparts/compare/71cd6fc86fed7227030f472bd66f41711a6c1939...f19785667a276d4d17cfada9ab3c41a28796f879

-- 
View it on GitLab: https://salsa.debian.org/debian/piuparts/compare/71cd6fc86fed7227030f472bd66f41711a6c1939...f19785667a276d4d17cfada9ab3c41a28796f879
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/piuparts-devel/attachments/20181127/238b517b/attachment-0001.html>


More information about the Piuparts-devel mailing list