-
-
Notifications
You must be signed in to change notification settings - Fork 14.9k
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
NetworkManager-wait-online.service is broken #59603
Comments
The service was renamed to We don't modify |
Backport already would feel weird with #57938 |
Yeah, #51382 wasn't really tested sufficiently enough to backport it to 19.03. We could fix |
waiting for the network to be up with `network-online.target` will only work with a NixOS 18.09 build after this commit: <NixOS/nixpkgs@022eb6a> you have to build your own image from that, as currently the latest 18.09 release binary is more than two months older. the issue behind this is essentially inconsistent service names: <NixOS/nixpkgs#59603> here is how to build an image: <https://nixos.org/nixos/manual/index.html#sec-building-cd> this is what you get if you want to use immature software...
the general idea is described here: <https://www.freedesktop.org/wiki/Software/systemd/NetworkTarget/> unfortunately waiting for the network to be up with `network-online.target` will not work because of inconsistent service names: <NixOS/nixpkgs#59603> it will only work with a NixOS 18.09 build after this commit: <NixOS/nixpkgs@022eb6a> it seems that 19.03 still is not fixed in that regard: <NixOS/nixpkgs#59603> as we want the service to run immediately after bootstrapping (which is the whole point of this project), you have to build your own image, as currently the latest 18.09 release binary does not incorporate said patch. here is how to build an image: <https://nixos.org/nixos/manual/index.html#sec-building-cd> even more unfortunately the build will fail due to a deprecated kernel API used by ZFS, used for the NixOS minimal image: <NixOS/nixpkgs#60907> git clone https://github.com/NixOS/nixpkgs \ # fix is on 18.09, and the repository is huge --single-branch --branch release-18.09 --depth 200 cd nixpkgs # commit 44c66417f4e05f0a211735f024b58bdb9770108f # Author: Tim Steinbach <[email protected]> # Date: Thu May 2 13:19:13 2019 -0400 # # linux: 4.19.37 -> 4.19.38 # # (cherry picked from commit e0bf73dbde74e66167bd9ccf385a1fbc228c4036) git checkout 44c66417f4e05f0a211735f024b58bdb9770108f~1 cd nixpkgs/nixos nix-build -A config.system.build.isoImage \ -I nixos-config=modules/installer/cd-dvd/installation-cd-minimal.nix \ default.nix --max-jobs auto --cores $(nproc) this is what you get if you want to use immature software...
the general idea is described here: <https://www.freedesktop.org/wiki/Software/systemd/NetworkTarget/> unfortunately waiting for the network to be up with `network-online.target` will not work because of inconsistent service names: <NixOS/nixpkgs#59603> it will only work with a NixOS 18.09 build after this commit: <NixOS/nixpkgs@022eb6a> it seems that 19.03 still is not fixed in that regard: <NixOS/nixpkgs#59603> as we want the service to run immediately after bootstrapping (which is the whole point of this project), you have to build your own image, as currently the latest 18.09 release binary does not incorporate said patch. here is how to build an image: <https://nixos.org/nixos/manual/index.html#sec-building-cd> even more unfortunately the build will fail due to a deprecated kernel API used by ZFS, used for the NixOS minimal image: <NixOS/nixpkgs#60907> git clone https://github.com/NixOS/nixpkgs \ # fix is on 18.09, and the repository is huge --single-branch --branch release-18.09 --depth 200 # commit 44c66417f4e05f0a211735f024b58bdb9770108f # Author: Tim Steinbach <[email protected]> # Date: Thu May 2 13:19:13 2019 -0400 # # linux: 4.19.37 -> 4.19.38 # # (cherry picked from commit e0bf73dbde74e66167bd9ccf385a1fbc228c4036) git checkout 44c66417f4e05f0a211735f024b58bdb9770108f~1 cd nixpkgs/nixos nix-build -A config.system.build.isoImage \ -I nixos-config=nixpkgs/nixos/modules/installer/cd-dvd/installation-cd-minimal.nix \ nixpkgs/nixos/default.nix --max-jobs auto --cores $(nproc) this is what you get if you want to use immature software...
This is fixed on master: 4588661 If you cannot wait for this to get into a release, just add the same lines to your |
the general idea is described here: <https://www.freedesktop.org/wiki/Software/systemd/NetworkTarget/> unfortunately waiting for the network to be up with `network-online.target` will not work because of inconsistent service names: <NixOS/nixpkgs#59603> it seems that NixOS 19.03 still is not fixed in that regard: <NixOS/nixpkgs#59603> here one could just add these lines to the config as workaround: systemd.services.NetworkManager-wait-online = { wantedBy = [ "network-online.target" ]; }; on NixOS 18.09 it will only work after this commit: <NixOS/nixpkgs@022eb6a> as we want the service to run immediately after bootstrapping (which is the whole point of this project), you have to build your own image for that, as currently the latest 18.09 release binary does not incorporate above patch. here is how to build an image: <https://nixos.org/nixos/manual/index.html#sec-building-cd> even more unfortunately building `release-18.09` branch will fail due to a deprecated kernel API used by ZFS, used for the NixOS minimal image: <NixOS/nixpkgs#60907> git clone https://github.com/NixOS/nixpkgs \ # fix is on 18.09, and the repository is huge --single-branch --branch release-18.09 --depth 200 # commit 44c66417f4e05f0a211735f024b58bdb9770108f # Author: Tim Steinbach <[email protected]> # Date: Thu May 2 13:19:13 2019 -0400 # # linux: 4.19.37 -> 4.19.38 # # (cherry picked from commit e0bf73dbde74e66167bd9ccf385a1fbc228c4036) git checkout 44c66417f4e05f0a211735f024b58bdb9770108f~1 cd nixpkgs/nixos nix-build -A config.system.build.isoImage \ -I nixos-config=nixpkgs/nixos/modules/installer/cd-dvd/installation-cd-minimal.nix \ nixpkgs/nixos/default.nix --max-jobs auto --cores $(nproc) this is what you get if you want to use immature software...
the general idea is described here: <https://www.freedesktop.org/wiki/Software/systemd/NetworkTarget/> unfortunately waiting for the network to be up with `network-online.target` will not work because of inconsistent service names: <NixOS/nixpkgs#59603> it seems that NixOS 19.03 still is not fixed in that regard: <NixOS/nixpkgs#59603> on NixOS 18.09 it will only work after this commit: <NixOS/nixpkgs@022eb6a> as we want the service to run immediately after bootstrapping (which is the whole point of this project), you have to build your own image for that, as currently the latest 18.09 release binary does not incorporate above patch. here is how to build an image: <https://nixos.org/nixos/manual/index.html#sec-building-cd> even more unfortunately building `release-18.09` branch will fail due to a deprecated kernel API used by ZFS, used for the NixOS minimal image: <NixOS/nixpkgs#60907> git clone https://github.com/NixOS/nixpkgs \ # fix is on 18.09, and the repository is huge --single-branch --branch release-18.09 --depth 200 # commit 44c66417f4e05f0a211735f024b58bdb9770108f # Author: Tim Steinbach <[email protected]> # Date: Thu May 2 13:19:13 2019 -0400 # # linux: 4.19.37 -> 4.19.38 # # (cherry picked from commit e0bf73dbde74e66167bd9ccf385a1fbc228c4036) git checkout 44c66417f4e05f0a211735f024b58bdb9770108f~1 cd nixpkgs/nixos nix-build -A config.system.build.isoImage \ -I nixos-config=nixpkgs/nixos/modules/installer/cd-dvd/installation-cd-minimal.nix \ nixpkgs/nixos/default.nix --max-jobs auto --cores $(nproc) in both cases you have to add these lines to the config: systemd.services.NetworkManager-wait-online = { wantedBy = [ "network-online.target" ]; }; which corresponds to a patch on `master`: <NixOS/nixpkgs@4588661> this is what you get if you want to use immature software...
Thank you for the heads up! |
the general idea is described here: <https://www.freedesktop.org/wiki/Software/systemd/NetworkTarget/> note that all machines also need `network-manager` for this to work. otherwise the appropriate `systemd` unit `NetworkManager-wait-online.service` will be broken (even if it exists, which is really confusing). unfortunately waiting for the network to be up with `network-online.target` will not work because of inconsistent service names: <NixOS/nixpkgs#59603> it seems that NixOS 19.03 still is not fixed in that regard: <NixOS/nixpkgs#59603> on NixOS 18.09 it will only work after this commit: <NixOS/nixpkgs@022eb6a> as we want the service to run immediately after bootstrapping (which is the whole point of this project), you have to build your own image for that, as currently the latest 18.09 release binary does not incorporate above patch. here is how to build an image: <https://nixos.org/nixos/manual/index.html#sec-building-cd> even more unfortunately building `release-18.09` branch will fail due to a deprecated kernel API used by ZFS, used for the NixOS minimal image: <NixOS/nixpkgs#60907> git clone https://github.com/NixOS/nixpkgs \ # fix is on 18.09, and the repository is huge --single-branch --branch release-18.09 --depth 200 # commit 44c66417f4e05f0a211735f024b58bdb9770108f # Author: Tim Steinbach <[email protected]> # Date: Thu May 2 13:19:13 2019 -0400 # # linux: 4.19.37 -> 4.19.38 # # (cherry picked from commit e0bf73dbde74e66167bd9ccf385a1fbc228c4036) git checkout 44c66417f4e05f0a211735f024b58bdb9770108f~1 cd nixpkgs/nixos nix-build -A config.system.build.isoImage \ -I nixos-config=nixpkgs/nixos/modules/installer/cd-dvd/installation-cd-minimal.nix \ nixpkgs/nixos/default.nix --max-jobs auto --cores $(nproc) in both cases you have to add these lines to the config: systemd.services.NetworkManager-wait-online = { wantedBy = [ "network-online.target" ]; }; which corresponds to a patch on `master`: <NixOS/nixpkgs@4588661> this is what you get if you want to use immature software...
I've recently had some trouble with It turns out that NM was enabled by Gnome for me, so I didn't bother to enable it explicitly in my configuration.nix. After I added I know that is not strictly the topic of the OP, but the first google result for |
|
I think since about 22.11 my accidental fix in #59603 (comment) doesn't work anymore. |
the general idea is described here: <https://www.freedesktop.org/wiki/Software/systemd/NetworkTarget/> note that all machines also need `network-manager` for this to work. otherwise the appropriate `systemd` unit `NetworkManager-wait-online.service` will be broken (even if it exists, which is really confusing). unfortunately waiting for the network to be up with `network-online.target` will not work because of inconsistent service names: <NixOS/nixpkgs#59603> it seems that NixOS 19.03 still is not fixed in that regard: <NixOS/nixpkgs#59603> on NixOS 18.09 it will only work after this commit: <NixOS/nixpkgs@022eb6a> as we want the service to run immediately after bootstrapping (which is the whole point of this project), you have to build your own image for that, as currently the latest 18.09 release binary does not incorporate above patch. here is how to build an image: <https://nixos.org/nixos/manual/index.html#sec-building-cd> even more unfortunately building `release-18.09` branch will fail due to a deprecated kernel API used by ZFS, used for the NixOS minimal image: <NixOS/nixpkgs#60907> git clone https://github.com/NixOS/nixpkgs \ # fix is on 18.09, and the repository is huge --single-branch --branch release-18.09 --depth 200 # commit 44c66417f4e05f0a211735f024b58bdb9770108f # Author: Tim Steinbach <[email protected]> # Date: Thu May 2 13:19:13 2019 -0400 # # linux: 4.19.37 -> 4.19.38 # # (cherry picked from commit e0bf73dbde74e66167bd9ccf385a1fbc228c4036) git checkout 44c66417f4e05f0a211735f024b58bdb9770108f~1 cd nixpkgs/nixos nix-build -A config.system.build.isoImage \ -I nixos-config=nixpkgs/nixos/modules/installer/cd-dvd/installation-cd-minimal.nix \ nixpkgs/nixos/default.nix --max-jobs auto --cores $(nproc) in both cases you have to add these lines to the config: systemd.services.NetworkManager-wait-online = { wantedBy = [ "network-online.target" ]; }; which corresponds to a patch on `master`: <NixOS/nixpkgs@4588661> this is what you get if you want to use immature software...
Issue description
NetworkManager service has been renamed recently but it seems
NetworkManager-wait-online.service
hasn't been updated so it tries to usesNetworkManager.service
instead ofnetwork-manager.service
.Steps to reproduce
sudo systemctl start NetworkManager-wait-online.service
Technical details
The text was updated successfully, but these errors were encountered: