Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hammer: log: do not repeat errors to stderr #10227

Merged
merged 1 commit into from Jul 25, 2016

Conversation

smithfarm
Copy link
Contributor

If we get an error writing to the log, log it only once to stderr.
This avoids generating, say, 72 GB of ENOSPC errors in
teuthology.log when /var/log fills up.

Fixes: ceph#14616
Signed-off-by: Sage Weil <sage@redhat.com>
(cherry picked from commit d9ac047)

Conflicts:
	src/log/Log.cc (drop m_uid and m_gid which are not used in hammer;
	order of do_stderr, do_syslog, do_fd conditional blocks is reversed in
	hammer; drop irrelevant speed optimization code from
	5bfe05a)
@smithfarm
Copy link
Contributor Author

smithfarm commented Jul 9, 2016

This replaces #8077 which was causing an extra blank line to be written to the log after every log entry. Thanks to @athanatos for pointing this out to me!

@smithfarm
Copy link
Contributor Author

Hey Jenkins, test this please !

smithfarm added a commit that referenced this pull request Jul 18, 2016
… logs excessively to stderr

Reviewed-by: Nathan Cutler <ncutler@suse.com>
smithfarm added a commit that referenced this pull request Jul 24, 2016
… logs excessively to stderr

Reviewed-by: Nathan Cutler <ncutler@suse.com>
@smithfarm
Copy link
Contributor Author

@liewegas This PR is in the latest round of hammer-backports integration tests, which passed a rados run (the only failures are a valgrind false positive that has since been fixed by ceph/teuthology#915 and http://tracker.ceph.com/issues/15139 which is an infrastructure issue with two of the tests) - for details, see: http://tracker.ceph.com/issues/15895#note-18

I can also confirm that this PR fixed the "extra blank line" issue referred to in #10227 (comment)

OK to merge?

@athanatos
Copy link
Contributor

lgtm

@smithfarm smithfarm merged commit 2fe8edb into ceph:hammer Jul 25, 2016
@smithfarm smithfarm deleted the wip-15081-hammer branch July 25, 2016 19:44
@smithfarm smithfarm changed the title hammer: When logging to a file fails, ceph logs excessively to stderr hammer: log: do not repeat errors to stderr Aug 15, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants