Repository navigation
A channel stage stays until its trial is judged, so the --retry a failed trial's refusal prints names a stage that is there - #319
Merged
Conversation
…led trial's refusal prints names a stage that is there
…l before the fallback's reboot, or without one, keeps it
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.
What was wrong (3a's whole-picture read, LOW 3)
After a failed trial,
kryptik-updaterefuses to arm the slot again and prints the way on:kryptik-update apply DIR --retry(tools/update/kryptik-update:352-353). For a release fetched from the channel, DIR is the stage. But the trial's own net zone polls:update-pollrunsforget_if_installed(broker.rs:249,update.rs:746-752). The trial runs the wanted version, so the poll clearedwanted,filesandincoming/before boot-success had judged it.The case that loses it: a trial that comes up healthy but whose commit fails (
boot-success.sh:148-151). The trial record stays for the next boot, and the machine keeps running well past the first poll, about a minute after the zone's loop starts. The next boot finds the trial not committed and recordstrial.failed. With automatic fetching off,kryptik update applythen says "no release has been asked for", and the printed--retrynames a directory that no longer exists. With it on, the whole release is fetched again first.What changed
update.rs:forget_if_installedkeeps the stage while the trial record/var/lib/kryptik/boot/trialexists, ortrial.failedbeside it, throughforget_unless_trial(dir, running, trial). boot-success renames the record totrial.failedbefore its 5 s pause and reboot (boot-success.sh:158, :166-169), and leaves it so for good on the branches that do not reboot (:160-165); the failed version still runs in both, so the record alone left a window (3a's read of the first head).arm_trialremovestrial.failed(kryptik-update:411) when a trial is armed again, andwant()replaces the stage when a newer release is asked for, so nothing lingers.trial.failedand boots the older release. That is belowwanted, so the stage stays for--retry.update-channel.mdsays when the stage goes.How the run proves it
stage_kept_through_trial(update/tests.rs) stages 1.0.3 and arms a trial record, then has a machine running 1.0.3 forget. The stage andwantedmust survive, and again once the record is renamedtrial.failed. The oldforget_if_installedremoves both in the first call. With the record removed, as boot-success removes it on commit, the same call must clear all three. The existing forget tests run unchanged (forget_if_installed, with no trial record on the test host). CI's compartment job runs them, and a Distro run follows on this head.