-
Notifications
You must be signed in to change notification settings - Fork 149
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
K8SPSMDB-934: add more logs to mongodb-healthcheck
#1587
Conversation
if requested.Cmp(configured) == 0 || requested.Cmp(actual) == 0 { | ||
if requested.Cmp(configured) == 0 && requested.Cmp(actual) == 0 { |
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.
why?
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.
For some reason, the pvc-resize
test kept failing in this PR.
There was a case where statefulset had an updated resources (configured
var), but pvcs didn't (actual
var). In this case it was not possible to start a resize because requested.Cmp(configured) == 0
was true while requested.Cmp(actual) == 0
wasn't.
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.
cmd/mongodb-healthcheck/main.go
Outdated
os.Exit(1) | ||
logOpts := zap.Options{ | ||
Encoder: getLogEncoder(), | ||
Level: zapcore.DebugLevel, |
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.
Could we set this through some env var? What if a user doesn't want this level of verbosity?
I think this should be configurable. Maybe we don't need to have it now, but maybe a task to have it. Log levels generally should be configurable, especially if we set it to a more verbose level and you can't change it.
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.
commit: 1c5a404 |
https://perconadev.atlassian.net/browse/K8SPSMDB-934
DESCRIPTION
This pull request removes a lot of unused code for
mongodb-healthcheck
.It also introduces several logging improvements:
DEBUG
/data/db/mongod-data/logs/mongodb-healthcheck.log
fileAdditionally, each time the healthcheck fails, the current log is saved to the gzip compressed file
mongodb-healthcheck-<timestamp>.log.gz
and the filemongodb-healthcheck.log
is reset. Logs older than 24 hours will be deleted.CHECKLIST
Jira
Needs Doc
) and QA (Needs QA
)?Tests
compare/*-oc.yml
)?Config/Logging/Testability