Bug 853849 - log-delete writes errors to server log and not to stderr
log-delete writes errors to server log and not to stderr
Status: CLOSED CURRENTRELEASE
Product: Beaker
Classification: Community
Component: scheduler (Show other bugs)
0.9
Unspecified Unspecified
unspecified Severity unspecified (vote)
: 0.9.4
: ---
Assigned To: Dan Callaghan
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-09-03 02:34 EDT by Dan Callaghan
Modified: 2012-10-11 19:50 EDT (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-10-11 19:50:22 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Dan Callaghan 2012-09-03 02:34:21 EDT
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 02:40:09 EDT
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 02:46:13 EDT
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-03 23:31:01 EDT
On Gerrit: http://gerrit.beaker-project.org/1317
Comment 5 Dan Callaghan 2012-10-11 19:50:22 EDT
Beaker 0.9.4 has been released.

Note You need to log in before you can comment on or make changes to this bug.