Repository navigation
docs(ups): the card's low-battery window is two minutes, which the shutdown sequence overruns, so raising it becomes step zero - #594
Merged
Conversation
…utdown sequence overruns, so raising it becomes step zero Read off mjolnir on 2026-09-21: upsAdvConfigLowBatteryRunTime is 0:0:02:00, APC's factory default and never changed. That is the moment the card raises LB, and LB is the starting gun — every subscriber begins halting there and has to finish before the pack is empty. It does not fit. HOSTSYNC 120 and FINALDELAY 30 are 150 seconds before the firewall begins halting at all, against a 120-second window, before two guests and a pool export are counted. Built against the factory value the hosts would lose power part-way through the shutdown that exists to prevent exactly that. So the runbook gains a §0 that raises it to 8 minutes before anything else, chosen to be safely too large rather than right: §5 times the sequence, §6 measures what a minute of pack is worth, and §6.5 now sets the final value downward from those two readings instead of discovering the problem there. Two smaller corrections from the same reading. Saruman runs two guests, alexander (140) and phoenix (170), not the four §1 assumed, so the primary's wait is generous rather than tight and §5 will bring it down. And the troubleshooting list gains the failure this creates years from now: a pack that has aged until the sequence no longer fits, which shows up as SmartDriveUnsafeShutdownsGrowing and nothing else. ADR-0049 is unamended. It said the threshold is the card's, read rather than chosen, and that the measurement says whether it is enough — this is that reading arriving earlier than expected, not a different decision. scripts/validate.sh passes, 94 checks, no failures. Refs #574. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs #574. A correctness fix to the runbook #586 added, found by reading the card before working from it.
The finding
scripts/snmp-walk.sh --device mjolnir 1.3.6.1.4.1.318.1.1.1.5.2, on 2026-09-21:upsAdvConfigLowBatteryRunTimeis two minutes — APC's factory default, never changed on this card. That is when the card raisesLB, which is the starting gun for every subscriber. Everything has to finish inside it or the hosts lose power part-way through the shutdown.It does not fit. The runbook's own timings overrun it before a single guest is counted:
HOSTSYNC— primary waits for secondariesFINALDELAY— primary then waits before haltingBuilt against the factory value, this estate would have spent a maintenance window installing a shutdown sequence that still ends in the unclean stop it exists to prevent.
What changes
A new §0, before everything, raising the threshold to 8 minutes at the card's web interface — the one place in this repository that writes to the card rather than reads it. Eight is chosen to be safely too large, not right: at 21 % load and ~47 claimed minutes it is about a sixth of the pack, spent buying margin on a sequence nobody has timed. §5 times the sequence, §6 measures what a minute of pack is worth, and §6.5 now sets the final value downward from those two readings instead of being where the problem is discovered.
§1's guest count was wrong.
Sarumanruns two,alexander(140) andphoenix(170), both QEMU, read fromhomelab_guest_running— not the four the prose assumed. So the primary's wait is generous rather than tight, and §5 brings it down.A new troubleshooting entry for the failure this design acquires with age: a pack that has weakened until the sequence no longer fits its window.
SmartDriveUnsafeShutdownsGrowingis the only thing that would report it, which is exactly the rule ADR-0049 put there.Not changed
ADR-0049 is unamended, deliberately. It says the low-battery point is the card's, read rather than chosen, and that the measurement is what says whether it is enough. This is that reading arriving before the build instead of after it — the decision is unchanged, so there is nothing to supersede.
Verification
scripts/validate.sh— 94 checks, no failures, exit 0.scripts/check_docs.py— clean, before and after mergingmain(docs(roadmap): the file is the shape of the open work again, and its history is changelog.md (#577) #584 landed mid-task).markdownlint-cli2— 0 issues across 102 files.🤖 Generated with Claude Code