[Qa-jenkins-scm] [Git][qa/jenkins.debian.net][master] reproducible node health check: improve handling of system being in "starting" state

Holger Levsen gitlab at salsa.debian.org
Thu Aug 20 11:53:20 BST 2020



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


Commits:
3e9fc335 by Holger Levsen at 2020-08-20T12:53:05+02:00
reproducible node health check: improve handling of system being in "starting" state

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

- - - - -


1 changed file:

- bin/reproducible_node_health_check.sh


Changes:

=====================================
bin/reproducible_node_health_check.sh
=====================================
@@ -170,14 +170,21 @@ if ! systemctl is-system-running > /dev/null; then
 		        sudo systemctl reset-failed $SCOPE
 		fi
 	done
-	rm $SERVICES
 	if ! systemctl is-system-running > /dev/null; then
 		systemctl status|head -5
 		echo "Warning: systemd is reporting errors:"
-		systemctl list-units --state=error,failed
-		echo "Manual cleanup needed. If only old sessions are gone, use 'systemctl reset-failed' to cleanup state. Else probably some services actually need a restart."
+		systemctl list-units --state=error,failed > $SERVICES
+		if [ -z "$(grep '0 loaded units listed' $SERVICES)" ] ; then
+			cat $SERVICES
+		fi
+		systemctl list-jobs > $SERVICES
+		if [ -z "$(grep '0 loaded units listed' $SERVICES)" ] ; then
+			cat $SERVICES
+		fi
+		echo "Manual cleanup needed."
 		DIRTY=true
 	fi
+	rm $SERVICES
 fi
 
 # checks only for the main node



View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/-/commit/3e9fc33552977132c6a5a64ea34c9f1a6be205b3

-- 
View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/-/commit/3e9fc33552977132c6a5a64ea34c9f1a6be205b3
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/20200820/c63c0e25/attachment-0001.html>


More information about the Qa-jenkins-scm mailing list