Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions .github/actions/truenas-appliance-runner/ha.sh
Original file line number Diff line number Diff line change
Expand Up @@ -241,17 +241,25 @@
# (run 39251437564 read B's ids over ssh and was refused).
# A refused or timed-out connection (sshd not started yet, the network
# not up) is just tried again.
#
# B's ids are read in the same call that sees the new boot, not in another
# one after it: sshd answering once does not mean it stays up. Middleware
# applies its own SSH settings as it starts and restarts sshd, and in run

Check notice on line 247 in .github/actions/truenas-appliance-runner/ha.sh

View workflow job for this annotation

GitHub Actions / claude-review / Automatic PR review

LOW: Comment states that middleware restarting sshd is the cause, while the PR description says that is unconfirmed; it should be hedged.
Comment on lines +245 to +247

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LOW — This comment states as fact that middleware "restarts sshd", but the PR description calls that cause a reading, not confirmed. The code doesn't depend on which cause it is, but these comments are where the repo records why things are the way they are. Something like "most likely restarts sshd" would keep the record accurate if the real cause turns out to be different.

# 39296815434 a later read was refused after this loop had seen the boot.
local out
deadline=$((SECONDS + 600))
while [ "$SECONDS" -lt "$deadline" ]; do
now="$(ssh_ b cat /proc/sys/kernel/random/boot_id 2>/dev/null)" || now=
# shellcheck disable=SC2016 # expanded on the node
out="$(ssh_ b 'echo "$(cat /proc/sys/kernel/random/boot_id) $(cat /etc/machine-id) $(hostid)"' 2>/dev/null)" || out=
now="${out%% *}"
[ -n "$now" ] && [ "$now" != "$boot" ] && break
sleep 5
done
if [ -z "$now" ] || [ "$now" = "$boot" ]; then
die "node B did not come back over ssh from its reboot within 10 minutes"
fi
b="${out#* }"
"${TNCTL[@]}" wait "ws://${IP[b]}" "$APPLIANCE_USER" "$password" --timeout 600 >/dev/null
b="$(ids b)"
[ "$a" != "$b" ] || die "node B still has A's ids after its reboot: $b"
say "node B now has $b"
}
Expand Down
Loading