Summary: | sysutils/bareos-server: director fails to start on reboot with /var/run on tmpfs | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | Ports & Packages | Reporter: | O. Hartmann <ohartmann> | ||||||||||
Component: | Individual Port(s) | Assignee: | Jose Alonso Cardenas Marquez <acm> | ||||||||||
Status: | Closed FIXED | ||||||||||||
Severity: | Affects Many People | CC: | ohartmann | ||||||||||
Priority: | --- | Flags: | bugzilla:
maintainer-feedback?
(acm) |
||||||||||
Version: | Latest | ||||||||||||
Hardware: | Any | ||||||||||||
OS: | Any | ||||||||||||
Bug Depends on: | 214578 | ||||||||||||
Bug Blocks: | 210177 | ||||||||||||
Attachments: |
|
Description
O. Hartmann
2016-08-31 12:13:04 UTC
Stupid me: I forgot to mention: /var/run needs to have proper access rights for user "bareos" under which the bareos-suite is running, so I guess the folder /var/run/bareos/ makes sense in terms it can be adjusted to the proper access rights. In that case, a proper check of existence is necessary! Created attachment 174252 [details]
Patch rc-scripts properly
sysutils/bareos-server rc scripts lack in some checks for proper pidfile handling. See patchset.
Created attachment 174279 [details]
bareos-server.patch
Refurbished rc-script for both server (bareos-dir, bareos-sd) and client (bareos-sd). Included in patch as of PR210177.
Created attachment 174296 [details]
bareos-server-rc.patch
Messed up my environment and mixed too much of the patches. With this patchset, I patch only the rc-scripts that way so they provide the desired behaviour:
- check for the existence of /var/run/bareos folder, create it if necessary and apply proper ownership
Created attachment 177087 [details]
Patchset for making /var/run on TMPFS possible
The patchset provided applies to Bareos 16.2.4 and obsoletes the prior version 15 pachtsets.
As the bareos-fd (file director) is considered to run with privileges root:wheel and is also considered to run as a solitair service, a special test whether user bareos exists or not is necessary when checking the existence of /var/run/bareos.
In case vareos-fd is the only service running, no user/group bareos is present and var/run/bareos has privileges root:wheel.
If uid bareos exists (probed via getent) we consider other bareos services present and mutual running. In such a case the ownership of /var/run/bareos is bareos:bareos.
The provided patchset has not been able to be tested du to Bug 214578 A commit references this bug: Author: acm Date: Mon Nov 21 20:59:11 UTC 2016 New revision: 426754 URL: https://svnweb.freebsd.org/changeset/ports/426754 Log: - Fix start when /var/run is on TMPFS - Bump PORTREVISION PR: 212282 Submitted by: O. Hartmann ohartmann (_at_) walstatt.org Changes: head/sysutils/bareos-client/Makefile head/sysutils/bareos-client-static/Makefile head/sysutils/bareos-server/Makefile head/sysutils/bareos-server/files/bareos-dir.in head/sysutils/bareos-server/files/bareos-fd.in head/sysutils/bareos-server/files/bareos-sd.in |