Repository navigation
DittoFS v0.36.0
A modular virtual filesystem that decouples file interfaces from storage backends.
What's new
0.36.0 is a fix release, mostly for SMB. Before upgrading, check any SMB adapter config you have set by hand: the SMB adapter now refuses an encryption object it cannot apply, both when the config is stored and at boot. A stored row that 0.35.0 accepted can keep the SMB adapter down after the upgrade. See Changed below. No on-disk format changes in this release.
Changed
-
The SMB adapter refuses an
encryptionsetting that it would otherwise ignore.encryptionmust be an object holding onlyencryption_modeandallowed_ciphers, andencryption_modemust be a string. Before, a non-objectencryption, a non-string mode or a misspelt key such asmodewas read as no mode at all. The adapter stayed onpreferredanddfsctlreported success, so an operator who asked forrequiredstill served unencrypted SMB 2.x. -
allowed_cipherscan no longer be set; the SMB cipher set is fixed. The key was accepted with any value and never applied: NEGOTIATE kept offering every cipher whiledfsctl adapter edit smb --configreported success. A non-empty value is now refused withallowed_ciphers cannot be configured: the SMB cipher set is fixed. An absent key,nulland[]are still accepted. Negotiation itself is unchanged.Both checks run when the config is stored and when the server boots. A stored row that fails them leaves the SMB adapter down with
Adapter failed to start; continuing without it, while the server, the API and NFS keep running. To recover, store the config again without the offending key, for exampledfsctl adapter edit smb --config '{"encryption":{"encryption_mode":"required"}}'. The adapter then starts without a server restart. Adapters seeded by default carry no config and are not affected.
Security
-
encryption.encryption_modein the SMB adapter config now takes effect.dfs startreadbind_addressandsigningout of the adapter config but skippedencryption_mode, so the process stayed on thepreferreddefault andrequiredcould not be selected from the adapter config at all. -
SMB refuses a security descriptor holding an ACE type it cannot store, instead of dropping that ACE. Object ACEs, callback ACEs, mandatory labels and other types the server does not model were skipped, the rest of the DACL was stored, and the request succeeded. A skipped deny granted what the client had denied; a skipped allow silently withdrew a grant. SET_INFO now answers
STATUS_INVALID_PARAMETERand leaves the stored ACL as it was. A CREATE whose security descriptor fails to parse or validate is answered the same way and creates nothing, where it used to create the file without the descriptor. A SACL is parsed whenever one is present, so a SACL carrying anything other than audit or alarm ACEs, a mandatory label for instance, now fails the request too, even when the client did not ask for the SACL to be set. -
SMB TREE_CONNECT is refused when the user's share permission cannot be resolved. A store error used to fall back to the share's default permission, which can be above a user's explicit grant, or above an explicit
none. Since a tree keeps the permission it was connected with until a control-plane change re-checks it, the fallback outlived the failure. TREE_CONNECT now answersSTATUS_ACCESS_DENIED, as NFS already refuses, and the client can retry once the store answers. A failed lookup of a principal's SID grants refuses as well.
Fixed
-
Truncating two files down to the same content no longer fails forever on the second one. The second truncate was refused on every retry, as
NFS4ERR_DELAYover NFS andSTATUS_INSUFFICIENT_RESOURCESover SMB. Truncate gave each file an identifier derived from its remaining content, which the Badger store kept unique, although nothing read it any more. That identifier and its index are now removed. The on-disk format stays compatible: stores and backups written by older versions still open, a file record drops the old field the next time it is written, and the leftover index keys are deleted when a store is first opened or right after a restore, with a log line (badger: dropped the retired ObjectID index). On a store with a million such keys this takes about 12 seconds. Rolling back to an older version can hit the bug again. -
Opening an existing file for append over NFSv3 no longer empties it. A CREATE in UNCHECKED mode that named an existing file truncated it to zero and applied the request's mode and ownership to it. Linux clients send that CREATE for
open(O_CREAT), so on some kernelsecho x >> filelost the file's contents and wrote at offset 0. Now, as on the Linux kernel server, only a size the request carries is applied; without one the file is left alone. On a read-only share such a CREATE fails withNFS3ERR_ROFS, so a client opening the file for writing learns at open rather than at its first write. An existing directory or symlink named without a size is answered with its own handle and attributes. NFSv4 was not affected. -
A Windows client can open an encrypted share when the session does not require encryption. In
preferredmode the server encrypted the TREE_CONNECT response for a share that requires encryption, but the client learns that from the flag inside that response and was not decrypting yet. Windows retried and dropped the connection. TREE_CONNECT is now sent in the clear in that case; later commands on the tree are still encrypted, and a session that already requires encryption still encrypts TREE_CONNECT. -
SMB Kerberos accepts a ticket whose addresses are NetBIOS names only. Windows often lists the workstation's NetBIOS name and no IP in a ticket's addresses, and comparing those to the connection's IP failed session setup with
KRB_AP_ERR_BADADDR. Non-IP addresses no longer constrain the peer. A ticket that lists any IP still has to match the connection's IP. Verify failures now logclient_addressandticket_addresses. NFS is unchanged. -
A whole-share warm no longer holds memory in proportion to the share while its progress reporting is stalled. Each finished block queued one progress event until the reporter caught up; pending progress is now two counters. Progress calls may therefore jump by more than one block, and a successful warm still ends with done equal to total.
-
The operator now shows when the DittoFS API refuses its own account. Applying
spec.snapshotPoliciesand turning on the NFS portmapper both need the admin role, so the operator's account (roleoperator) got 403 on each, and that showed only in a verbose log line. A newAuthorizedcondition on the DittoServer is False and names each refused call. It turns True once every call gets its answer, and a transient API error leaves it as it was. The NFS adapter's Service now publishes port 111 only once the operator has seen the portmapper on, so it no longer points at a port nothing listens on. The operator still cannot apply these settings without the admin role.
Installation
Quick install (macOS / Linux):
curl -fsSL https://github.com/marmos91/dittofs/releases/download/v0.36.0/install.sh | shHomebrew (macOS/Linux):
brew tap marmos91/tap
brew install marmos91/tap/dfs # Server daemon
brew install marmos91/tap/dfsctl # Client CLIDebian/Ubuntu (APT):
curl -fsSL https://s3.cubbit.eu/dittofs-binaries/apt/dittofs.gpg.key | gpg --dearmor --yes | sudo tee /usr/share/keyrings/dittofs.gpg > /dev/null
echo "deb [signed-by=/usr/share/keyrings/dittofs.gpg] https://s3.cubbit.eu/dittofs-binaries/apt stable main" | sudo tee /etc/apt/sources.list.d/dfs.list
sudo apt update && sudo apt install dfs
sudo systemctl enable --now dfsRHEL/Fedora (YUM):
sudo curl -fsSLo /etc/yum.repos.d/dfs.repo https://s3.cubbit.eu/dittofs-binaries/rpm/dfs.repo
sudo yum install dfs
sudo systemctl enable --now dfsArch Linux:
curl -fsSLO https://github.com/marmos91/dittofs/releases/download/v0.36.0/dfs_0.36.0_amd64.pkg.tar.zst
sudo pacman -U dfs_0.36.0_amd64.pkg.tar.zst
sudo systemctl enable --now dfsScoop (Windows):
scoop bucket add marmos91 https://github.com/marmos91/scoop-bucket
scoop install dfs # Server daemon
scoop install dfsctl # Client CLIDocker:
docker run -d \
-p 12049:12049 \
-p 12445:12445 \
-p 8080:8080 \
-v /path/to/config.yaml:/config/config.yaml:ro \
-v dittofs-data:/data \
marmos91c/dittofs:v0.36.0Binary Download:
# dfs (server daemon)
curl -sfL https://github.com/marmos91/dittofs/releases/download/v0.36.0/dfs_0.36.0_Linux_x86_64.tar.gz | tar xz
# dfsctl (client CLI)
curl -sfL https://github.com/marmos91/dittofs/releases/download/v0.36.0/dfsctl_0.36.0_Linux_x86_64.tar.gz | tar xzChangelog
Features
- 9e71876: feat(harness): JUnit per cell, generated from summary.json (#3168) (@llucian-iws)
- 3c277d2: feat(harness): NFS mounts in the fixture (#3183) (@llucian-iws)
- 9008c6f: feat(harness): S3 profiles: the bucket, its write-and-read check, and the localstack need (#3181) (@llucian-iws)
- d21f184: feat(harness): bring dt in line with the settled step 2 gaps (#3184) (@llucian-iws)
- 6928f60: feat(harness): commands in images, with templates (#3166) (@llucian-iws)
- e2a80ec: feat(harness): dt doctor, and dt list says whether each suite can run here (#3123) (@llucian-iws)
- 7efc6e3: feat(harness): dt list and dt plan from the suite registry (#3088) (@llucian-iws)
- c95b66d: feat(harness): dt report, and job summaries from it (#3169) (@llucian-iws)
- 8cdc799: feat(harness): dt run for exit-format suites, with the needs check and the dt shim (#3105) (@llucian-iws)
- ad60207: feat(harness): dt run reads go test -json, with service needs and dt unit, integration, e2e (#3109) (@llucian-iws)
- 6f517a4: feat(harness): dt services, dt stack and dt cleanup, as the shell they stay (#3110) (@llucian-iws)
- 7290ff2: feat(harness): dtc and dt hooks, as the shell they stay (#3111) (@llucian-iws)
- 1d0d739: feat(harness): known.yaml, checked when the registry loads, and grading (#3182) (@llucian-iws)
- fddc6c4: feat(harness): per-test results, written as CTRF summary.json (#3135) (@llucian-iws)
- 2a1ab30: feat(harness): the fixture: dfs with an export, users and settings (#3170) (@llucian-iws)
- 7cea920: feat(harness): {tools}, the pinned pjdfstest and pynfs (#3134) (@llucian-iws)
Bug Fixes
- 8347638: fix(engine): a whole-share warm's progress no longer queues without bound (#3165) (@llucian-iws)
- 517493c: fix(harness): dt plan drops empty shards and refuses an empty test list (#3090) (@marmos91)
- 85a4b0f: fix(hooks): pre-push gives go test 10 minutes and skips deleted packages (#3124) (@llucian-iws)
- 506f74c: fix(metadata): remove the ObjectID layer, which made truncate fail forever (#3107) (@viquitorreis)
- fe499a1: fix(nfs): cover an existing directory and symlink in CREATE UNCHECKED (@didimelli)
- 7d6e27d: fix(nfs): keep an existing file on an NFSv3 UNCHECKED CREATE without a size (@didimelli)
- 78884d9: fix(nfs): refuse an UNCHECKED CREATE of an existing file on a read-only share (@didimelli)
- 4c9aebc: fix(nfs): say why an UNCHECKED CREATE without a size checks no permission (@didimelli)
- 4dbe865: fix(operator): show the API's 403s on the DittoServer, and publish 111 only with the portmapper on (#3187) (@llucian-iws)
- c155ba2: fix(smb): honor encryption mode, TREE_CONNECT, and Kerberos addresses (#2936) (@mcpll)
- f47afb7: fix(smb): refuse TREE_CONNECT when the share permission cannot be resolved (#3179) (@llucian-iws)
- b34b639: fix(smb): refuse a non-empty allowed_ciphers in the SMB adapter config (#3155) (@llucian-iws)
- 1de3795: fix(smb): refuse a security descriptor holding an ACE type it cannot map (#3148) (@marmos91)
- ab9006a: fix(smb): refuse an encryption_mode that is not a string or sits under an unknown key (#3115) (@llucian-iws)
- eb9b846: fix(test): check the shared harness fixtures out with LF everywhere (#3139) (@marmos91)
Others
- 7d6a0ca: chore(deps): bump github.com/onsi/ginkgo/v2 (#3172) (@dependabot[bot])
- 27865e9: chore(deps): bump the go-dependencies group with 13 updates (#3173) (@dependabot[bot])
- 3fe6029: chore(metadata): reflow NewConflictError's comment (#3154) (@llucian-iws)
- 6e93912: chore(metadata): stop describing the removed PostgreSQL, SQLite and memory metadata stores (#3130) (@llucian-iws)
- 51fc844: chore(release): v0.36.0 (@marmos91)
- 50ebda1: ci(lint): Repo Checks runs dt's own tests (#3127) (@llucian-iws)
- d864d9f: ci(lint): run the lint jobs' suites through dt (#3112) (@llucian-iws)
- f52f052: ci(release): changelog section in release notes, no merge commits (#3049) (@marmos91)
- 4209739: ci(release): scripts/release.sh, which refuses a release without its changelog section (#3191) (@marmos91)
- 89b9d1f: ci: run develop's workflows on the feat/storage-v2 integration branch (#3138) (@marmos91)
- 8b9dd52: docs(bench): mailbox README covers the 06 truncate and the reset after it (@viquitorreis)
- b724dcf: docs(bench): mailbox reset note and Not modeled cover the 06 truncate, rounded up to 1 MiB (@viquitorreis)
- edad166: docs(changelog): describe 0.36.0 (#3192) (@marmos91)
- 91b719b: docs(rfc): RFC 21 (NFS) and RFC 22 (SMB) — protocol choices the standards leave open (#2962) (@marmos91)
- e7142fc: docs(rfc): diagrams for RFC 13, 14, 16, 26 and 30 (#3143) (@marmos91)
- cb6470d: docs(rfc): express the shared clock in standard-library types (#3189) (@didimelli)
- 5c768e2: docs(rfc): storage RFC series (0–17) for discussion (#2894) (@marmos91)
- ed6cc42: docs(test): define {base} for pushes, a dt run's tier, and when ci-health moves (#3089) (@llucian-iws)
- 59a7bdf: docs(test): describe the nightly knfsd baseline and --report-only (@didimelli)
- 368de0c: docs(test): fixture fields for namespaced NFS clients (#3114) (@llucian-iws)
- ffa52ec: docs(test): name dt plan's cells, and settle lint, docs-only and Kerberos runs (#3087) (@llucian-iws)
- a909ce1: docs(test): settle step 2's fixture, images and placeholders (#3132) (@llucian-iws)
- d398c25: docs(test): settle step 2's results, grading and known lists (#3131) (@llucian-iws)
- 5fc3eeb: docs(test): settle the gaps step 2's code found (#3180) (@llucian-iws)
- 315adf7: docs(test): settle the test harness RFC's open questions (#3085) (@llucian-iws)
- 8548f81: refactor(block): fold LocalStore into journal, drop the in-memory local double (#2903) (@marmos91)
- f3a31de: test(ad-dc): the fixture's samba restart no longer kills a test's samba-tool (#3178) (@llucian-iws)
- 6999547: test(bench): merge pull request #3053 from marmos91/test/mailbox-truncate-06-3031 (@viquitorreis)
- 2056f5e: test(bench): truncate each mailbox file to 60% at the end of 06-logoff-compaction (@viquitorreis)
- 5071e53: test(e2e): drop the page cache before the post-restart read-back (@didimelli)
- afd3c67: test(e2e): restart the v4.1 session-recovery test on the same server state (@didimelli)
- 2bf026a: test(e2e): restore the system Kerberos files through one shared helper (#3054) (@llucian-iws)
- 35366ef: test(harness): CRLF-proof the dtc pin check and the harness's test fixtures (#3171) (@llucian-iws)
- 1cbd1ea: test(harness): build the pin check's CRLF case from LF, so a CRLF checkout passes it (#3174) (@llucian-iws)
- 04bd0f2: test(harness): drop tests that cannot fail, and point the harness at the RFC's new path (#3175) (@llucian-iws)
- f98c125: test(harness): one known-failure matcher in Go, on fixtures shared with known-failures_test.sh (#3133) (@llucian-iws)
- 6e16617: test(nfs): drop the nfstest_cache rows the CREATE UNCHECKED fix clears (@didimelli)
- ddfbdb5: test(nfs): give the nfstest grader's overlay cases their own tables (@didimelli)
- 3c38286: test(nfs): harden the namespaced client's user, paths and cleanup (@didimelli)
- d3ebeb4: test(nfs): let a squashed root mount the export, and route the client (@didimelli)
- ae19155: test(nfs): mirror the second client's traffic into the first client's capture (@didimelli)
- 32d198d: test(nfs): record the knfsd baseline and sort the nfstest rows it settles (@didimelli)
- 0bd6c7c: test(nfs): run cthon04 and nfstest as an ordinary user on a namespaced client (@didimelli)
- 9eec37f: test(nfs): run each cthon04 program from its directory as the test user (@didimelli)
- f07dac2: test(nfs): run nfstest dio and delegation against knfsd for a baseline (@didimelli)
- 122d718: test(nfs): run nfstest_cache on NFSv3 in the knfsd baseline (@didimelli)
- b402aa5: test(nfs): run the knfsd baseline against the namespaced client (@didimelli)
- feb7375: test(nfs): run the knfsd baseline nightly, and address review (@didimelli)
- 0d88e90: test(nfs): settle the nfstest tables against knfsd on the namespaced client (@didimelli)
- aa9ed8a: test(nfs): table cthon04 op_chmod for every option set (@didimelli)
- 1e9f6f0: test(nfs): table nfstest_cache's file checks on v3 against CREATE UNCHECKED truncation (@didimelli)
- 597249d: test(nfs): table the bugs the unprivileged, namespaced client exposes (@didimelli)
- e5229d4: test(nfs): wait for silly-renamed files to clear between cthon04 basic tests (@didimelli)
- 3b4b7ee: test(nfstest): compare knfsd with DittoFS per assertion, narrow the export (@didimelli)
- 919c3ad: test(scenarios): a background job's line gets no time of its own (#3108) (@llucian-iws)
- f538590: test(scenarios): chart the failures per run in the run summary (#3186) (@llucian-iws)
Full Changelog: v0.35.0...v0.36.0
Verifying Checksums
sha256sum -c checksums.txtVerifying Signatures
Release checksums are signed with Sigstore cosign using keyless OIDC:
cosign verify-blob \
--bundle checksums.txt.sigstore.json \
--certificate-oidc-issuer https://token.actions.githubusercontent.com \
--certificate-identity-regexp '^https://github\.com/marmos91/dittofs/\.github/workflows/release\.yml@refs/tags/' \
checksums.txtDocker Images
Multi-architecture images are available for linux/amd64 and linux/arm64:
marmos91c/dittofs:v0.36.0- This specific versionmarmos91c/dittofs:latest- Latest stable releasemarmos91c/dittofs:v0- Latest v0.x.xmarmos91c/dittofs:v0.36- Latest v0.36.x