Skip to content
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

[20.03] nixos/initrd-network: always run postCommands #81744

Merged
merged 2 commits into from Mar 11, 2020

Conversation

Ma27
Copy link
Member

@Ma27 Ma27 commented Mar 4, 2020

Motivation for this change

Please note that fffd09d was needed to fix the initrd-network-ssh-test on release-20.03 which is why I filed a PR.


The backport of this patch has been requested in #79532[1]. The diff is
slightly off the original commit since some changes from
ea7d024 were needed, however this
commit shouldn't be backported as it potentially breaks existing setups.

[1] #79532 (comment)

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

fpletz and others added 2 commits March 4, 2020 18:31
As outlined in NixOS#71447, postCommands should always be run if networking
in initrd is enabled. regardless if the configuration actually
succeeded.

(cherry picked from commit 5897899)

The backport of this patch has been requested in NixOS#79532[1]. The diff is
slightly off the original commit since some changes from
ea7d024 were needed, however this
commit shouldn't be backported as it potentially breaks existing setups.

[1] NixOS#79532 (comment)
It seems as it takes a moment until the initrd-network is loaded. Please
note that this is currently only reproducible on release-20.03.
@mweinelt
Copy link
Member

mweinelt commented Mar 4, 2020

One could write code to boot.initrd.preLVMCommands and it will always be executed after networks is up or failed.

That would not really be intuitive, as you would now have to know the order in which things are executed in the initrd. 😐

@Ma27
Copy link
Member Author

Ma27 commented Mar 11, 2020

Doesn't it make postCommands useless because it starts duplicating boot.initrd.preLVMCommands

I generally agree with you, but this is a backport PR with a bugfix and I don't think we should delay this backport (of already reviewed code) because of that.

It's IMHO better to fix this on master first :)

@Ma27 Ma27 merged commit 1937173 into NixOS:release-20.03 Mar 11, 2020
@Ma27 Ma27 deleted the backport-remaining-initrd-fix branch March 11, 2020 20:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants