Skip to content

Reboot the system automatically when the kernel hangs #10

Description

@coiby

For issues like RHEL-145168, RHEL-130927 and etc, the kdump kernel can hang. So it's ideal to reboot the system so the bisecting can continue.

Currently, users need to manually reboot the system or using a script like follows,

host=$1
MAX_WAIT_TIME_S=200
SLEEP_S=5

while :; do
	until ssh -o ConnectTimeout=3 -o ChannelTimeout=session=2s "$host" exit 2>/dev/null; do
		if [[ $elapse_time -gt $MAX_WAIT_TIME_S ]]; then
			bkr system-power "$host"
			elapse_time=0
		fi
		elapse_time=$((elapse_time + SLEEP_S))
		sleep "$SLEEP_S"
	done

	elapse_time=0
	sleep "$SLEEP_S"
done

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions