Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 528398 - app-backup/bacula-7.0.5 - [/usr/lib64/tmpfiles.d/bacula.conf:2] Unknown user 'bacula'.
Summary: app-backup/bacula-7.0.5 - [/usr/lib64/tmpfiles.d/bacula.conf:2] Unknown user ...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Thomas Beierlein
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks: 529394
  Show dependency tree
 
Reported: 2014-11-05 21:49 UTC by Duane Griffin
Modified: 2015-02-26 11:03 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
ebuild patch that fixes the issues (fix-tmpfile-conf-issues.patch,947 bytes, patch)
2014-11-05 21:57 UTC, Duane Griffin
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Duane Griffin 2014-11-05 21:49:40 UTC
Bacula installs the systemd tmpfiles configuration file from the bacula package, but there are a couple of problems with it:
 * It specifies the @piddir@ as belonging to bacula:bacula, but the piddir is configured as being /var/run (which should obviously belong to root:root).
 * When installing with the bacula-clientonly USE-flag enabled the bacula user is not created so it then references a non-existent user.

The first problem causes the systemd-tmpfiles command to give the following warning:

Two or more conflicting lines for /var/run configured, ignoring.

It can be addressed by changing configure's --with-pid-dir option from /var/run to /var/run/bacula.

The second causes the systemd-tmpfiles command to fail with the following error:

[/usr/lib64/tmpfiles.d/bacula.conf:2] Unknown user 'bacula'.

Hence the systemd-tmpfiles-setup.service fails with this error:

Failed to start Create Volatile Files and Directories.

This can be avoided by replacing the bacula user with root for client-only installs.

Alternatively, both problems could be solved by simply not including the tmpfiles configuration file at all (which seems reasonable, if the PID file is going straight into /var/run).

Reproducible: Always
Comment 1 Duane Griffin 2014-11-05 21:57:56 UTC
Created attachment 388632 [details, diff]
ebuild patch that fixes the issues

This patch specifies /var/run/bacula as the PID dir and replaces the bacula user with root for a client-only install.

Note that after rebuilding users will need to update their /etc/bacula/bacula-*.conf files with the correct PID directory or it will be writen to the wrong place and systemd will think they haven't started correctly. I'm sure all users are scrupulously checking the etc-update diff and hence will notice ;-)

It would be simpler and less disruptive to just not install the systemd tmpfiles configuration file, but I suppose best practice is to do things this way (although there is little documentation I could find on this).
Comment 2 Thomas Beierlein gentoo-dev 2014-11-27 19:14:37 UTC
Thanks for reporting, but sorry for the late reply. I had to install a systemd enabled system first.

(In reply to Duane Griffin from comment #0)
> Bacula installs the systemd tmpfiles configuration file from the bacula
> package, but there are a couple of problems with it:
>  * It specifies the @piddir@ as belonging to bacula:bacula, but the piddir
> is configured as being /var/run (which should obviously belong to root:root).

It is not as critical as the syntax of the file says to create /var/run only if it doesnot exist (see description of 'f' in 'man tmpfiles.d').


>  * When installing with the bacula-clientonly USE-flag enabled the bacula
> user is not created so it then references a non-existent user.
> 
> The first problem causes the systemd-tmpfiles command to give the following
> warning:
> 
> Two or more conflicting lines for /var/run configured, ignoring.
> 
Btw, the systemd-tmpfiles command does not give any warning here (systemd-208-r2).

It only complains about missing user bacula. The *.pid file is finally created as root:bacula for group and user.

> It can be addressed by changing configure's --with-pid-dir option from
> /var/run to /var/run/bacula.
> 
While it was handled similar in other distros for the old bacula-5.2.6 I would like to look a little bit deeper before doing so.

> The second causes the systemd-tmpfiles command to fail with the following
> error:
> 
> [/usr/lib64/tmpfiles.d/bacula.conf:2] Unknown user 'bacula'.
> 
> Hence the systemd-tmpfiles-setup.service fails with this error:
> 
> Failed to start Create Volatile Files and Directories.
> 
> This can be avoided by replacing the bacula user with root for client-only
> installs.
>
That at least seems reasonable. I will do shortly.
 
> Alternatively, both problems could be solved by simply not including the
> tmpfiles configuration file at all (which seems reasonable, if the PID file
> is going straight into /var/run).
> 
> Reproducible: Always
Comment 3 Duane Griffin 2014-11-27 20:25:14 UTC
(In reply to Thomas Beierlein from comment #2)
> Thanks for reporting, but sorry for the late reply. I had to install a
> systemd enabled system first.

No problem, thanks for looking into it!

> > The first problem causes the systemd-tmpfiles command to give the following
> > warning:
> > 
> > Two or more conflicting lines for /var/run configured, ignoring.
> > 
> Btw, the systemd-tmpfiles command does not give any warning here
> (systemd-208-r2).

Interesting. I'm running 217-r2 here at present. Perhaps they squashed this warning, in which case I suppose we can ignore this (already very minor) issue. Especially as fixing it requires people to update their configurations.

> > This can be avoided by replacing the bacula user with root for client-only
> > installs.
> >
> That at least seems reasonable. I will do shortly.

Thanks, this is the biggest issue, of course, as it actually stops that service working. It is not a terribly critical service, so not really such a big deal, but still.
Comment 4 Thomas Beierlein gentoo-dev 2014-11-28 10:00:05 UTC
+*bacula-7.0.5-r1 (28 Nov 2014)
+
+  28 Nov 2014; Thomas Beierlein <tomjbe@gentoo.org> +bacula-7.0.5-r1.ebuild:
+  Fixes systemd tmpfile for bacula-clientonly (bug #528398). Thanks for
+  reporting to D. Griffin
+
I did only fix the case for the missing user 'bacula'. I think we can live with the complaints about the conflicting lines. These lines are only in effect if /var/run is not already there what should not be the case anyway.