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-rebuild switch produces warnings about systemd-udev-settle service #21954

Closed
bennofs opened this issue Jan 17, 2017 · 9 comments · Fixed by #53446
Closed

nixos-rebuild switch produces warnings about systemd-udev-settle service #21954

bennofs opened this issue Jan 17, 2017 · 9 comments · Fixed by #53446
Labels
0.kind: bug Something is broken 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS

Comments

@bennofs
Copy link
Contributor

bennofs commented Jan 17, 2017

Issue description

When running nixos-rebuild switch, sometimes systemd-udev-settle fails to start with an error message:

$ systemctl status systemd-udev-settle
● systemd-udev-settle.service - udev Wait for Complete Device Initialization
   Loaded: loaded (/nix/store/qzvya9kh5wh3bkcryd3g14xax48i1klc-systemd-231/example/systemd/system/systemd-udev-settle.s
   Active: failed (Result: exit-code) since Tue 2017-01-17 17:35:55 CET; 53min ago
     Docs: man:udev(7)
           man:systemd-udevd.service(8)
  Process: 3392 ExecStart=/nix/store/qzvya9kh5wh3bkcryd3g14xax48i1klc-systemd-231/bin/udevadm settle (code=exited, stat
 Main PID: 3392 (code=exited, status=1/FAILURE)

Jan 17 17:33:54 c-cube systemd[1]: Starting udev Wait for Complete Device Initialization...
Jan 17 17:35:55 c-cube systemd[1]: systemd-udev-settle.service: Main process exited, code=exited, status=1/FAILURE
Jan 17 17:35:55 c-cube systemd[1]: Failed to start udev Wait for Complete Device Initialization.
Jan 17 17:35:55 c-cube systemd[1]: systemd-udev-settle.service: Unit entered failed state.
Jan 17 17:35:55 c-cube systemd[1]: systemd-udev-settle.service: Failed with result 'exit-code'.

Steps to reproduce

Run nixos-rebuild switch

Technical details

  • System: NixOS: 17.03.git.f673243aff (Gorilla)
  • Nix version: nix-env (Nix) 1.11.5
  • Nixpkgs version: 17.03.git.f673243aff
@bennofs bennofs added 0.kind: bug Something is broken 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS labels Jan 17, 2017
@Mic92
Copy link
Member

Mic92 commented Jan 17, 2017

I can confirm this issue. It also delays restarting of other units (probably dependent services) after upgrade.

I do:

$ systemctl stop systemd-udev-settle.service

as a workaround when this happens, so that the other services can restart faster.
It only happens on my physical machine. My v-server never had this problem.

@ocharles
Copy link
Contributor

Can confirm this is still happens on 17.09 (just happened right now, and has been happening on every single switch).

@Mic92
Copy link
Member

Mic92 commented Nov 15, 2017

My workaround is to use:

systemd.service.systemd-udev-settle.serviceConfig.ExecStart = "${pkgs.coreutils}/bin/true";

@qrilka
Copy link
Contributor

qrilka commented Feb 23, 2018

@Mic92 how do you specify that? I get:

error: The option `systemd.service' defined in `/etc/nixos/configuration.nix' does not exist.

@Mic92
Copy link
Member

Mic92 commented Feb 23, 2018

there was a typo:
UPDATE 2: One also need to make it a list to override!

- systemd.service.systemd-udev-settle.serviceConfig.ExecStart = "${pkgs.coreutils}/bin/true";
+ systemd.services.systemd-udev-settle.serviceConfig.ExecStart = ["" "${pkgs.coreutils}/bin/true"];

@chrissound
Copy link

The solution posted above #21954 (comment) no longer seems to work after upgrading to 18.09 - has anyone else solved this in a different way?

@chrissound
Copy link

Ran into this issue when I didn't have the EFI boot partition mounted while rebuilding. I think I was starting up an old nixos configuration. Seems to work fine now.

@Mic92
Copy link
Member

Mic92 commented Jan 5, 2019

@chrissound I forgot to make it a list. The empty string makes systemd first resets the option so it can be overriden afterwards.

Mic92 added a commit to Mic92/nixpkgs that referenced this issue Jan 5, 2019
The idea is that we only need this target during boot,
however there is no point on restarting it on every upgrade.

This hopefully fixes NixOS#21954
@Mic92
Copy link
Member

Mic92 commented Jan 5, 2019

A potential fix is also here:
#53446

I want to test this option a bit for myself first.

Mic92 added a commit to Mic92/nixpkgs that referenced this issue Jan 8, 2019
The idea is that we only need this target during boot,
however there is no point on restarting it on every upgrade.

This hopefully fixes NixOS#21954

(cherry picked from commit 0a2c8cc)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.kind: bug Something is broken 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants