deploy: apply helper reboots only when the rollback itself failed
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KqhjP7nud5gdBg25zCiRk9
This commit is contained in:
@@ -345,10 +345,13 @@ restore() { # restore <reason>: put the pre-run netplan back, re-check connecti
|
||||
if [ "\$rb" = ok ] && [ "\$c" = ok ]; then
|
||||
echo "apply-network ROLLED BACK (restored, connectivity ok)"
|
||||
status rolled-back "\$1"
|
||||
elif [ "\$rb" = ok ]; then
|
||||
echo "apply-network ROLLED BACK (restored, but no connectivity - check the uplink/cable)"
|
||||
status rolled-back restored-no-connectivity
|
||||
else
|
||||
echo "apply-network ROLLBACK FAILED: \$rb / connectivity \$c"
|
||||
status rollback-failed "\$1; \$rb / connectivity \$c"
|
||||
[ "\$c" = ok ] || { echo "no connectivity after rollback - rebooting"; systemctl reboot; }
|
||||
[ "\$c" = ok ] || { echo "rollback failed and no connectivity - rebooting (boot uses the files on disk)"; systemctl reboot; }
|
||||
fi
|
||||
exit 1
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user