[Qa-jenkins-scm] [Git][qa/jenkins.debian.net][master] reproducible system health: explicitly tell which old+unused kernel should be removed
Holger Levsen (@holger)
gitlab at salsa.debian.org
Thu Jun 1 19:37:27 BST 2023
Holger Levsen pushed to branch master at Debian QA / jenkins.debian.net
Commits:
54e401f4 by Holger Levsen at 2023-06-01T20:37:13+02:00
reproducible system health: explicitly tell which old+unused kernel should be removed
Signed-off-by: Holger Levsen <holger at layer-acht.org>
- - - - -
2 changed files:
- bin/reproducible_node_health_check.sh
- bin/reproducible_system_health.sh
Changes:
=====================================
bin/reproducible_node_health_check.sh
=====================================
@@ -129,7 +129,13 @@ case $HOSTNAME in
*) MAX_KERNEL=3 ;;
esac
if [ $KERNEL -gt $MAX_KERNEL ] ; then
- echo "Warning: more than $MAX_KERNEL kernel(s) in /boot:"
+ RUNNING=$(uname -r)
+ OLDEST_KERNEL=$(ls /boot/vmlinuz-*|sed 's#/boot/vmlinuz-##g'|head -1)
+ if [ "$RUNNING" != "$OLDEST_KERNEL" ] ; then
+ echo "Warning: too many kernels, $OLDEST_KERNEL should be removed."
+ else
+ echo "Warning: more than $MAX_KERNEL kernel(s) in /boot"
+ fi
ls -lart /boot/vmlinuz-*
df -h /boot
echo "Running kernel: $(uname -r)"
=====================================
bin/reproducible_system_health.sh
=====================================
@@ -159,6 +159,8 @@ for JOB_NAME in $(ls -1d reproducible_* | sort ) ; do
small_note "reboot needed for kernel upgrade"
elif $(grep -q "^Warning: running kernel needs attention" $LOG) ; then
small_note "running kernel needs attention"
+ elif $(grep -q -E "Warning: too many kernels, .* should be removed." $LOG) ; then
+ small_note "too many kernels, remove linux-image-$(grep 'Warning: too many kernels' $LOG | cut -d ',' -f2 | xargs echo)"
elif $(grep -q "Warning: more than 1 kernel(s) in /boot" $LOG) ; then
small_note "more than one kernel installed"
elif $(grep -q "Warning: more than 3 kernel(s) in /boot" $LOG) ; then
View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/-/commit/54e401f4728befe92b992d1d110325e3d5e7c3d3
--
View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/-/commit/54e401f4728befe92b992d1d110325e3d5e7c3d3
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/20230601/8456388b/attachment-0001.htm>
More information about the Qa-jenkins-scm
mailing list