Bug 837706

Summary: Logwatch fails on bacula files
Product: [Fedora] Fedora Reporter: John Florian <trailtotale>
Component: baculaAssignee: Simone Caronni <negativo17>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 16CC: andreas, fschwarz, gwync, lnykryn, negativo17, paul, 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-20 01:55:16 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description John Florian 2012-07-04 22:39:45 UTC
Description of problem:
I get this message every day from the logwatch job:

/etc/cron.daily/0logwatch:

cat: /var/spool/bacula/log: Permission denied
system 'cat '/var/spool/bacula/log'  >/var/cache/logwatch/logwatch.K4w3Yg9G/bacula' failed: 256 at /usr/sbin/logwatch line 868.


Version-Release number of selected component (if applicable):
bacula-director-common-5.0.3-29.fc16.x86_64
logwatch-7.4.0-13.20120619svn110.fc16.noarch

How reproducible:
every time

Steps to Reproduce:
1. Install and configure bacula.
2. Run a job.
3. Allow logwatch to run normally.
  
Actual results:
See error above.

Expected results:
No error.

Additional info:
# ls -ld /var/spool/bacula/log
-rw-r--r--. 1 bacula bacula 34515 Jul  4 17:58 /var/spool/bacula/log

Comment 1 Paul Howarth 2012-07-05 08:22:36 UTC
Why are your log files in /var/spool/bacula rather than /var/log/bacula as per the default configuration in the rpm?

Comment 2 Simone Caronni 2012-07-07 12:41:32 UTC
/var/spool/bacula/log is an old configuration that was shipping with very old Fedora packages.

You should change your /etc/bacula/bacula-dir.conf file with the following (default) config:

append = "/var/log/bacula/bacula.log"

I will also remove /var/spool/bacula/log from the logrotate files in the package.

Comment 3 John Florian 2012-07-14 17:08:07 UTC
They changed? Really?  Here's what I see from a fresh install of bacula-director-common-5.0.3-29.fc16.x86_64:

# Reasonable message delivery -- send most everything to email address
#  and to the console
Messages {
  Name = Standard
<snip>
#
# WARNING! the following will create a file that you must cycle from
#          time to time as it will grow indefinitely. However, it will
#          also keep all your messages if they scroll off the console.
#
  append = "/var/spool/bacula/log" = all, !skipped
  catalog = all
}


That said, this is a change I would like to see so that Bacula better follows the regular Fedora standards.  I will make override this default as suggested by Simone and see how that helps.

Comment 4 Paul Howarth 2012-07-14 17:29:17 UTC
Hmm, I was looking at the F-17 build, which currently has:

# Reasonable message delivery -- send most everything to email address
#  and to the console
Messages {
  Name = Standard
#
# NOTE! If you send to two email or more email addresses, you will need
#  to replace the %r in the from field (-f part) with a single valid
#  email address in both the mailcommand and the operatorcommand.
#  What this does is, it sets the email address that emails would display
#  in the FROM field, which is by default the same email as they're being
#  sent to.  However, if you send email to more than one address, then
#  you'll have to set the FROM address manually, to a single address.
#  for example, a 'no-reply', is better since that tends to
#  tell (most) people that its coming from an automated source.

#
  mailcommand = "/usr/sbin/bsmtp -h localhost -f \"\(Bacula\) \<%r\>\" -s \"Bacula: %t %e of %c %l\" %r"
  operatorcommand = "/usr/sbin/bsmtp -h localhost -f \"\(Bacula\) \<%r\>\" -s \"Bacula: Intervention needed for %j\" %r"
  mail = root@localhost = all, !skipped
  operator = root@localhost = mount
  console = all, !skipped, !saved
#
# WARNING! the following will create a file that you must cycle from
#          time to time as it will grow indefinitely. However, it will
#          also keep all your messages if they scroll off the console.
#
  append = "/var/log/bacula/bacula.log" = all, !skipped
  catalog = all
}


#
# Message delivery for daemon messages (no job).
Messages {
  Name = Daemon
  mailcommand = "/usr/sbin/bsmtp -h localhost -f \"\(Bacula\) \<%r\>\" -s \"Bacula daemon message\" %r"
  mail = root@localhost = all, !skipped
  console = all, !skipped, !saved
  append = "/var/log/bacula/bacula.log" = all, !skipped
}

That's from bacula-director-5.2.10-2.fc17.x86_64

Comment 5 John Florian 2012-07-14 17:49:55 UTC
Paul, thanks for the speedy response! Any chance we can get F16 patched up?  If it's just this conf change only I can manage, but I'm wondering if there are other pieces that I'll need to quiet my noisy logwatch jobs.

(I'm using puppet to manage everything and am seeing too many nasty problems with that under F17 to live with that mess.  I'm hoping that when F18 comes around that situation will have improved.)

Comment 6 Simone Caronni 2012-07-15 08:45:36 UTC
Hello, I Will update the fc16 build on monday, I'm currently on holiday without internet access.

--Simone
(Typing fronte phone)

Comment 7 Simone Caronni 2012-07-16 08:17:32 UTC
Hello,

I've pushed the changes for the f16 package (5.0.3-30.fc16). They are the same as per the fc17/rawhide packages.

http://pkgs.fedoraproject.org/gitweb/?p=bacula.git;a=commitdiff;h=ce9f1156cb42f256d6bb7acb005d423efac65e79

There's also one other fix which has been discovered for f17/rawhide, I'm applying the same fix in this update.

http://pkgs.fedoraproject.org/gitweb/?p=bacula.git;a=commitdiff;h=4b7bd195868bae77e997450c2e43565d5c8a440d

Please let me know of any issue; I'm gonna push an update in a few moments, please leave karma if it does fix your issue.

I mantain also a backport of the latest Bacula packages for all the Fedora/RHEL supported distributions, so if you need to run something newer than the unmantained 5.0.3 please have a look:

http://repos.fedorapeople.org/repos/slaanesh/bacula/
http://repos.fedorapeople.org/repos/slaanesh/bacula/README.txt

Regards,
--Simone

Comment 8 Fedora Update System 2012-07-16 08:39:50 UTC
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 9 Fedora Update System 2012-07-17 17:29:03 UTC
Package bacula-5.0.3-30.fc16:
* should fix your issue,
* was pushed to the Fedora 16 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing bacula-5.0.3-30.fc16'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2012-10725/bacula-5.0.3-30.fc16
then log in and leave karma (feedback).

Comment 10 Fedora Update System 2012-07-20 01:55:16 UTC
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.

Comment 11 Fedora Update System 2012-08-10 08:13:06 UTC
bacula-5.2.10-5.fc17 has been submitted as an update for Fedora 17.
https://admin.fedoraproject.org/updates/bacula-5.2.10-5.fc17

Comment 12 Fedora Update System 2012-08-27 03:27:09 UTC
bacula-5.2.10-5.fc17 has been pushed to the Fedora 17 stable repository.  If problems still persist, please make note of it in this bug report.