Repository navigation
fix(runs): prune a signed layout into the archive's records/ - #164
Merged
Merged
Conversation
… under the layout A prune of a signed layout copied records/'s marker and its envelopes to the archive's top, which no reader opened: the operator's reader took it for an unsigned directory and refused the marker's kind. The archive now holds records/ alone, with its marker, so OpenAdmin and runs list read it as they read the layout, and no plane opens it, having no state/. The archive's place was refused only when its parent was the runs directory, records/ or the layout's directory, so an archive in state/, or one reached through a link, was made there and the next plane start refused state/. The path is now judged by identity, walking up from the nearest existing directory of it as written by "..", and refused, naming both paths, when it reaches the layout's directory anywhere. Signed-off-by: Konrad Karauda <konrad@karauda.com>
… the refusal that cannot judge A mount of records/ or state/ elsewhere leads by ".." away from the layout, so the walk compared only with the layout's directory let an archive into it. Each walked directory is now compared with the layout's directory, records/ and state/. The refusal for a path whose place cannot be judged had no test. A path at the kernel's bound, whose walk up passes it while mkdir still fits, now pins it in state/ and outside the layout. archiveRecords closes records/ when closing the archive's top fails. Signed-off-by: Konrad Karauda <konrad@karauda.com>
The reference page's prune paragraph says the archive is synced before any tree is removed, holds records and state for an unsigned directory and `records/` alone for a signed one, which `runs list` reads and no plane opens, and is refused at or under the runs directory through any link or mount, or where its place cannot be judged. Other paragraphs are tightened to keep the page within its 1500-word budget. The changelog names the fix. Signed-off-by: Konrad Karauda <konrad@karauda.com>
Signed-off-by: Konrad Karauda <konrad@karauda.com> # Conflicts: # CHANGELOG.md
🚀 Deploying Preview to Cloudflare 🚀Preview Deployments by commit
|
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 changed, and why
runs prunenow putsrecords/'s marker and pruned records in the archive'srecords/, byte for byte. The archive and itsrecords/both use mode0700. State stays in the livestate/. An unsigned layout still gets a flat archive with its marker, records, and state. The archive is synced before any tree is removed.runs list <archive>lists the archived runs, andruns prune <archive>can move expired trees into another archive of the same shape. No plane opens a signed archive as it stands.runs close --keyrefuses its archived records because they are signed for the liverecords/.runs open --keystill accepts a layout withoutstate/, since a crash during setup can leave one. It can write a new record into the archive. If an operator addsstate/, a signed plane can serve the new run and still refuse the archived records.runs prunenow refuses--archiveat or under the runs directory through any link or mount, or where its place cannot be judged. Previously, it could create an archive understate/, which the next plane start would refuse. A refusal exits with code1without creating an archive or removing a tree.Invariant or record
None changed.
runs prunefails closed when the archive's place cannot be judged (invariant 5).How it was tested
internal/runsandcmd/guardana-controlsuites passed. The five newinternal/runstests andTestRunsPruneOfASignedLayoutpassed with-test.count=500.internal/runspassed. Thecmd/guardana-controlsuite failed only tests that need thegobinary or repository files missing from the container, and a renew race test fixed onmainsince.make vetandmake docs-checkpassed.records/orstate/elsewhere remains unverified. Refusal of an archived record byreactandsupervisewas checked in code only. CI'smake qualityon this pull request is the gate.Documentation
Updated the
runs pruneparagraph indocs/reference/runs.mdto describe archive contents, sync order, and path refusals. Tightened other paragraphs to stay within its 1500-word budget. Added aFixedentry toCHANGELOG.md.make docs-impact RANGE=origin/main..HEADalso namesdocs/reference/cli.md,docs/reference/versions.mdanddocs/status.md; each was read and still holds: the command's help is unchanged, no format version moved, and the status page'sruns prunelines say nothing this change makes untrue.