Tell planned host reboots from crashes instead of only waiting longer #47
Closed
opened 2026-11-16 21:11:19 -05:00 by jared
·
2 comments
No Branch/Tag Specified
main
pr-64-screenshots
pr-63-screenshots
kuma-token
modem-restart
modem-extras-screenshots
modem-extras
modem-login-screenshots
modem-login
pr-47-screenshots
polish
pr-46-screenshots
wan-health
pr-45-screenshots
attention-list
port-name-report
pr-44-screenshots
readme-power-polish
pr-42-screenshots
stale-outlet-watts
pr-41-screenshots
topology-polish
pr-40-screenshots
power-map
pr-39-screenshots
topology
pr-37-screenshots
stale-alerts
pr-36-screenshots
wan-incidents
pr-35-screenshots
unused-interfaces
pr-32-screenshots
loose-gear-on-top
tinker-create-action
revert-31
stale-interface-alerts
zimaboard-and-facing
pr-30-screenshots
pr-29-screenshots
pro-max-faceplates
rack-unlinked-port-clicks
pr-27-screenshots
rack-drawn-fronts
rack-panel-label
pr-25-screenshots
rack-rear-and-settings
pr-24-screenshots
racks-shelves-export
pr-23-screenshots
rack-view
pr-22-screenshots
inventory-and-faceplate-marks
pr-21-screenshots
events-history
ticket-recovery-and-context
pr-18-screenshots
deploy-2026.11.25-818
deploy-2026.11.25-809
deploy-2026.11.25-800
deploy-2026.11.24-791
deploy-2026.11.24-782
deploy-2026.11.24-767
deploy-2026.11.20-757
deploy-2026.11.20-748
deploy-2026.11.19-733
deploy-2026.11.19-724
deploy-2026.11.18-715
deploy-2026.11.18-706
deploy-2026.11.18-697
deploy-2026.11.16-688
deploy-2026.11.15-678
deploy-2026.11.15-669
deploy-2026.11.15-660
deploy-2026.11.15-645
deploy-2026.11.15-636
deploy-2026.11.15-627
deploy-2026.11.15-618
deploy-2026.11.14-591
deploy-2026.11.14-582
deploy-2026.11.12-573
deploy-2026.11.11-564
deploy-2026.11.11-555
deploy-2026.11.11-552
deploy-2026.11.11-519
deploy-2026.11.11-501
deploy-2026.11.11-492
deploy-2026.11.11-483
deploy-2026.11.11-462
deploy-2026.11.11-453
deploy-2026.11.11-420
deploy-2026.11.11-411
deploy-2026.11.11-402
deploy-2026.11.11-393
deploy-2026.11.11-384
deploy-2026.11.11-375
deploy-2026.11.11-366
deploy-2026.11.10-357
deploy-2026.11.10-348
deploy-2026.11.10-333
deploy-2026.11.10-324
deploy-2026.11.07-314
deploy-2026.11.05-305
deploy-2026.11.05-296
deploy-2026.11.05-287
deploy-2026.10.03-273
deploy-2026.10.03-267
deploy-2026.09.05-260
deploy-2026.05.14-235
deploy-2026.05.14-232
deploy-2026.05.14-229
deploy-2026.05.13-226
deploy-2026.05.13-223
deploy-2026.05.13-220
deploy-2026.05.13-217
deploy-2026.05.13-214
deploy-2026.05.13-211
deploy-2026.05.13-208
deploy-2026.05.13-202
deploy-2026.05.12-199
deploy-2026.05.12-196
deploy-2026.05.12-193
deploy-2026.05.12-190
deploy-2026.05.11-187
deploy-2026.05.11-184
deploy-2026.05.11-181
deploy-2026.05.11-178
deploy-2026.05.11-175
deploy-2026.05.11-172
deploy-2026.05.11-169
deploy-2026.05.11-166
deploy-2026.05.11-163
deploy-2026.05.11-160
deploy-2026.05.11-132
deploy-2026.05.11-129
deploy-2026.05.11-126
deploy-2026.05.11-123
deploy-2026.05.11-120
deploy-2026.05.11-117
deploy-2026.05.11-114
deploy-2026.05.11-111
deploy-2026.05.11-108
deploy-2026.05.11-105
deploy-2026.05.11-102
deploy-2026.05.11-99
deploy-2026.05.11-96
deploy-2026.05.11-93
deploy-2026.05.11-90
deploy-2026.05.11-87
deploy-2026.05.11-84
deploy-2026.05.07-81
deploy-2026.05.07-78
deploy-2026.05.01-74
deploy-2026.05.01-71
deploy-2026.05.01-68
deploy-2026.05.01-65
deploy-2026.05.01-62
deploy-2026.05.01-59
deploy-2026.05.01-56
deploy-2026.04.30-53
deploy-2026.04.29-50
deploy-2026.04.26-46
Labels
No items
No labels
Milestone
No items
No Milestone
Projects
Clear projects
No projects
No Assignees
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: LotusGuild/gandalf#47
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Follow-up to #14 / #15.
Problem
#15 stopped planned reboots from cutting "No metrics from host" tickets by waiting
host_failure_threshold(5) checks before ticketing a host that has disappeared. That is a time window, not intent detection, so it fails both ways:stopallwhile guests shut down can all take longer than 5 checks.The second case has already happened. large1 on 2026-11-14 (UTC):
smartmontoolsattribute changessystemd-logind"will reboot/power off now", no units stopping, nostopallupgoes to 0upreturns to 1That looks like an unclean reset (crash, watchdog, or power), and it cut no ticket because it was over within the window. It could also be journal lines lost before they shipped; the open questions below cover that.
Signals that are available
Checked against micro1's planned reboot on 2026-11-06 (the one that opened #14):
systemd-logind:The system will reboot now!/will power off now!{host="<host>", job="journal", unit="systemd-logind.service"}upwent to 0.stopalltask (UPID:<host>:…:stopall::root@pam:){job="pve-tasks", filename="/var/log/pve/tasks/active"}node_boot_time_secondschangesProposal
systemd-logindreboot/power-off line from that host in the last few minutes.planned_reboot_grace(for example 20–30 minutes). Ticket only if the host hasn't come back by then, with wording like "planned reboot of X did not come back".failure_thresholdas before, or keephost_failure_thresholdbut lower it.node_boot_time_secondschanged) and no clean-shutdown line was seen, open a lower-priority "unexpected reboot" ticket even if it was back inside the window. This catches the large1 case.host_failure_thresholdbehaviour. Don't silence or speed up alerts because a log query failed.Open questions
logindline before it ships, for example if promtail stops first? Check unit ordering on the hosts, and check whether large1's 11-14 journal (journalctl -b -1 -e) shows a clean shutdown that never reached Loki.Out of scope
cluster_network_issuethreshold and suppressions (separate follow-up from #14).Not being built yet; filed for tracking.
Plan agreed 2026-11-25. #47 is split along the ownership lines in the thor README.
Gandalf: #65. This improves the ticket Gandalf already cuts without adding new host-health tickets.
systemd-logindshutdown request.planned_reboot_grace(default 20 min, per-host overrides) as "Planned reboot did not come back".Thor: LotusGuild/thor#4. Proposal item 2, the "unexpected reboot" ticket for a crash that recovers inside the window, is new host-health ticketing, so it moves to thor.
reboots.pywas written so thor can take it over.Open questions from the issue:
planned_reboot_grace_hosts.This issue closes when #65 merges. The remaining work is tracked in thor#4.
#65 is merged and live as of 2026-11-25 14:37 EST.
config.jsonnow hasloki.url(backup at/root/config.json.bak-2026-11-25-loki).Closing. The remaining work, the "unexpected reboot" alert, is LotusGuild/thor#4.