bitnami / charts

Bitnami Helm Charts
https://bitnami.com
Other
8.97k stars 9.2k forks source link

Arbiter crashloop on chart 8.0.0+ #24597

Closed lzoeckle closed 6 months ago

lzoeckle commented 7 months ago

Name and Version

bitnami/mongodb-sharded:8.0.2

What architecture are you using?

amd64

What steps will reproduce the bug?

I believe I'm running into the same bug as this previous issue, but with the sharded chart. See https://github.com/bitnami/containers/issues/63885

My values.yaml look like:

image:
  tag: 7.0.7-debian-12-r0
  pullPolicy: IfNotPresent
  debug: true
shards: 4
defaults: &defaults
  resources:
    requests:
      cpu: 20m
      memory: 256Mi
    limits:
      cpu: 500m
      memory: 512Mi
mongos:
  replicaCount: 1
  <<: *defaults
configsvr:
  replicaCount: 3
  <<: *defaults
shardsvr:
  dataNode:
    replicaCount: 2
    <<: *defaults
  arbiter:
    replicaCount: 1
    <<: *defaults

What is the expected behavior?

The arbiter should start successfully.

What do you see instead?

Crashloop with the error mkdir: cannot create directory '/bitnami/mongodb/data/db': Read-only file system

If I update the arbiter to include

containerSecurityContext:
    readOnlyRootFilesystem: false

I see mkdir: cannot create directory '/bitnami/mongodb/data/db': Permission denied instead.

Additional information

It looks like the same volumeMounts entry may be missing from the arbiter's statefulset.yaml, as in the other bug.

lzoeckle commented 7 months ago

Adding here, I was able to get things running by including

extraVolumeMounts:
      - mountPath: /bitnami/mongodb
        name: empty-dir
        subPath: app-volume-dir

in shardsvr.arbiter.

dgomezleon commented 6 months ago

Hi @lzoeckle ,

Thanks for letting us know. Would you like to contribute with a PR implementing that solution? The Bitnami team will be excited to review your submission and offer feedback. You can find the contributing guidelines here.

github-actions[bot] commented 6 months ago

This Issue has been automatically marked as "stale" because it has not had recent activity (for 15 days). It will be closed if no further activity occurs. Thanks for the feedback.

github-actions[bot] commented 6 months ago

Due to the lack of activity in the last 5 days since it was marked as "stale", we proceed to close this Issue. Do not hesitate to reopen it later if necessary.