[Qa-jenkins-scm] [Git][qa/jenkins.debian.net][master] also save here a copy of the remove script run on the codethink jumpserver

Mattia Rizzolo gitlab at salsa.debian.org
Fri Jun 26 18:56:28 BST 2020



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


Commits:
82da22af by Mattia Rizzolo at 2020-06-26T19:56:20+02:00
also save here a copy of the remove script run on the codethink jumpserver

and fix a few shellcheck warnings

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

- - - - -


1 changed file:

- bin/powercycle_arm64_nodes.sh


Changes:

=====================================
bin/powercycle_arm64_nodes.sh
=====================================
@@ -2,10 +2,11 @@
 # vim: set noexpandtab:
 
 # Copyright 2019 Holger Levsen <holger at layer-acht.org>
+#           2020 Mattia Rizzolo <mattia at debian.org>
 # released under the GPLv2
 
 # validate input
-for i in $@ ; do
+for i in "$@" ; do
 	case $i in
 		9|10|11|12|13|14|15|16)	: ;;
 		*) 	echo 'invalid parameter.'
@@ -15,4 +16,23 @@ for i in $@ ; do
 done
 
 # delegate work
-ssh jumpserv.colo.codethink.co.uk ./sled-power-cycle.sh $@
+# shellcheck disable=2093
+exec ssh jumpserv.colo.codethink.co.uk ./sled-power-cycle.sh "$@"
+
+
+# following is the script that lives at jumpserv.colo.codethink.co.uk
+# - note this is not executed due to the `exec` above.
+# - remember to place the moonshot-ilo password in the "ilopw" file
+
+for i in "$@" ; do
+	case "$i" in
+		9|10|11|12|13|14|15|16)	: ;;
+		*) continue ;;
+	esac
+	echo Force power off sled "$i"
+	sshpass -f ilopw ssh reproducible at moonshot-ilo "SET NODE POWER OFF FORCE C${i}N1"
+	echo sleeping 10 seconds
+	sleep 10
+	echo Power on sled "$i"
+	sshpass -f ilopw ssh reproducible at moonshot-ilo "SET NODE POWER ON C${i}N1"
+done



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

-- 
View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/-/commit/82da22afcd959c8330df27bef06d787bf774c771
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/20200626/a545b4d4/attachment-0001.html>


More information about the Qa-jenkins-scm mailing list