Description
What did you do to encounter the bug?
Steps to reproduce the behaviour:
- Update image: quay.io/mongodb/mongodb-kubernetes-operator:0.10.0
- Update MongoDBCommunity Specs as in chart
spec.agent.logFile: /dev/stdout
spec.agent.logLevel: INFO
- Check mongodb-agent logs on STDOUT
- It's logging everything instead of INFO and above logs
- Error in the mongdb-agent logs
[2024-06-26T18:31:14.438+0000] [.error] [src/main/cm.go:main:118] [18:31:14.438] Failed to create AsyncRollingFileAppender for full log file : open /INFO-verbose: read-only file system
[2024-06-26T18:31:14.438+0000] [.error] [src/main/cm.go:main:119] [18:31:14.438] Failed to setup logging! : [18:31:14.438] Failed to create AsyncRollingFileAppender for full log file : open /INFO-verbose: read-only file system
What did you expect?
Only .info and above logs should have been logged in STDOUT for mongodb-agent
What happened instead?
It's logging everything from .trace and above logs
Screenshots
If applicable, add screenshots to help explain your problem.
Operator Information
- Operator Version - 0.10.0
- MongoDB Image used - 6.0.4
Kubernetes Cluster Information
- Distribution - EKS
- Version - 1.28
- Image Registry location (quay, or an internal registry)
quay.io/mongodb/mongodb-agent:12.0.25.7724-1
quay.io/mongodb/mongodb-kubernetes-operator-version-upgrade-post-start-hook:1.0.8
quay.io/mongodb/mongodb-kubernetes-readinessprobe:1.0.19
Additional context
mongodb-agent is running as: -
agent/mongodb-agent -healthCheckFilePath=/var/log/mongodb-mms-automation/healthstatus/agent-health-status.json -serveStatusPort=5000 -cluster=/var/lib/automation/config/cluster-config.json -skipMongoStart -noDaemonize -useLocalMongoDbTools -logFile INFO -logLevel /var/log/mongodb-mms-automation/automation-agent.log -maxLogFileDurationHrs 24
It seems like logFile
and logLevel
arguments are being passed in opposite order in AutomationAgentCommand
call
See function
https://github.com/mongodb/mongodb-kubernetes-operator/blob/master/controllers/construct/mongodbstatefulset.go#L259C6-L259C118
I think we need to interchange the order of these two arguments.
❯ k get pods
NAME READY STATUS RESTARTS AGE
mongodb-0 2/2 Running 0 92m
mongodb-1 2/2 Running 0 93m
mongodb-2 2/2 Running 0 93m
❯ k get mdbc
NAME PHASE VERSION
mongodb Running 6.0.4