Bug 838828

Summary: bacula services start too soon
Product: [Fedora] Fedora Reporter: Paul Howarth <paul>
Component: baculaAssignee: Simone Caronni <negativo17>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: andreas, fschwarz, limburgher, lnykryn, negativo17, vanmeeuwen+fedora
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-07-18 05:20:32 EDT Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Description Paul Howarth 2012-07-10 05:11:32 EDT
When started with systemd, the bacula services are started once network.target is reached. However, DNS name resolution may not be available at that time as local nameservers are also started once network.target is reached. The last time I rebooted my server, bacula-fd came up before DNS was available and then failed to start because it couldn't resolve the hostname it was supposed to listen on (a local intranet address - I don't want it listening on all local interfaces).

A fix for this should be to change the start-up to wait for nss-lookup.target too:

--- bacula-fd.service
+++ bacula-fd.service
@@ -1,7 +1,7 @@
 [Unit]
 Description=Bacula-FileDaemon, a Backup-client
-Requires=syslog.target network.target
-After=network.target
+Requires=syslog.target network.target nss-lookup.target
+After=network.target nss-lookup.target
 
 [Service]
 Environment=CONFIG=/etc/bacula/bacula-fd.conf

See "man systemd.special" for a description of this and other special targets.

I think it would be good to add this target for all bacula daemons.
Comment 1 Simone Caronni 2012-07-10 08:24:49 EDT
My systems are configured for listening on all addresses or in the case of servers so slow that I never stepped into the problem. Apache does the same as well, so I think is a good idea to add it.

I think it can be added also to the next Fedora 17 update, which is currently at the same level of Rawhide.
Comment 2 Fedora Update System 2012-07-10 10:48:54 EDT
bacula-5.2.10-2.fc17 has been submitted as an update for Fedora 17.
https://admin.fedoraproject.org/updates/bacula-5.2.10-2.fc17
Comment 3 Simone Caronni 2012-07-10 10:50:31 EDT
Please leave karma at the above link if the update is ok for you.

Thanks,
--Simone
Comment 4 Fedora Update System 2012-07-10 16:50:09 EDT
Package bacula-5.2.10-2.fc17:
* should fix your issue,
* was pushed to the Fedora 17 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing bacula-5.2.10-2.fc17'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2012-10457/bacula-5.2.10-2.fc17
then log in and leave karma (feedback).
Comment 5 Fedora Update System 2012-07-16 04:39:56 EDT
bacula-5.0.3-30.fc16 has been submitted as an update for Fedora 16.
https://admin.fedoraproject.org/updates/bacula-5.0.3-30.fc16
Comment 6 Fedora Update System 2012-07-19 04:55:41 EDT
bacula-5.2.10-2.fc17 has been pushed to the Fedora 17 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 7 Fedora Update System 2012-07-19 21:55:23 EDT
bacula-5.0.3-30.fc16 has been pushed to the Fedora 16 stable repository.  If problems still persist, please make note of it in this bug report.