posix: warn at startup when state lives outside storage.root (#821) #825
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix-821"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Fixes #821 with options 1 + 3 from the issue, log-only (no UI, so no mockup).
stateOutsideRoot(cfg)incmd/cairnd/statepaths.go: on the posix driver (incl. the empty default), returns each directory holding astatePathsentry that is not insidestorage.root, deduplicated and sorted. Path containment viafilepath.Rel, so/datis not treated as a parent of/data/.cairnand a trailing slash on the root doesn't matter. s3 never warns.main.go: oneWARNright after the posix driver opens, namingstorageRootandstateDirs. A warning, not a refusal: a separately persisted state dir is legitimate./data). CHANGELOG v0.6.311.Tests: default config is silent; root moved alone →
[/data/.cairn]; prefix-not-parent warns; s3 silent; partially moved paths list only the forgotten dir. Ran the binary locally withroot=/tmp/t821/rootand a custom settings path: the warning lists both/data/.cairnand the custom dir.Not done (needs a mockup if wanted): an admin overview hint for the same condition.
Superseded: decided in review to go with options 2 + 3 instead of a warning (research on #821). Replaced by the fix-821b PR.
Pull request closed