Merged
Conversation
Member
Author
|
@GrahamcOfBorg build mdadm |
edolstra
reviewed
Jul 25, 2019
Member
edolstra
left a comment
There was a problem hiding this comment.
Looks good, though I'm not sure if we need a separate systemd.shutdownPackages option. We could also just use any shutdown programs in systemd.packages.
Member
Author
|
@edolstra I think so too but we already have |
Member
Author
|
Tested on Intel MSM array, before the patch a reboot was practically guaranteed to start a resync. After the patch and four reboots no more resyncs. I think this is ready. |
Member
Author
|
This is ready with some cosmetic changes. I also removed |
Mic92
reviewed
Jul 30, 2019
Mic92
reviewed
Jul 30, 2019
Shutdown hooks are executed right before the shutdown, which is useful for some applications. Among other things this is needed for mdadm hook to run.
We also correct paths in udev rules. This is cleaner and allows for less unexpected behaviour. We still check for self-references, however we do it manually now and only for binaries as udev rules can have them. Rather, we patch them out during initrd generation now.
We don't patch basename and readlink now too as they were added for mdadm in 8ecd3a5.
This fixes a serious bug on NixOS with swraid where mdadm arrays weren't properly stopped on shutdown. Rather than fixing the unit by adding `Before=final.target` we completely move to upstream units, which uses systemd shutdown hooks instead. This also drives down maintenance costs for us.
Use systemd.packages instead, it's less error prone and more in line with what's expected.
Member
Author
|
@Mic92 All fixed, thanks! @GrahamcOfBorg build systemd mdadm |
flokli
reviewed
Aug 19, 2019
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation for this change
Fix RAID1 rebuild on each reboot.
Things done
sandboxinnix.confon non-NixOS)nix-shell -p nix-review --run "nix-review wip"./result/bin/)nix path-info -Sbefore and after)[WIP] because I still need to test it better. I don't have good ideas for automated testing for now.