Bug#765345: is not able to enable a service on one system

Martin Steigerwald ms at teamix.de
Tue Oct 14 11:48:47 BST 2014


Package: systemd
Version: 215-5+b1
Severity: normal

I try to enable atop service on a system, but it does not work like this:

merkaba:~> systemctl daemon-reload
merkaba:~> systemctl status atop
● atop.service - advanced system & process monitor
   Loaded: loaded (/lib/systemd/system/atop.service; disabled)
   Active: active (running) since Di 2014-10-14 12:34:18 CEST; 5min ago
     Docs: man:atop(1)
 Main PID: 17082 (atop)
   CGroup: /system.slice/atop.service
           └─17082 /usr/bin/atop -a -R -w /var/log/atop/atop_20141014 600

Okt 14 12:34:18 merkaba systemd[1]: Started advanced system & process monitor.
merkaba:~> systemctl enable atop
Synchronizing state for atop.service with sysvinit using update-rc.d...
Executing /usr/sbin/update-rc.d atop defaults
Executing /usr/sbin/update-rc.d atop enable
Failed to execute operation: Invalid argument
merkaba:~#1> systemctl status atop
● atop.service - advanced system & process monitor
   Loaded: loaded (/lib/systemd/system/atop.service; disabled)
   Active: active (running) since Di 2014-10-14 12:34:18 CEST; 5min ago
     Docs: man:atop(1)
 Main PID: 17082 (atop)
   CGroup: /system.slice/atop.service
           └─17082 /usr/bin/atop -a -R -w /var/log/atop/atop_20141014 600

Okt 14 12:34:18 merkaba systemd[1]: Started advanced system & process monitor.


[Unit]
Description=advanced system & process monitor
Documentation=man:atop(1)
Wants=atopacct.service

[Service]
ExecStart=/bin/sh -c 'exec /usr/bin/atop -a -R -w /var/log/atop/atop_$(date +%%Y%%m%%d) 600'
SuccessExitStatus=15

[Install]
WantedBy=multi-user.target


Is from atop 2.1 debian packaging currently as work in progress:

https://github.com/teamix/atop-debian


On another system with identical service file it works however:

mango:~# systemctl daemon-reload
mango:~# systemctl disable atop
Synchronizing state for atop.service with sysvinit using update-rc.d...
Executing /usr/sbin/update-rc.d atop defaults
Executing /usr/sbin/update-rc.d atop disable
insserv: warning: current start runlevel(s) (empty) of script `atop' overrides LSB defaults (2 3 4 5).
insserv: warning: current stop runlevel(s) (0 1 2 3 4 5 6) of script `atop' overrides LSB defaults (0 1 6).
mango:~# systemctl status atop
● atop.service - advanced system & process monitor
   Loaded: loaded (/lib/systemd/system/atop.service; disabled)
   Active: active (running) since Di 2014-10-14 12:33:58 CEST; 9min ago
     Docs: man:atop(1)
 Main PID: 30286 (atop)
   CGroup: /system.slice/atop.service
           └─30286 /usr/bin/atop -a -R -w /var/log/atop/atop_20141014 600

Okt 14 12:33:58 mango systemd[1]: Started advanced system & process monitor.
mango:~# systemctl enable atop
Synchronizing state for atop.service with sysvinit using update-rc.d...
Executing /usr/sbin/update-rc.d atop defaults
insserv: warning: current start runlevel(s) (empty) of script `atop' overrides LSB defaults (2 3 4 5).
insserv: warning: current stop runlevel(s) (0 1 2 3 4 5 6) of script `atop' overrides LSB defaults (0 1 6).
Executing /usr/sbin/update-rc.d atop enable

mango:~# cat /lib/systemd/system/atop.service 
[Unit]
Description=advanced system & process monitor
Documentation=man:atop(1)
Wants=atopacct.service

[Service]
ExecStart=/bin/sh -c 'exec /usr/bin/atop -a -R -w /var/log/atop/atop_$(date +%%Y%%m%%d) 600'
SuccessExitStatus=15

[Install]
WantedBy=multi-user.target


I will add both failing and working strace.

Thanks,
Martin

-- Package-specific info:

-- System Information:
Debian Release: jessie/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (200, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.17.0-tp520 (SMP w/4 CPU cores; PREEMPT)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages systemd depends on:
ii  acl             2.2.52-2
ii  adduser         3.113+nmu3
ii  initscripts     2.88dsf-53.4
ii  libacl1         2.2.52-2
ii  libaudit1       1:2.4-1
ii  libblkid1       2.25.1-4
ii  libc6           2.19-11
ii  libcap2         1:2.24-6
ii  libcap2-bin     1:2.24-6
ii  libcryptsetup4  2:1.6.6-2
ii  libgcrypt20     1.6.2-4
ii  libkmod2        18-3
ii  liblzma5        5.1.1alpha+20120614-2
ii  libpam0g        1.1.8-3.1
ii  libselinux1     2.3-2
ii  libsystemd0     215-5+b1
ii  sysv-rc         2.88dsf-53.4
ii  udev            215-5+b1
ii  util-linux      2.25.1-4

Versions of packages systemd recommends:
ii  dbus            1.8.8-2
ii  libpam-systemd  215-5+b1

Versions of packages systemd suggests:
pn  systemd-ui  <none>

-- no debconf information
-------------- next part --------------
A non-text attachment was scrubbed...
Name: strace-failing.txt.xz
Type: application/x-xz
Size: 7904 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-systemd-maintainers/attachments/20141014/f61a872b/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: strace-successful.txt.xz
Type: application/x-xz
Size: 14240 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-systemd-maintainers/attachments/20141014/f61a872b/attachment-0003.bin>


More information about the Pkg-systemd-maintainers mailing list