[Qa-jenkins-scm] [jenkins.debian.net] 01/01: reproducible Debian: add comments, cleanup output.

Holger Levsen holger at layer-acht.org
Tue Jun 13 11:42:06 UTC 2017


This is an automated email from the git hooks/post-receive script.

holger pushed a commit to branch master
in repository jenkins.debian.net.

commit 40ae3a4dc03ed4cc89cdf5ff1ac13b95855ab72a
Author: Holger Levsen <holger at layer-acht.org>
Date:   Tue Jun 13 13:41:46 2017 +0200

    reproducible Debian: add comments, cleanup output.
    
    Signed-off-by: Holger Levsen <holger at layer-acht.org>
---
 bin/reproducible_node_health_check.sh | 26 ++++++++++++++++++++++----
 1 file changed, 22 insertions(+), 4 deletions(-)

diff --git a/bin/reproducible_node_health_check.sh b/bin/reproducible_node_health_check.sh
index 9252644..17accb1 100755
--- a/bin/reproducible_node_health_check.sh
+++ b/bin/reproducible_node_health_check.sh
@@ -11,6 +11,7 @@ common_init "$@"
 # common code defining db access
 . /srv/jenkins/bin/reproducible_common.sh
 
+# some defaults
 DIRTY=false
 REP_RESULTS=/srv/reproducible-results
 
@@ -31,16 +32,24 @@ show_fstab_and_mounts() {
 	DIRTY=true
 }
 
-# for Debian, first run some checks…
+#
+# we fail hard
+#
 set +e
+
+#
 # check for working proxy
+#
 echo "$(date -u) - testing whether the proxy works..."
 curl http://www.debian.org > /dev/null
 if [ $? -ne 0 ] ; then
 	irc_message debian-reproducible "Proxy is down for $HOSTNAME, please tell the jenkins admins to fix this. (sudo service squid3 restart)"
 	exit 1
 fi
+
+#
 # check for /dev/shm being mounted properly
+#
 echo "$(date -u) - testing whether /dev/shm is mounted correctly..."
 mount | egrep -q "^tmpfs on /dev/shm"
 if [ $? -ne 0 ] ; then
@@ -52,7 +61,9 @@ if [ $? -ne 0 ] ; then
 	echo "Warning: /dev/shm is not mounted correctly on $HOSTNAME, it should be mounted with 1777 permissions, please tell the jenkins admins to fix this."
 	show_fstab_and_mounts
 fi
+#
 # check for /run/shm being a link to /dev/shm
+#
 echo "$(date -u) - testing whether /run/shm is a link..."
 if ! test -L /run/shm ; then
 	echo "Warning: /run/shm is not a link on $HOSTNAME, please tell the jenkins admins to fix this."
@@ -61,7 +72,10 @@ elif [ "$(readlink /run/shm)" != "/dev/shm" ] ; then
 	echo "Warning: /run/shm is a link, but not pointing to /dev/shm on $HOSTNAME, please tell the jenkins admins to fix this."
 	show_fstab_and_mounts
 fi
+
+#
 # check for correct MTU
+#
 echo "$(date -u) - testing whether the network interfaces MTU is 1500..."
 if [ "$(ip link | sed -n '/LOOPBACK\|NOARP/!s/.* mtu \([0-9]*\) .*/\1/p' | sort -u)" != "1500" ] ; then
 	ip link
@@ -75,14 +89,18 @@ fi
 # check for correct future
 #
 # (yes this is hardcoded but meh…)
+echo "$(date -u) - testing whether the time is right..."
 if [ "$(date +%Y)" = "2019" ] ; then
-	echo "Warning, today is the wrong future: $(date -u)"
+	echo "Warning, today is the wrong future: $(date -u)."
 elif [ "$(date +%Y)" = "2018" ] ; then
-	echo "Good, today is the right future: $(date -u)"
+	echo "Good, today is the right future: $(date -u)."
 else
-	echo "Cherrish today, $(date -u)"
+	echo "Cherrish today, $(date -u)."
 fi
 
+#
+# finally
+#
 if ! $DIRTY ; then
 	echo "$(date -u ) - Everything seems to be fine."
 	echo

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/qa/jenkins.debian.net.git



More information about the Qa-jenkins-scm mailing list