Bug 853849

Summary: log-delete writes errors to server log and not to stderr
Product: [Retired] Beaker Reporter: Dan Callaghan <dcallagh>
Component: schedulerAssignee: Dan Callaghan <dcallagh>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 0.9CC: bpeck, dcallagh, kbaker, mishin, rmancy
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-10-11 23:50: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:

Description Dan Callaghan 2012-09-03 06:34:21 UTC
If log-delete gets an unexpected exception while deleting logs, it will be logged to /var/log/beaker/server-debug.log but not printed to stdout or stderr, and the exit status will still be 0. That means if something is failing (for example bug 853848) it is very likely the admin will never notice.

Comment 1 Raymond Mancy 2012-09-03 06:40:09 UTC
The logging of errors and continuing of deletion is by design. We can have thousands of files to delete and I don't think we would want errors with some of them stopping us from deleting the rest.

However a more obvious (read 'correct') place for the logs is in order.

Comment 2 Dan Callaghan 2012-09-03 06:46:13 UTC
The script already tries to send its logs to stderr, line 36 has:

    log_to_stream(sys.stderr)

but something must be going wrong with that.

Comment 3 Dan Callaghan 2012-09-04 03:31:01 UTC
On Gerrit: http://gerrit.beaker-project.org/1317

Comment 5 Dan Callaghan 2012-10-11 23:50:22 UTC
Beaker 0.9.4 has been released.