Package: dkms
Version: 3.2.0-1
Severity: important
X-Debbugs-Cc: [email protected] [email protected]

Dear Maintainer,

   * What led up to the situation?

After using a fresh Debian image with cloud-init[1] and installing dkms on it,
I rebooted the system.
After that, I looked through journal and noticed that dependency cycles
got introduced:
$ journalctl -o cat -b 0
[...]
sysinit.target: Found ordering cycle on cloud-init-network.service/start
sysinit.target: Found dependency on systemd-networkd-wait-online.service/start
sysinit.target: Found dependency on systemd-networkd.service/start
sysinit.target: Found dependency on network-pre.target/start
sysinit.target: Found dependency on dkms.service/start
sysinit.target: Found dependency on sysinit.target/start
sysinit.target: Job cloud-init-network.service/start deleted to break ordering 
cycle starting with sysinit.target/start
[...]

One thing of note for reproduction here is that the cloud-init datasource needs
to still be available after reboot so that the service actually runs. I'm only
mentioning this because I initially wanted to reproduce this with virt-install
but that detaches the data source after reboot.
Manually generating ISO disk and attaching it as described here should work
for reproducing:
https://cloudinit.readthedocs.io/en/latest/howto/launch_qemu.html

[1] Generic cloud variant from 
https://cloud.debian.org/images/cloud/trixie/daily/20250603-2132/

   * What exactly did you do (or not do) that was effective (or
     ineffective)?

I am not sure whether this is the correct action to solve this but one can add
DefaultDependencies=no to [Unit] section of 
/usr/lib/systemd/system/dkms.service.
Service file in the upstream doesn't have it and the service existed for a 
while,
it has only recently been introduced to Debian based distributions though[2].

[2] https://github.com/dell/dkms/commit/b39d8060ab548868517c2ae2f88ed549281616c3

   * What was the outcome of this action?

Adding DefaultDependencies=no to [Unit] section of
/usr/lib/systemd/system/dkms.service does seem to solve the dependency cycle
at least.

It is not entirely clear to me whether this is the right place to solve it,
perhaps this should belong to a bug tracker of the cloud-init package instead.

   * What outcome did you expect instead?

I expected installation of dkms package to not introduce service dependency
cycle in the system.

Kind regards,
Jakub Kuczys

-- System Information:
Debian Release: 13.0
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 6.12.27-cloud-amd64 (SMP w/2 CPU threads; PREEMPT)
Locale: LANG=C.UTF-8, LC_CTYPE=C.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages dkms depends on:
ii  build-essential  12.12
ii  dpkg-dev         1.22.19
ii  kmod             34.2-2
ii  lsb-release      12.1-1
ii  make             4.4.1-2
ii  patch            2.8-1

Versions of packages dkms recommends:
ii  fakeroot             1.37.1.1-1
ii  gcc [c-compiler]     4:14.2.0-1
ii  gcc-14 [c-compiler]  14.2.0-19
ii  sudo                 1.9.16p2-2

Versions of packages dkms suggests:
ii  e2fsprogs  1.47.2-1+b1
pn  menu       <none>
---------------------------------------------------------------------
Intel Technology Poland sp. z o.o.
ul. Slowackiego 173 | 80-298 Gdansk | Sad Rejonowy Gdansk Polnoc | VII Wydzial 
Gospodarczy Krajowego Rejestru Sadowego - KRS 101882 | NIP 957-07-52-316 | 
Kapital zakladowy 200.000 PLN.
Spolka oswiadcza, ze posiada status duzego przedsiebiorcy w rozumieniu ustawy z 
dnia 8 marca 2013 r. o przeciwdzialaniu nadmiernym opoznieniom w transakcjach 
handlowych.

Ta wiadomosc wraz z zalacznikami jest przeznaczona dla okreslonego adresata i 
moze zawierac informacje poufne. W razie przypadkowego otrzymania tej 
wiadomosci, prosimy o powiadomienie nadawcy oraz trwale jej usuniecie; 
jakiekolwiek przegladanie lub rozpowszechnianie jest zabronione.
This e-mail and any attachments may contain confidential material for the sole 
use of the intended recipient(s). If you are not the intended recipient, please 
contact the sender and delete all copies; any review or distribution by others 
is strictly prohibited.

Reply via email to