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

nixos/systemd.nix: don’t require online for multi-user.target #86484

Conversation

flokli
Copy link
Contributor

@flokli flokli commented May 1, 2020

Second attempt of #86273.

Original revert message:

    Revert "nixos/systemd.nix: don’t require online for multi-user.target"
    
    This reverts commit 764c8203b833176d546395a5c1adf193a9ca73f8.
    
    While this is desireable in principle, some of our modules and services
    fail during service startup if no network is available don't currently
    properly set Wants=network-online.target.
    
    If nothing pulls in this target anymore, systemd won't try to reach it.
    
    We have many VM tests waiting for `network-online.target`, and after
    764c8203b833176d546395a5c1adf193a9ca73f8 fail with the following error
    message:
    
    ```
    error: unit "network-online.target" is inactive and there are no pending jobs
    ```
    
    Most likely, test scripts shouldn't wait for `network-online.target` in
    first place (as `network-online.target` says nothing about whether a
    service has been started), but instead, the script should wait for the
    network ports of the corresponding service to be open.
    
    Let's revert this for now, and re-apply in a draft PR, fixing the tests
    before merging it back in.

This re-applies the original commit, but fixing some of the VM tests and modules afterwards.

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.

…r.target""

This reverts commit 15d761a.
This undoes the revert of 764c820,
fixing the VM tests afterwards.
@Mic92
Copy link
Member

Mic92 commented Jul 24, 2020

Which modules are affected? As a quick fix all the tests could re-introduce this dependency in their own configuration.

@flokli
Copy link
Contributor Author

flokli commented Jul 29, 2020

Yeah, this might be an option, but I currently lack the time to do this.

@flokli flokli closed this Jul 29, 2020
@gloaming
Copy link
Contributor

gloaming commented Aug 6, 2020

I've posted a comment at #86273 (comment)

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