Garbage collector begins before /home is mounted, causing removal of all gcroots #79

Open
opened 2024-09-18 10:19:57 +02:00 by rarias · 0 comments
Owner

The nix-gc service in hut can start before /home is mounted, causing it to remove all gcroots as it is unable to find the symlink on disk:

Aug 06 17:51:24 hut nix-gc-start[1938]: finding garbage collector roots...
Aug 06 17:51:24 hut nix-gc-start[1938]: removing stale link from '/nix/var/nix/gcroots/auto/jyvv03wrwhdmrynji1c86g0ch0i8z7y4' to '/home/Computational/rarias/osumb/result-dev'
Aug 06 17:51:24 hut nix-gc-start[1938]: removing stale link from '/nix/var/nix/gcroots/auto/670xc3829ll75cbb8z5imaa71pz64frh' to '/home/Computational/rarias/riscv/nixos-riscv/result-initrd'
...
Aug 06 17:51:24 hut nix-gc-start[1938]: deleting garbage...
...
Aug 06 17:51:24 hut systemd[1]: home.mount: Directory /home to mount over is not empty, mounting anyway.
Aug 06 17:51:24 hut systemd[1]: Mounting /home...

We should enforce the nix-gc service has access to /home/Computational before it can start.

The nix-gc service in hut can start before /home is mounted, causing it to remove *all* gcroots as it is unable to find the symlink on disk: ``` Aug 06 17:51:24 hut nix-gc-start[1938]: finding garbage collector roots... Aug 06 17:51:24 hut nix-gc-start[1938]: removing stale link from '/nix/var/nix/gcroots/auto/jyvv03wrwhdmrynji1c86g0ch0i8z7y4' to '/home/Computational/rarias/osumb/result-dev' Aug 06 17:51:24 hut nix-gc-start[1938]: removing stale link from '/nix/var/nix/gcroots/auto/670xc3829ll75cbb8z5imaa71pz64frh' to '/home/Computational/rarias/riscv/nixos-riscv/result-initrd' ... Aug 06 17:51:24 hut nix-gc-start[1938]: deleting garbage... ... Aug 06 17:51:24 hut systemd[1]: home.mount: Directory /home to mount over is not empty, mounting anyway. Aug 06 17:51:24 hut systemd[1]: Mounting /home... ``` We should enforce the nix-gc service has access to /home/Computational *before* it can start.
rarias added the
nix
label 2024-09-18 10:19:57 +02:00
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: rarias/jungle#79
No description provided.