diff options
| author | Mark Ruvald Pedersen <mped@demant.com> | 2023-05-01 15:37:02 +0200 |
|---|---|---|
| committer | Mark Ruvald Pedersen <mped@demant.com> | 2023-05-08 12:33:41 +0200 |
| commit | 66fb2f539ab647fa5cdeaef5cffbd37f59c71984 (patch) | |
| tree | 7b271339c1a67eb0e57329baeb00dfddd4414561 /pkgs/development/python-modules/python-mapnik/python-mapnik_std_optional.patch | |
| parent | 4078f5204dada1b53f532da26e7b30e7cca27e7a (diff) | |
nixos/proxmox-image: Disable O_DIRECT to fix assert
Context summary:
'vma create' can't otherwise write to tmpfs such as /dev/shm.
This is important when used from non-nixos machines which may
have /build as tmpfs.
VMA is Proxmox's virtual machine image format that wraps QEMU images,
augmenting these with proxmox-specific configuration file.
proxmox-image.nix uses the VMA tool to create vma image files.
The VMA tool exists as a patchset ontop of QEMU.
VMA writes its output with open() and O_DIRECT flag.
O_DIRECT does not work on Linux tmpfs [1]. Thus:
$ vma create ~/output.vma ... # works, assuming home isn't tmpfs.
$ vma create /dev/shm/output.vma ... # fails since /dev/shm is tmpfs
Failure results in assert(*errp == NULL).
O_DIRECT is a cache performance hint.
But it currently blocks our usage of nixos-generate -f proxmox from
Non-NixOS hosts and Docker.
The patch here simply removes O_DIRECT:
vma-writer.c later performs memalign due to O_DIRECT, but this is
safe to do with or without O_DIRECT.
Ideally, this should be fixed in upstream Proxmox: Perhaps by falling
back to open without O_DIRECT.
Another attempt to fix this SIGABRT is [2], which writes the vma file
directory to $out/ folder -- however that may still be tmpfs mounted
which it is in our case.
[1] https://lore.kernel.org/lkml/45A29EC2.8020502@tmr.com/t/
[2] https://github.com/NixOS/nixpkgs/pull/224282
Diffstat (limited to 'pkgs/development/python-modules/python-mapnik/python-mapnik_std_optional.patch')
0 files changed, 0 insertions, 0 deletions
