Package: bareos-filedaemon
Version: 17.2.7-2
Followup-For: Bug #884011

Dear Maintainer,

today I noticed that 2 processed "bareos-fd" were running:

# systemctl status \*bareos\*
● bareos-filedaemon.service - Bareos File Daemon service
   Loaded: loaded (/lib/systemd/system/bareos-filedaemon.service; enabled; 
vendor preset: enabled)
   Active: active (running) since Fri 2019-06-21 08:31:51 CEST; 8min ago
     Docs: man:bareos-fd(8)
  Process: 26049 ExecStart=/usr/sbin/bareos-fd (code=exited, status=0/SUCCESS)
 Main PID: 26050 (bareos-fd)
   Memory: 1.0M
   CGroup: /system.slice/bareos-filedaemon.service
           └─26050 /usr/sbin/bareos-fd

● bareos-fd.service - LSB: Bareos File Daemon
   Loaded: loaded (/etc/init.d/bareos-fd; generated)
   Active: active (running) since Fri 2019-06-21 07:31:46 CEST; 1h 8min ago
     Docs: man:systemd-sysv-generator(8)
   Memory: 1.8M
   CGroup: /system.slice/bareos-fd.service
           └─1614 /usr/sbin/bareos-fd
# lsof -p 1614
...
bareos-fd 1614 root    3u  IPv4  12240      0t0     TCP *:bacula-fd (LISTEN)
# lsof -p 26050
...
bareos-fd 26050 root    3u  sock    0,8      0t0  110552 protocol: TCP

Looking at the package I see the following:
# dpkg -L bareos-filedaemon
...
/etc/init.d/bareos-fd
...
/lib/systemd/system/bareos-filedaemon.service
...

# grep Alias /lib/systemd/system/bareos-filedaemon.service
Alias=bareos-fd.service

# find /etc/systemd /lib/systemd /run/systemd -name bareos-f\*
/etc/systemd/system/multi-user.target.wants/bareos-filedaemon.service
/lib/systemd/system/bareos-filedaemon.service
/run/systemd/generator.late/bareos-fd.service
/run/systemd/generator.late/graphical.target.wants/bareos-fd.service
/run/systemd/generator.late/multi-user.target.wants/bareos-fd.service

To me it looks like the "Alias" was not setup correctly. If I disable and then
re-enable the service, the newly created "bareos-fd.service" shadows the
generated service files from the legacy SysV init script, which hopefully will
prevent two daemons from running at the same time:

# systemctl disable bareos-filedaemon.service
Removed /etc/systemd/system/multi-user.target.wants/bareos-filedaemon.service.
# find /etc/systemd /lib/systemd /run/systemd -name bareos-f\*
/lib/systemd/system/bareos-filedaemon.service
/run/systemd/generator.late/bareos-fd.service
/run/systemd/generator.late/graphical.target.wants/bareos-fd.service
/run/systemd/generator.late/multi-user.target.wants/bareos-fd.service

# systemctl enable bareos-filedaemon.service
Created symlink /etc/systemd/system/bareos-fd.service → 
/lib/systemd/system/bareos-filedaemon.service.
Created symlink 
/etc/systemd/system/multi-user.target.wants/bareos-filedaemon.service → 
/lib/systemd/system/bareos-filedaemon.service.
# find /etc/systemd /lib/systemd /run/systemd -name bareos-f\*
/etc/systemd/system/bareos-fd.service
/etc/systemd/system/multi-user.target.wants/bareos-filedaemon.service
/lib/systemd/system/bareos-filedaemon.service



-- System Information:
Debian Release: 10.0
  APT prefers unstable
  APT policy: (990, 'unstable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 5.0.21 (SMP w/2 CPU cores; PREEMPT)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE, 
TAINT_UNSIGNED_MODULE
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8), 
LANGUAGE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages bareos-filedaemon depends on:
ii  adduser                3.118
ii  bareos-common          17.2.7-2
ii  debconf [debconf-2.0]  1.5.72
ii  libacl1                2.2.53-4
ii  libc6                  2.28-10
ii  libcap2                1:2.25-2
ii  libgcc1                1:8.3.0-7
ii  libgnutls30            3.6.7-4
ii  libjansson4            2.12-1
ii  liblzo2-2              2.10-0.1
ii  libstdc++6             8.3.0-7
ii  libwrap0               7.6.q-28
ii  lsb-base               10.2019051400
ii  lsof                   4.91+dfsg-1
ii  zlib1g                 1:1.2.11.dfsg-1

bareos-filedaemon recommends no packages.

bareos-filedaemon suggests no packages.

-- no debconf information

Reply via email to