Repository navigation
fix(packages): offer no way back after a Docker major jump - #19
Merged
Merged
Conversation
… it is a major jump The core writes a PLAN line right after the QUEUED line: the engine versions the plan goes from and to, and the plan's own major_jump. ParseRun reads it with the same discipline as the other markers: the first valid one wins, a malformed one or one with another nonce is ignored.
A first real proof showed that after Docker 28 to 29 the packages go back and Docker starts, and the containers stay stopped. The rollback command the status printed is then no way back. The start writes the QUEUED and PLAN lines in one write; the status carries major_jump, and from/to from the PLAN line until the unit's own markers say better (the snapshot of what was installed for from, the daemon at success for to). rollback_command is empty whenever major_jump is true, in the failed and the no_result states alike. A log with no PLAN line (an older core's run) reads as no major jump and keeps today's behaviour.
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.
The first real run of the Docker update proof (Debian 11, the owner's case, docker-ce 28.0.4 to 29.8.0, containerd.io 1.7.29 to 2.3.4, nftables brought in as a new package) showed that the update works, and that the rollback command the core prints after a failed run does not bring the containers back after a major jump: the packages go back, Docker 28 starts, the images are there, but every container stays
exited(restart policiesalwaysandunless-stoppedincluded).So the core must not offer that command after a major jump.
CASAOS_DOCKER_UPDATE_PLAN <nonce> <from> <to> <0|1>on line 2, right after the QUEUED line, in the same write. The unit script never prints this kind of line.ParseRunreads it with the same discipline as the other markers (the nonce of line 1, exact shape, the first valid one wins, anything else ignored).major_jump(always present), andfrom/tocome from the plan as soon as the run is queued.rollback_commandis empty whenevermajor_jumpis true. A log without the line (an older core's run, a forged one) reads as not a major jump, as before.Not verified: a real systemd/apt/Docker run of this change; that is what the proof workflow is for, against the v0.5.22 pre-release.