Export fails with EINVAL when the package cache is on mergerfs (renameat2 RENAME_NOREPLACE unsupported)
I maintainer di solito rispondono entro 1 giorno
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 54/100
Direzione di ricerca
Start with heliopause/src/export/archive.rs, especially install_blob, and compare its blob commit with the hard-link approach used by install_file. Reproduce the export failure on a mergerfs package cache and check how EINVAL is handled. Done means export either commits blobs safely on that filesystem or rejects the unsupported operation before the lengthy preparation begins; the issue also suggests documenting the filesystem requirement in docs/cli-design.md.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
ignition export fails at "Scan and copy reachable storage" when [paths].package_cache is on a mergerfs (FUSE) mount, and the error names neither the file nor the cause:
[ OK ] Capture compiled modules and globals. 280053792 bytes, 542905 global bytes downloaded 8.3s
[ FAILED ] Scan and copy reachable storage. 0.0 / 11.0 GiB 0.1s
RuntimeError: Invalid argument (os error 22)
[ FAILED ] Export native package. 22.1s
error: native package export failed: Invalid argument (os error 22)
The failure lands after tuning, compilation and capture, so each attempt costs the full preparation pass, about 20 minutes for Gemma 4 E4B on a cold kernel cache.
Cause
strace -f -Z points at the blob commit in install_blob (heliopause/src/export/archive.rs:429, rechecked on bce032c0):
libc::renameat2(AT_FDCWD, source, AT_FDCWD, target, libc::RENAME_NOREPLACE) != 0
=> return Err(std::io::Error::last_os_error().into())
mergerfs returns EINVAL for RENAME_NOREPLACE, and last_os_error discards both paths, so the operator sees only Invalid argument (os error 22).
Minimal reproduction
Outside Flare, on the same mount:
import ctypes, os
libc = ctypes.CDLL(None, use_errno=True)
open("/models/x/.src", "w").close()
r = libc.renameat2(-100, b"/models/x/.src", -100, b"/models/x/.dst", 1) # 1 = RENAME_NOREPLACE
print(r, os.strerror(ctypes.get_errno())) # -1 Invalid argument on mergerfs; 0 on ZFS
Direct I/O and io_uring writes to the same mount work; only the no-replace rename fails. Moving --output alone does not help, because blobs are committed into the package cache and the output must share its filesystem.
The commit path used elsewhere
Hard-link publication is the usual commit in this tree, and link already gives the no-replace guarantee by failing with EEXIST when the destination exists:
helios/src/package/cache.rs:2581,:2606,:3029flare/src/package_cache.rs:475,:496heliopause/src/export/blob.rs:256heliopause/src/export/package.rs:932,:1012heliopause/src/export/transfer.rs:1021heliopause/src/export/protection.rs:335
install_blob is the outlier that requires RENAME_NOREPLACE support from the filesystem.
Possible changes
- Fall back to
link()followed byunlink()of the temporary file whenrenameat2fails withEINVALorENOTSUP, keeping the existingEEXISTbehaviour when the destination already exists. Both calls stay inside one filesystem, which export already requires. - Check that the package cache supports the operation before preparation starts, and fail there. Record the requirement beside the same-filesystem rule at
docs/multi-host.md:243, which requires output and package cache to share a filesystem but says nothing about rename support.docs/package-format-design.md:638promises an explicit preflight/export error for filesystem file-size and space limits; nothing covers rename semantics, which is why this failure arrives after capture.
Workaround
Point [paths].package_cache and --output at a filesystem that supports RENAME_NOREPLACE, such as ZFS or ext4.
Environment
Proxmox LXC container, /models is a mergerfs pool over ZFS datasets, kernel 6.17.9-1-pve, upstream bce032c0.
- Lingua principale
- Rust
- Stelle
- 800
- Fork
- 106
- Merge medio
- 1g 3h
- PR unite (30g)
- 100
Preparare l'ambiente
- Include un Dockerfile o un file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di NVIDIA/hyperflare-inference
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
NVIDIA/hyperflare-inference#268 ·
I maintainer di solito rispondono entro 1 giorno
-
break out engram wait timeApertaarea:caching area:engram enhancement performance triage:design-review
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
NVIDIA/hyperflare-inference#230 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 15/100
NVIDIA/hyperflare-inference#278 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 25/100
NVIDIA/hyperflare-inference#276 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
NVIDIA/hyperflare-inference#271 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di NVIDIA/hyperflare-inference
Issue simili
-
bug UI
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
wardian-app/Wardian#1746 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
jlcodes99/cockpit-tools#3125 ·
I maintainer di solito rispondono entro 2 giorni
-
bug user-sprint
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
Vondor/KassenSturz#967 ·
I maintainer di solito rispondono entro 1 giorno
-
area/ci
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 62/100
I maintainer di solito rispondono entro 1 giorno
-
[BUG] Incremental sync warns "no stored highest_uid" on every round for folders with no new mailApertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
rustmailer/bichon#411 ·