[Qa-jenkins-scm] [Git][qa/jenkins.debian.net][master] 2 commits: reproducible trbo system health check: improve description

Holger Levsen gitlab at salsa.debian.org
Sun Aug 2 14:53:20 BST 2020



Holger Levsen pushed to branch master at Debian QA / jenkins.debian.net


Commits:
8d8c7832 by Holger Levsen at 2020-08-02T14:40:56+02:00
reproducible trbo system health check: improve description

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

- - - - -
2cbe952e by Holger Levsen at 2020-08-02T15:53:07+02:00
reproducible trbo system health check: query jenkins jobs' config.xml to determine whether a job is disabled (instead of hardcoding this)

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

- - - - -


1 changed file:

- bin/reproducible_system_health.sh


Changes:

=====================================
bin/reproducible_system_health.sh
=====================================
@@ -57,19 +57,19 @@ echo "$(date -u) - starting up."
 cd /var/lib/jenkins/jobs/
 for JOB_NAME in reproducible_* ; do
 	JOB_URL="https://jenkins.debian.net/job/$JOB_NAME"
-	#
-	# ignore jobs running on a known offline node or known bad jobs
-	#
 	REMOTE=false
-	case $JOB_NAME in
-		reproducible_builder_fedora*|reproducible_archlinux_html_pages|reproducible_openwrt_rebuilder_future|reproducible_openwrt_rebuilder_today|reproducible_*alpine*)
+	SUSPECT=false
+	# ignore jobs known bad jobs (from jenkins configuration)
+	if $(grep -q '<disabled>true</disabled>' $JOB_NAME/config.xml) ; then
 			echo "   <li><a href=\"$JOB_URL/\">$JOB_NAME</a></li>" >> ${KNOWN_BAD_JOBS}
 			echo "  ignored job: $JOB_NAME (known to be non-functional)"
 			let INVALID+=1
 			continue
-			;;
+	fi
+	# if a job is running remotely we will need to see if the node is online
+	case $JOB_NAME in
 		reproducible_node_health_check_amd64_jenkins|reproducible_maintenance_amd64_jenkins|reproducible_setup_schroot_*_diffoscope_amd64_jenkins)
-			# never ignore these
+			# local jobs
 			:
 			;;
 		reproducible_setup_schroot_*_diffoscope_amd64_*)
@@ -87,9 +87,12 @@ for JOB_NAME in reproducible_* ; do
 			NODE_ARCH=$(echo $JOB_NAME | cut -d '_' -f3)
 			REMOTE=true
 			;;
+		*)
+			:
+			;;
 	esac
-	SUSPECT=false
 	if $REMOTE ; then
+		# the dns names are dinfferent than the jenkins names...
 		case $NODE_ARCH in
 			amd64)
 				case "$NODE_ALIAS" in
@@ -100,11 +103,11 @@ for JOB_NAME in reproducible_* ; do
 			arm64)	NODE="codethink-sled${NODE_ALIAS#codethink}-arm64.debian.net" ;;
 			armhf)	NODE="${NODE_ALIAS}-armhf-rb.debian.net" ;;
 		esac
+		# ignore jobs on known bad nodes:
 		# check the offline list from git (and the one updated by jenkins)
 		# as this should only ignore nodes humans (and not jenkins) have
 		# acknowledged they are down...
 		# jobs one nodes marked down by jenkins are remarked but still counted
-		SUSPECT=false
 		if grep -q $NODE $JENKINS_OFFLINE_GIT_LIST >/dev/null 2>&1 ; then
 			echo "   <li><a href=\"$JOB_URL/\">$JOB_NAME</a></li>" >> ${IGNORED_JOBS}
 			echo "  ignored job: $JOB_NAME (node is marked offline)"
@@ -286,7 +289,7 @@ conditional_paragraph ${FAILED_JOBS} "Failed jobs" "$(cat ${FAILED_JOBS} | sort
 conditional_paragraph ${UNSTABLE_JOBS} "Unstable jobs" "$(cat ${UNSTABLE_JOBS})"
 conditional_paragraph ${FAILED_SUSPECTS} "Failed jobs on nodes automatically marked down by jenkins" "$(cat ${FAILED_SUSPECTS} | sort -t '|' -n -r | cut -d '|' -f2- | sort)"
 conditional_paragraph ${UNSTABLE_SUSPECTS} "Unstable jobs on nodes automatically marked down by jenkins" "$(cat ${UNSTABLE_SUSPECTS})"
-write2healthfile "<hr><p>A stable jobs adds 3 points to the score, an unstable job adds 1 and a failed job substracts something between 1 and 500 (indicated in brackets after the job name if not equal 1), depending on the importance of the job for the setup. Ignored jobs are not counted at all. Finally the score is divided by three times the number of considered jobs and this gets multiplied with 255 to get a status between 0 and 255.</p><hr>"
+write2healthfile "<hr><p>A stable jobs adds 3 points to the score, an unstable job adds 1 and a failed job substracts something between 1 and 500 (indicated in brackets after the job name if not equal 1), depending on the importance of the job for the setup. Ignored jobs are not counted at all. If the final score is below zero it will be set to zero. Finally status is calculated by diving the score by three times the number of considered jobs and this gets multiplied with 255 to get a status between 0 and 255.</p><hr>"
 conditional_paragraph ${IGNORED_JOBS} "Ignored jobs, because these nodes the are running on are <a href=\"https://salsa.debian.org/qa/jenkins.debian.net/-/blob/master/jenkins-home/offline_nodes\">documented</a> to be offline" "$(cat ${IGNORED_JOBS})"
 conditional_paragraph ${KNOWN_BAD_JOBS} "Ignored jobs, because they are known to be non-funtional" "$(cat ${KNOWN_BAD_JOBS})"
 write2healthfile "<hr><p><small>This page was last updated on $(date -u) by the <a href=\"https://jenkins.debian.net/job/reproducible_system_health/\">reproducible_system_health</a> job.</small></p>"



View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/-/compare/0ade5ebf8bb1120ed8252dd72193be3feeb3f568...2cbe952e9430c653d315b4b0001d848539d06053

-- 
View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/-/compare/0ade5ebf8bb1120ed8252dd72193be3feeb3f568...2cbe952e9430c653d315b4b0001d848539d06053
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/20200802/034a7f3b/attachment-0001.html>


More information about the Qa-jenkins-scm mailing list