You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I recently experienced a critical failure of my system to properly boot due to 1 improper setting in Syncthing. Boot to no network access, and unable to connect with ssh. Mass OOM errors and unusable system. This was due to the setting service.syncthing.dataDir being a dangling symlink AND the handling of that link by the Stage 2 Perl script (update-users-groups.pl) responsible for creating home directories. I guess my hope is to see the Perl script be more resilient. ❤️
[WARNING: Failure on home directory: mkdir /mnt/syncs: file exists](stage-2-init: mkdir /mnt/syncs: File exists at /nix/store/gx91fdp4a099jpfwdkbdw2imvl3lalsk-update-users-groups.pl line 229.
stage-2-init: Activation script snippet 'users' failed (17))
After the log entry above, an entire cascade of failures begins which prevents the system from properly booting. Link to full journald log at bottom.
Describe the bug
Setting a user home directory to a dangling symlink causes massive system failure. The setting services.syncthing.dataDir is used to set the home directory of user syncthing. On my system, the dataDir (my syncthing config & sync dirs) is a symlink to an external drive which may not be connected at boot time.
Link to where service.syncthing sets home directory.
Additional Context
My rootfs / is using an overlayfs with tmpfs, so this may compound the problems I'm having with OOM errors. I have not tested this issue on a traditional disk-only install.
Expected behavior
Even if a user home dir is a dangling symlink, I would like to see stage 2 complete without bringing the system to an inoperable state.
If the datadir (aka homedir) is on a disconnected external drive, or drive that has yet to be decrypted, then the entire system fails to properly load.
I recently experienced a critical failure of my system to properly boot due to 1 improper setting in Syncthing. Boot to no network access, and unable to connect with ssh. Mass OOM errors and unusable system. This was due to the setting service.syncthing.dataDir being a dangling symlink AND the handling of that link by the Stage 2 Perl script (update-users-groups.pl) responsible for creating home directories. I guess my hope is to see the Perl script be more resilient. ❤️
After the log entry above, an entire cascade of failures begins which prevents the system from properly booting. Link to full journald log at bottom.
Describe the bug
Setting a user home directory to a dangling symlink causes massive system failure. The setting
services.syncthing.dataDir
is used to set the home directory of usersyncthing
. On my system, the dataDir (my syncthing config & sync dirs) is a symlink to an external drive which may not be connected at boot time.Link to where service.syncthing sets home directory.
nixpkgs/nixos/modules/services/networking/syncthing.nix
Line 612 in 5fab052
Steps To Reproduce
services.syncthing = {
enable = true;
dataDir = "/path/to/dangling-symlink";
};
My rootfs / is using an overlayfs with tmpfs, so this may compound the problems I'm having with OOM errors. I have not tested this issue on a traditional disk-only install.
Expected behavior
Even if a user home dir is a dangling symlink, I would like to see stage 2 complete without bringing the system to an inoperable state.
Journald Log
Full Journald Log
https://gist.github.com/Sepero/c793f8cfa4b4924c453486fb65c82407
Work Around for Syncthing
The text was updated successfully, but these errors were encountered: