Server startup warnings
cgx-system opened this issue · comments
What did you do to encounter the bug?
Steps to reproduce the behavior:
- Install MongoDB in a kubernetes cluster using MongoDB Operator
- Port-forward mongodb-svc on administrator PC
- Connect and auth to MongoDB cluster in command line with mongosh
What did you expect?
A clean mongosh prompt
What happened instead?
Warning messages before entering the mongosh prompt :
------
The server generated these startup warnings when booting
2023-07-17T12:32:52.922+00:00: Using the XFS filesystem is strongly recommended with the WiredTiger storage engine. See http://dochub.mongodb.org/core/prodnotes-filesystem
2023-07-17T12:32:55.659+00:00: /sys/kernel/mm/transparent_hugepage/enabled is 'always'. We suggest setting it to 'never'
2023-07-17T12:32:55.659+00:00: vm.max_map_count is too low
------
Operator Information
- Operator Version : 0.8.0
- MongoDB Image used : docker.io/library/mongo
Kubernetes Cluster Information
- Distribution : k3s
- Kubernetes Version : 1.27.3
Are the warnings important, and how can I get rid of them ?
@cgx-system try to set initContainer, should be something like this:
apiVersion: mongodbcommunity.mongodb.com/v1
kind: MongoDBCommunity
metadata:
name: mongodb
spec:
...
statefulSet:
spec:
template:
spec:
initContainers:
- name: increase-vm-max-map
image: busybox
imagePullPolicy: IfNotPresent
command: [ "sysctl", "-w", "vm.max_map_count=262144" ]
securityContext:
privileged: true
This issue is being marked stale because it has been open for 60 days with no activity. Please comment if this issue is still affecting you. If there is no change, this issue will be closed in 30 days.
This issue was closed because it became stale and did not receive further updates. If the issue is still affecting you, please re-open it, or file a fresh Issue with updated information.