View Issue Details

IDProjectCategoryView StatusLast Update
0000042bareos-coreinstaller / packagespublic2013-01-29 13:17
Reportermaik Assigned To 
PrioritynormalSeveritymajorReproducibilityhave not tried
Status closedResolutionfixed 
PlatformLinuxOSFedoraOS Version18
Summary0000042: bareos-fd does not start on fedora 18
Description[root@fedora18fresh sysconfig]# service bareos-fd start
Starting bareos-fd (via systemctl): Failed to issue method call: Unit var-run.mount failed to load: No such file or directory. See system logs and 'systemctl status var-run.mount' for details.
                                                           [FEHLGESCHLAGEN]
#
[root@fedora18fresh ~]# systemctl status var-run.mount
var-run.mount
          Loaded: error (Reason: No such file or directory)
          Active: inactive (dead)

[root@fedora18fresh ~]# ll /var/lib/bareos/
insgesamt 0
TagsNo tags attached.

Activities

maik

maik

2013-01-24 18:17

administrator   ~0000050

selinux is turned off (permissive)
stephand

stephand

2013-01-25 12:40

developer   ~0000051

This error results from the systemd unit file
/usr/lib/systemd/system/bareos-fd.service

It contains the lines:
Requires=var-run.mount nss-lookup.target network.target remote-fs.target syslog.target time-sync.target
After=var-run.mount nss-lookup.target network.target remote-fs.target syslog.target time-sync.target

Since Fedora 17 the systemd unit var-run.mount was dropped, /var/run is now a symlink to /run. It was a bind-mount before (<= F16) which was done by the unit var-run.mount. (see https://bugzilla.redhat.com/show_bug.cgi?id=825466)

As Fedora 16 is EOL, we should remove var-run.mount from the systemd unit file:

--- /tmp/bareos-fd.service.orig 2013-01-25 12:16:30.648723718 +0100
+++ /usr/lib/systemd/system/bareos-fd.service 2013-01-25 12:16:48.762723872 +0100
@@ -13,8 +13,8 @@
 #
 [Unit]
 Description=Bareos File Daemon service
-Requires=var-run.mount nss-lookup.target network.target remote-fs.target syslog.target time-sync.target
-After=var-run.mount nss-lookup.target network.target remote-fs.target syslog.target time-sync.target
+Requires=nss-lookup.target network.target remote-fs.target syslog.target time-sync.target
+After=nss-lookup.target network.target remote-fs.target syslog.target time-sync.target
 # Wants=
 # Before=
 # Conflicts=
maik

maik

2013-01-25 13:21

administrator   ~0000052

Tested the f17 packages: bareos-fd starts there, no need to action here.

 Modification shall only take affect for fedora >= 18.
mvwieringen

mvwieringen

2013-01-25 16:44

developer   ~0000054

Keep in mind that generic systemd files are used from platforms/systemd so you
should only change those on Fedora 18 probably with a sed in either the rpm or
in the specfile for that specific platform.
stephand

stephand

2013-01-26 14:01

developer   ~0000056

The test on f17 obviously only worked because the test system is not updated. The recent version of the systemd packaged does not have the var-run.mount unit:

[stephand@t420 17]$ rpm -qpl systemd-44-8.fc17.x86_64.rpm | fgrep var-run.mount
/usr/lib/systemd/system/local-fs.target.wants/var-run.mount
/usr/lib/systemd/system/var-run.mount
[stephand@t420 17]$
[stephand@t420 17]$ rpm -qpl systemd-44-23.fc17.x86_64.rpm | fgrep var-run.mount
[stephand@t420 17]$

then it does not work:

[root@f17tst01 ~]# rpm -q systemd
systemd-44-23.fc17.x86_64
[root@f17tst01 ~]# rpm -q bareos-fd
bareos-fd-12.4.0-71.1.x86_64
[root@f17tst01 ~]# /etc/init.d/bareos-fd start
Starting bareos-fd (via systemctl): Failed to issue method call: Unit var-run.mount failed to load: No such file or directory. See system logs and 'systemctl status var-run.mount' for details.
                                                           [FAILED]

So this should be fixed for fedora >= 17 and also for the other unit files bareos-sd.service and bareos-dir.service

openSUSE keeps having var-run.mount unit, even the latest factory systemd package has it.

This should be fixed at rpm build time. Fixing with sed in a rpm post-install script is not a good idea as this will lead to showing the files as changed with rpm --verify.

Although I don't know much about systemd, I dare to say we should get rid of the "Requires" line if possible because https://fedoraproject.org/wiki/Packaging:Systemd?rd=Packaging:Guidelines:Systemd suggests to avoid "Requires" if it is not really necesary.

I Could not find that for openSUSE, but they also refer to the Fedora Guidelines, and common packages on openSUSE don't have "Requires".
mvwieringen

mvwieringen

2013-01-26 14:40

developer   ~0000057

Maybe import systemd files from http://pkgs.fedoraproject.org/gitweb/?p=bacula.git;a=tree which is the fedora repo if that also works on Suse.
maik

maik

2013-01-28 09:15

administrator   ~0000059

Stephan is right:

On an updated f17 the client fails, too.

I've run the intergration test after a
yum -y update

It shows the same behavior as on f18:
/etc/init.d/bareos-fd status

Failed to issue method call: Unit var-run.mount failed to load: No such file or directory. See system logs and 'systemctl status var-run.mount' for details.

--------- starting services ----------
Starting bareos-fd (via systemctl): [FEHLGESCHLAGEN]

---- service status ---
bareos-fd.service - Bareos File Daemon service
      Loaded: loaded (/usr/lib/systemd/system/bareos-fd.service; disabled)
      Active: inactive (dead)
      CGroup: name=systemd:/system/bareos-fd.service

[SSH] exit-status: 3
mvwieringen

mvwieringen

2013-01-29 13:03

developer   ~0000062

As we write the pidfile to /var/lib/bacula there is no reason to have the dependency on the var-run.mount target so I will remove it.

Issue History

Date Modified Username Field Change
2013-01-24 18:07 maik New Issue
2013-01-24 18:17 maik Note Added: 0000050
2013-01-25 12:40 stephand Note Added: 0000051
2013-01-25 13:21 maik Note Added: 0000052
2013-01-25 16:44 mvwieringen Note Added: 0000054
2013-01-26 14:01 stephand Note Added: 0000056
2013-01-26 14:40 mvwieringen Note Added: 0000057
2013-01-28 09:15 maik Note Added: 0000059
2013-01-29 13:01 mvwieringen Assigned To => mvwieringen
2013-01-29 13:01 mvwieringen Status new => assigned
2013-01-29 13:03 mvwieringen Note Added: 0000062
2013-01-29 13:15 mvwieringen Target Version => 12.4.0
2013-01-29 13:15 mvwieringen Fixed in Version => 12.4.0
2013-01-29 13:15 mvwieringen Assigned To mvwieringen =>
2013-01-29 13:15 mvwieringen Resolution open => fixed
2013-01-29 13:16 mvwieringen Status assigned => closed
2013-01-29 13:16 mvwieringen Assigned To => mvwieringen
2013-01-29 13:17 mvwieringen Assigned To mvwieringen =>