-
Notifications
You must be signed in to change notification settings - Fork 157
K8SPSMDB-1197: fix healthcheck log rotation #1826
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
Conversation
"github.com/go-logr/logr" | ||
uzap "go.uber.org/zap" | ||
"go.uber.org/zap/zapcore" | ||
"gopkg.in/natefinch/lumberjack.v2" |
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.
Shouldn't we use "github.com/percona/percona-server-mongodb-operator/cmd/mongodb-healthcheck/logger/lumberjack"
here?
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.
Just noticed we are replacing the dependency with the local directory. We are good then!
COPY go.mod go.sum ./ | ||
RUN go mod download | ||
|
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 do we need this change? with this we'll need to download modules after a every code change
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.
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 we should revert Dockerfile changes
This reverts commit 90755fe.
commit: b112ff3 |
https://perconadev.atlassian.net/browse/K8SPSMDB-1197
DESCRIPTION
Problem:
healthcheck
doesn't delete old logs if executed very quickly.Cause:
lumberjack rotates logs in the separate goroutine. It's not guaranteed to finish and it's not possible to check if it's finished.
Solution:
Replace current version of
lumberjack
with natefinch/lumberjack#211.CHECKLIST
Jira
Needs Doc
) and QA (Needs QA
)?Tests
compare/*-oc.yml
)?Config/Logging/Testability