[Qa-jenkins-scm] [Git][qa/jenkins.debian.net][master] reproducible: expand the check for the wrong future to also detect when we…

Mattia Rizzolo gitlab at salsa.debian.org
Thu May 10 08:36:31 BST 2018


Mattia Rizzolo pushed to branch master at Debian QA / jenkins.debian.net


Commits:
b814ba1b by Mattia Rizzolo at 2018-05-10T09:35:41+02:00
reproducible: expand the check for the wrong future to also detect when we accidentally came back to the present

Signed-off-by: Mattia Rizzolo <mattia at debian.org>

- - - - -


2 changed files:

- bin/reproducible_node_health_check.sh
- logparse/reproducible.rules


Changes:

=====================================
bin/reproducible_node_health_check.sh
=====================================
--- a/bin/reproducible_node_health_check.sh
+++ b/bin/reproducible_node_health_check.sh
@@ -1,7 +1,8 @@
 #!/bin/bash
+# vim: set noexpandtab:
 
 # Copyright 2014-2017 Holger Levsen <holger at layer-acht.org>
-#         © 2015 Mattia Rizzolo <mattia at mapreri.org>
+#         © 2015-2018 Mattia Rizzolo <mattia at mapreri.org>
 # released under the GPLv=2
 
 DEBUG=false
@@ -11,6 +12,9 @@ common_init "$@"
 # common code defining db access
 . /srv/jenkins/bin/reproducible_common.sh
 
+# to have a list of the nodes running in the future
+. /srv/jenkins/bin/jenkins_node_definitions.sh
+
 # some defaults
 DIRTY=false
 REP_RESULTS=/srv/reproducible-results
@@ -100,15 +104,28 @@ fi
 #
 # check for correct future
 #
-# (yes this is hardcoded but meh…)
+# (XXX: yes this is hardcoded but meh…)
 echo "$(date -u) - testing whether the time is right..."
-if [ "$(date +%Y)" = "2020" ] ; then
-	echo "Warning, today is the wrong future: $(date -u)."
-	DIRTY=true
-elif [ "$(date +%Y)" = "2019" ] ; then
-	echo "Good, today is the right future: $(date -u)."
+get_node_ssh_port "$HOSTNAME"
+real_year=2018
+year=$(date +%Y)
+if "$NODE_RUN_IN_THE_FUTURE"; then
+	if [ "$year" -eq "$real_year" ]; then
+		echo "Warning, today we came back to the present: $(date -u)."
+		DIRTY=true
+	elif [ "$year" -eq $(( $real_year + 1 )) ] ; then
+		echo "Good, today is the right future: $(date -u)."
+	else
+		echo "Warning, today is the wrong future: $(date -u)."
+		DIRTY=true
+	fi
 else
-	echo "Cherrish today, $(date -u)."
+	if [ "$year" -eq "$real_year" ]; then
+		echo "This host run in the present as it should: $(date -u)."
+	else
+		echo "Warning, today is the wrong present: $(date -u)."
+		DIRTY=true
+	fi
 fi
 
 #


=====================================
logparse/reproducible.rules
=====================================
--- a/logparse/reproducible.rules
+++ b/logparse/reproducible.rules
@@ -21,7 +21,8 @@ warning /Warning: The following builds have failed due to diffoscope schroot pro
 warning /W: The repository .+ is not signed./
 warning /W: There is no public key available for the following key IDs:.+/
 warning /Warning: /.../shm.+please tell the jenkins admins to fix this./
-warning /Warning, today is the wrong future:.+/
+warning /^Warning, today we came back to the present:/
+warning /^Warning, today is the wrong (present|future):/
 warning /Warning: curl http:..www.debian.org failed, probably the proxy is down for.+/
 warning /Warning, more than one kernel in.+/
 warning /Warning, rise of the jenkins job zombies.+/



View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/commit/b814ba1b7c2554faad11d863c27f275002d0d303

---
View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/commit/b814ba1b7c2554faad11d863c27f275002d0d303
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/20180510/fd129684/attachment-0001.html>


More information about the Qa-jenkins-scm mailing list