New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
transient failure in nixos installer tests: swap.target unit fails to start #5193
Comments
It actually has nothing to do with btrfs, and all to do with the swap startup unit failing. This happens for all of the installer tests somewhat randomly. I have absolutely no idea why swap would sometimes not come up at boot. From what I can tell, it looks like it is trying to mount the swap partition before the device is available. |
Yup.
|
This is caused by an ordering issues with the systemd autogenerate swap mountpoints. If the systemd autogenerate swap mount preceeds the fstab swap entry at boot it will cause the fstab entry to fail which breaks booting of the system and causes this transient failure. My current idea for a workaround is to simply disable autogeneration of swap devices by nixos-generate-config and let the automounter in systemd do its thing. However, this doesn't fix the case where a user specifies a device and it gets preempted by systemd. There should be a way to enforce a specific ordering where all of the user defined swap mountpoints come before systemd tries to automount swaps. |
Ordering can be achieved by writing systemd units instead of fstab entries. If we want to keep fstab entries, a possibility is to force the override of units when specifying systemd units in the nixos configuration. That way, fstab entry remains as is, and the systemd override only specifies orderings. |
The problem is, there is no specific service / mount which you can order against since the generator is called directly by init and the mount definitions are autogenerated at runtime. |
@wkennington you can override in |
@lethalman This is actually a bug in systemd so I'm going to work with upstream to fix it. |
Example: http://hydra.nixos.org/build/17640976/log/tail-reload
cc @wkennington
The text was updated successfully, but these errors were encountered: