nut-driver systemd service incorrect

Bug #1979862 reported by asdasda
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
nut (Ubuntu)
Expired
Undecided
Unassigned

Bug Description

Upgraded to 22.04 from 20.04

```
$ cat /lib/systemd/system/nut-driver.service
[Unit]
Description=Network UPS Tools - power device driver controller
After=local-fs.target network.target systemd-udev-settle.service
Wants=systemd-udev-settle.service
StopWhenUnneeded=yes

[Service]
ExecStart=/sbin/upsdrvctl start
ExecStop=/sbin/upsdrvctl stop
Type=forking
```

It hangs on start for 2 minutes now and logs say:
udevadm[1423]: systemd-udev-settle.service is deprecated. Please fix nut-driver.service not to pull it in.
I've checked source and there's no 'Wants' line there
https://git.launchpad.net/ubuntu/+source/nut/tree/scripts/systemd/nut-driver.service.in?h=ubuntu/jammy

Revision history for this message
Paride Legovini (paride) wrote :

Hello asdasda and thanks for this bug report. You don't see a Wants= line in nut-driver.service.in because that's added using a quilt patch, see [1]. However I don't think that's the reason why you are seeing the 2 minute delay this bug report is about.

I tried to reproduce the problem in a Jammy LXD VM by installing nut and rebooting the system, but I didn't incur in the delay. However I had no UPS definition, so the service simply failed to start very quickly.

What we need here in order to confirm this is a bug in Ubuntu and begin working on it is a minimal set of steps to reproduce the issue from a clean Ubuntu system. This could be an LXD VM you can start with

  lxc launch ubuntu:jammy --vm
  [wait]
  lxc exec <vm name> bash

(An LXD container is not enough as the package needs to interact with /sys).

As we need more information to move this forward I'm going to set this bug report as Incomplete for now.

[1] https://git.launchpad.net/ubuntu/+source/nut/tree/debian/patches/0004-fix-systemd-service.patch?h=ubuntu/jammy

Changed in nut (Ubuntu):
status: New → Incomplete
Revision history for this message
asdasda (kinnaman) wrote (last edit ):

Hello, Paride.
I will be able to check on my system in about 3 weeks only.

But for now I can say that I had that 2 minute hang until I've manually commented out that Wants line. Without it, everything boots fast (as it was on 20.04 before).

Revision history for this message
Lucas Kanashiro (lucaskanashiro) wrote :

It will make easier to move with this discussion once we have the detailed steps to reproduce the bug as Paride requested. Let's wait until you have time to provide it.

Revision history for this message
asdasda (kinnaman) wrote :

The bug probably is invalid and should be closed.

In my case, the delay happens when systemd-udev-settle.service is ran on boot:
my UPS (powercom raptor 1000) is constantly connected and then almost immediately disconnected several times from USB bus. Hence the delay.

Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for nut (Ubuntu) because there has been no activity for 60 days.]

Changed in nut (Ubuntu):
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.