NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
17.7k stars 13.84k forks source link

libvirt: should delay libvirtd service? #227636

Open RMTT opened 1 year ago

RMTT commented 1 year ago

Describe the bug

When libvirtd started, there are some errors in the log:

Apr 22 23:06:51 mtspc .libvirtd-wrapp[2021]: internal error: Missing udev property 'ID_VENDOR_ID' on '1-5.4'
Apr 22 23:06:51 mtspc .libvirtd-wrapp[2021]: internal error: Missing udev property 'ID_VENDOR_ID' on '1-6'
Apr 22 23:06:51 mtspc .libvirtd-wrapp[2021]: internal error: Missing udev property 'ID_VENDOR_ID' on '1-6.2'
Apr 22 23:06:51 mtspc .libvirtd-wrapp[2021]: internal error: Missing udev property 'ID_VENDOR_ID' on 'usb2'
Apr 22 23:06:51 mtspc .libvirtd-wrapp[2021]: internal error: Missing udev property 'ID_VENDOR_ID' on 'usb3'
Apr 22 23:06:51 mtspc .libvirtd-wrapp[2021]: internal error: Missing udev property 'ID_VENDOR_ID' on '3-5'

This is because libvirtd started before systemd collected USB infos, reference: https://bugzilla.opensuse.org/show_bug.cgi?id=1187555

Steps To Reproduce

Steps to reproduce the behavior:

  1. enable libvirtd: virtualisation.libvirtd = { enable = true; };

Expected behavior

No above errors when libvirtd launched.

Notify maintainers

@fpletz @globin @lovesegfault

Metadata

Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.

[user@system:~]$ nix-shell -p nix-info --run "nix-info -m"
 - system: `"x86_64-linux"`
 - host os: `Linux 6.2.11-zen1, NixOS, 23.05 (Stoat), 23.05.20230419.645bc49`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.13.3`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`
aktaboot commented 1 year ago

I wonder if we can put it After=multi-user.target without having a dependency loop