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
cephadm: reduce spam to cephadm.log #47088
Conversation
jenkins test api |
src/cephadm/cephadm
Outdated
elif verbosity == CallVerbosity.DEBUG or verbosity == CallVerbosity.VERBOSE_ON_FAILURE: | ||
logger.debug(message) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't understand why in case of CallVerbosity.VERBOSE_ON_FAILURE:
we use debug even if no error. Shouldn't we use info in this case?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was mostly just maintaining the old behavior for this log setting with this one, but I think the idea is that, since by default only info level and above are logged to the console, we only log errors on that level and then non-errors go to debug level where they won't pop up in the console. Hence, it is only "verbose" (logging to the console) when there's an error.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, got it 👍
if verbosity == CallVerbosity.VERBOSE: | ||
logger.info(prefix + message.rstrip()) | ||
elif verbosity != CallVerbosity.SILENT: | ||
logger.debug(prefix + message.rstrip()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems like we are removing logging on these cases. Just to make sure we are doing it on purpose.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this should all still get logged. In the old code, it was directly making log calls from this internal function tee
with the stdout/stderr and then we were only doing additional logging afterwards if there was an error. Now it calls _log_from_call
function with the stdout and stderr after the fact always instead of doing it within tee
2 failures:
Neither failure is new or related to PRs in the run |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Various suggestions. I feel it improves the "mental locality" for me. Feel free to take them or leave them.
Signed-off-by: Adam King <adking@redhat.com>
The QUIET log level only gets sent to the console or log file if --verbose is passed to cephadm. This means our regulat metadata gathering operations won't spam the log file as we don't pass --verbose when running them, but users can still pass --verbose when running the commands manually for debugging purposes Fixes: https://tracker.ceph.com/issues/56552 Signed-off-by: Adam King <adking@redhat.com>
jenkins test api |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
lots of rhel tests failing due to an issue with satellite, reruns 1 actual failure was known issue with agent/on test_nfs timing out |
Fixes: https://tracker.ceph.com/issues/56552
Signed-off-by: Adam King adking@redhat.com
By introducing a new QUIET log level that only prints to the console or log file when --verbose is passed, we can reduce how much our regular metadata gathering commands spam the log while still allowing us to see the full output when running the command manually for debugging purposes.
Example output in cephadm.log after running
cephadm ls
cephadm --verbose ls
cephadm shell -- ceph orch ps
cephadm --verbose shell -- ceph orch ps
Note that before this change everything being logged at QUIET level in this output would have been printed to the log every time these commands were run (but at DEBUG level)
Contribution Guidelines
To sign and title your commits, please refer to Submitting Patches to Ceph.
If you are submitting a fix for a stable branch (e.g. "pacific"), please refer to Submitting Patches to Ceph - Backports for the proper workflow.
Checklist
Show available Jenkins commands
jenkins retest this please
jenkins test classic perf
jenkins test crimson perf
jenkins test signed
jenkins test make check
jenkins test make check arm64
jenkins test submodules
jenkins test dashboard
jenkins test dashboard cephadm
jenkins test api
jenkins test docs
jenkins render docs
jenkins test ceph-volume all
jenkins test ceph-volume tox
jenkins test windows