[Qa-jenkins-scm] [Git][qa/jenkins.debian.net][master] djm: add support for marking nodes as online again

Holger Levsen (@holger) gitlab at salsa.debian.org
Mon Apr 10 11:16:52 BST 2023



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


Commits:
762ff4f1 by Holger Levsen at 2023-04-10T12:16:42+02:00
djm: add support for marking nodes as online again

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

- - - - -


1 changed file:

- bin/djm


Changes:

=====================================
bin/djm
=====================================
@@ -45,6 +45,7 @@ case $ACTION in
 	a|autoremove)	ACTION=autoremove ;;
 	s|shell)	ACTION=shell ;;
 	j|jenkins-ui)	ACTION=jenkins-ui ;;
+	b|bring-back)	ACTION=bring-back ;;
 	*)		FAIL_REASON="${FAIL_REASON}Undefined action.\n"
 			;;
 esac
@@ -87,7 +88,8 @@ if [ -n "$FAIL_REASON" ] ; then
 	echo
 	echo "TARGET=\$1	'all' or grepable (jenkins, amd64, ionos, osuosl3) from ./nodes/list_nodes"
 	echo "          	or special target '.'"
-	echo "ACTION=\$2	r_eboot, _p_owercycle, _a_utoremove, _s_shell (for manual maintenance); _j_enkins-ui"
+	echo "ACTION=\$2	r_eboot, _p_owercycle, _a_utoremove, _s_shell (for manual maintenance),"
+	echo "          	_j_enkins-ui or _b_ring-back"
 	echo "REASON=\$3	ku=kernel update, np=no pings, dj=debug job problems, rm=regular maintenance,"
 	echo "          	cs=clock skew, hb=host back, ho=host overloaded"
 	# TODO
@@ -219,6 +221,10 @@ EOF
 			;;
 		jenkins-ui)	echo "Documenting one manual action in the jenkins-ui."
 				;;
+		bring-back)	TMPFILE=$(mktemp -u)
+				echo "Trying to mark $SHORTNODE as online. This is the diff for ~jenkins/offline_nodes on jenkins.debian.net:"
+				ssh jenkins.debian.net "grep -v $SHORTNODE ~jenkins/offline_nodes > $TMPFILE ; diff ~jenkins/offline_nodes $TMPFILE ; mv $TMPFILE ~jenkins/offline_nodes"
+				;;
 		*)	echo unsupported action, sorry, please improve.
 			exit 1
 			;;



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

-- 
View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/-/commit/762ff4f108741b19f465d10c0e8bbebac1854814
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/20230410/25e46754/attachment-0001.htm>


More information about the Qa-jenkins-scm mailing list