Description:
It seems that custom configuration they can be passed through the replset.configuration (Custom Resource options - Percona Operator for MongoDB) is not really applied to mongod process.
Steps to Reproduce:
I have the following helm configuration file:
psmdb-db:
secrets:
users: mongodb-secrets
replsets:
- name: rs0
size: 3
configuration: |
systemLog:
quiet: true
replication:
oplogSizeMB: 15360
....
After the deployment I see that this also exists in custom resource:
$ kubectl -n mongodb get perconaservermongodb mongodb-psmdb-db -o yaml
...
replsets:
- affinity: {}
configuration: |
systemLog:
quiet: true
replication:
oplogSizeMB: 15360
name: rs0
nodeSelector:
...
but the stateful set doesn’t have this option:
$ kubectl get statefulset mongodb-psmdb-db-rs0 -n mongodb -o yaml
...
containers:
- args:
- --bind_ip_all
- --auth
- --dbpath=/data/db
- --port=27017
- --replSet=rs0
- --storageEngine=wiredTiger
- --relaxPermChecks
- --sslAllowInvalidCertificates
- --clusterAuthMode=x509
- --shardsvr
- --enableEncryption
- --encryptionKeyFile=/etc/mongodb-encryption/encryption-key
- --wiredTigerCacheSizeGB=5.55
- --wiredTigerIndexPrefixCompression=true
- --config=/etc/mongodb-config/mongod.conf
command:
- /opt/percona/ps-entry.sh
env:
- name: SERVICE_NAME
value: mongodb-psmdb-db
- name: NAMESPACE
value: mongodb
- name: MONGODB_PORT
value: "27017"
- name: MONGODB_REPLSET
value: rs0
envFrom:
- secretRef:
name: internal-mongodb-psmdb-db-users
optional: false
image: percona/percona-server-mongodb:6.0.9-7
imagePullPolicy: Always
...
and the exact oplog size is 5GB:
rs0 [direct: primary] local> rs.printReplicationInfo()
actual oplog size
'5064.4248046875 MB'
---
configured oplog size
'5064.4248046875 MB'
---
I’m not very familiar with the operator code, but it seems that at the moment it only parses couple of arguments.
Version:
[Insert the version number of the software]
- name: psmdb-operator
version: 1.15.0
repository: percona-helm-charts - name: psmdb-db
version: 1.15.0
repository: percona-helm-charts
Logs:
[If applicable, include any relevant log files or error messages]
Expected Result:
[What the user expected to see or happen before the issue occurred]
Expect oplog parameter passed to mongod:
--oplogSizeMB=...
Actual Result:
[What actually happened when the user encountered the issue]
No such parameter (also syslog is missing)
Additional Information:
[Include any additional information that could be helpful to diagnose the issue, such as browser or device information]