system service remains active if daemon fails

Bug #1916641 reported by Gerard Weatherby
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
cachefilesd (Ubuntu)
New
Undecided
Unassigned

Bug Description

Attempting to start the cachefiles service when /etc/default/cachefilesd has #RUN=yes commented out:

systemctl start cachefilesd.service

Leaves service "active" even though the daemon fails:

systemctl status cachefilesd.service
● cachefilesd.service - LSB: CacheFiles daemon
   Loaded: loaded (/etc/init.d/cachefilesd; generated)
   Active: active (exited) since Tue 2021-02-23 13:24:57 EST; 1min 15s ago
     Docs: man:systemd-sysv-generator(8)
  Process: 26346 ExecStop=/etc/init.d/cachefilesd stop (code=exited, status=0/SUCCESS)
  Process: 26360 ExecStart=/etc/init.d/cachefilesd start (code=exited, status=0/SUCCESS)

Feb 23 13:24:57 gerarddaily systemd[1]: Starting LSB: CacheFiles daemon...
Feb 23 13:24:57 gerarddaily cachefilesd[26360]: * cachefilesd disabled, please set RUN=yes in /etc/default/cachefilesd
Feb 23 13:24:57 gerarddaily systemd[1]: Started LSB: CacheFiles daemon.
Feb 23 13:25:53 gerarddaily cachefilesd[26273]: Daemon Terminated

This leads systemd to ignore future "start" commands even after then problem is fixed. Systemd services typically report a failure, not "Success" when their daemon fails to start.

Work around: manually stopping and then starting service, or systemctl restart cachefilesd restarts the service.

 lsb_release -rd
Description: Ubuntu 18.04.5 LTS
Release: 18.04

apt-cache policy cachefilesd
cachefilesd:
  Installed: 0.10.10-0.1ubuntu0.18.04.1
  Candidate: 0.10.10-0.1ubuntu0.18.04.1
  Version table:
 *** 0.10.10-0.1ubuntu0.18.04.1 500
        500 http://us.archive.ubuntu.com/ubuntu bionic-updates/universe amd64 Packages
        100 /var/lib/dpkg/status
     0.10.10-0.1 500
        500 http://us.archive.ubuntu.com/ubuntu bionic/universe amd64 Packages

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.