Bug 1266304

Summary: argus-3.0.8-3 /etc/cron.daily/argus sends error messages on each cron.daily run
Product: [Fedora] Fedora Reporter: Edgar Hoch <edgar.hoch>
Component: argusAssignee: Gwyn Ciesla <gwync>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: unspecified    
Version: 23CC: aschorr, eddie.kuns, gwync, mail
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: argus-3.0.8-4.fc23 argus-3.0.8-4.fc22 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-01-13 05:22:22 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:
Attachments:
Description Flags
/etc/logrotate.d/argus replacement for /etc/cron.daily/argus none

Description Edgar Hoch 2015-09-25 02:27:10 UTC
Description of problem:

On every system where argus is installed in the new (updated) version 3.0.8-3 there is a problem with the new cron.daily file. On each run it creates error messages like the following. These are send to root (and, in our installations, to myself, because I have configured that all root mails from all our systems are forwarded to me).

mv: cannot stat 'argus.out': No such file or directory
gzip: archive/argus.out.2015-09-25: No such file or directory


The error is in script /etc/cron.daily/argus:
- The script does not check if files argus.out exists before it operates on it.
- The script does not check if files archive/argus.out* exists before it operates on it.


Version-Release number of selected component (if applicable):
argus-3.0.8-3.fc22.x86_64

How reproducible:
Always

Steps to Reproduce:
1. Install package argus.
2. Wait until cron daily was run.
3. Check email of root.

Alternative:
1. Install package argus.
2. Run /etc/cron.daily/argus

Actual results:
Error messages as described above.

Expected results:
No errors.


Additional info:

I think it would be preferable to use logrotate (create a file /etc/logrotate.d/argus) instead of cron.daily (remove this file from the package).
Logrotate checks for existence of the file, and does the same thing the script should do, but you only need to create a config file.

Comment 1 Andrew J. Schorr 2015-09-28 14:43:43 UTC
The same problem also occurs in Fedora 21. I am getting the following email:

mv: cannot stat ‘argus.out’: No such file or directory
gzip: archive/argus.out.2015-09-28: No such file or directory
/etc/cron.daily/argus: line 8: /sbin/tmpwatch: No such file or directory

Note that I do not have tmpwatch installed on my system. If argus requires tmpwatch, then it should be added as a package dependency.

This is a mess.

Regards,
Andy

Comment 2 Edward Kuns 2016-01-03 17:58:06 UTC
I see this on a fresh install of Fedora 23.  I assume the correct fix from a user perspective is to configure argus so it works?  It would also be nice, however, if the daily script didn't complain if argus hasn't been running.

Comment 3 Edgar Hoch 2016-01-04 03:34:12 UTC
Confirmed: argus-3.0.8-3.fc23.x86_64 has the same problem.

Updated to Fedora 23.

Comment 4 Edgar Hoch 2016-01-04 03:39:25 UTC
Created attachment 1111293 [details]
/etc/logrotate.d/argus replacement for /etc/cron.daily/argus

No reaction from the maintainer?

Here is a file /etc/logrotate.d/argus which can be added to the package
and does the same as /etc/cron.daily/argus.

Please add this file as /etc/logrotate.d/argus to the package
and remove /etc/cron.daily/argus from the package
and create an updated version.

Comment 5 Gwyn Ciesla 2016-01-04 14:33:20 UTC
Sorry for the delay, I've been a bit swamped.  I'll try to get this out today.

Comment 6 Fedora Update System 2016-01-04 15:12:52 UTC
argus-3.0.8-4.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2016-5416b72c53

Comment 7 Fedora Update System 2016-01-04 20:51:46 UTC
argus-3.0.8-4.fc22 has been pushed to the Fedora 22 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-ed67419eaf

Comment 8 Fedora Update System 2016-01-04 20:52:56 UTC
argus-3.0.8-4.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-5416b72c53

Comment 9 Fedora Update System 2016-01-13 05:22:19 UTC
argus-3.0.8-4.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.

Comment 10 Fedora Update System 2016-01-13 06:24:18 UTC
argus-3.0.8-4.fc22 has been pushed to the Fedora 22 stable repository. If problems still persist, please make note of it in this bug report.