Package: debhelper
Version: 13.19
Severity: normal

Hey.

This may be related to #836317 (or the same than it), but AFAIU that is about
services and there wasn't a clear conclusion whether these should be stopped.

I have the following:
- a debian/rules with:
  ...
  override_dh_installsystemd:
        dh_installsystemd --no-enable --no-start --no-stop-on-upgrade
        dh_installsystemd --no-enable --no-start --no-stop-on-upgrade 
--name=prometheus-node-exporter-smartraid
- the following units in debian/
  
prometheus-node-exporter-collector-smartraid.prometheus-node-exporter-smartraid.service
  
prometheus-node-exporter-collector-smartraid.prometheus-node-exporter-smartraid.timer
  prometheus-smartraid-exporter.service
- two packages being built

As soon as I use --no-start, there no longer is a prerm with the following 
created:
  #!/bin/sh
  set -e
  # Automatically added by dh_installsystemd/13.19
  if [ -z "${DPKG_ROOT:-}" ] && [ "$1" = remove ] && [ -d /run/systemd/system ] 
; then
        deb-systemd-invoke stop 'prometheus-node-exporter-smartraid.service' 
'prometheus-node-exporter-smartraid.timer' >/dev/null || true
  fi
  # End automatically added section

This in turn causes the the timer to not be stopped before the units are being 
removed,
which in turn leads to a remnant of:
$ systemctl status prometheus-node-exporter-smartraid.timer
× prometheus-node-exporter-smartraid.timer
     Loaded: not-found (Reason: Unit prometheus-node-exporter-smartraid.timer 
not found.)
     Active: failed (Result: resources)
    Trigger: n/a

Aug 21 01:16:19 lcg-lrz-dc40 systemd[1]: Started 
prometheus-node-exporter-smartraid.timer - periodic SmartRAID metric collection 
for Prometheus node exporter’s textfile collector.
Aug 21 01:20:31 lcg-lrz-dc40 systemd[1]: 
prometheus-node-exporter-smartraid.timer: Unit to trigger vanished.
Aug 21 01:20:31 lcg-lrz-dc40 systemd[1]: 
prometheus-node-exporter-smartraid.timer: Failed with result 'resources'.

This is not only a bit annyoing (e.g. if one uses a global OnFailure= with mail 
notification
about failed units, one gets some false positive message), but it also doesn't 
clean up
automatically (requires systemctl reset-failed).

Even re-installing the package then "fails", in that the timer won't start 
again, even if one
does systemctl start prometheus-node-exporter-smartraid.timer (unless of course 
one resets
the failed ones first).


So it may be just wishlist for #836317, but I think it is a bug in this case

Thanks,
Chris.


-- System Information:
Debian Release: trixie/sid
  APT prefers unstable-debug
  APT policy: (500, 'unstable-debug'), (500, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 6.10.4-amd64 (SMP w/16 CPU threads; PREEMPT)
Locale: LANG=en_DE.UTF-8, LC_CTYPE=en_DE.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages debhelper depends on:
ii  autotools-dev            20220109.1
ii  dh-autoreconf            20
ii  dh-strip-nondeterminism  1.14.0-1
ii  dpkg                     1.22.11
ii  dpkg-dev                 1.22.11
ii  dwz                      0.15-1+b1
ii  file                     1:5.45-3
ii  libdebhelper-perl        13.19
ii  libdpkg-perl             1.22.11
ii  man-db                   2.12.1-3
ii  perl                     5.38.2-5
ii  po-debconf               1.0.21+nmu1

debhelper recommends no packages.

Versions of packages debhelper suggests:
pn  dh-make  <none>

-- no debconf information

Reply via email to