-
Type: Bug
-
Status: Resolved
-
Priority: Minor
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: None
-
Component/s: None
-
Epic Link:
-
Sprint:nxplatform 11.1.33
-
Story Points:2
The MongoDB chart required by the Nuxeo Helm Chart is indicated with a ~ to grab the bug fixes / patches.
The Nuxeo preview has persistence enabled which implies binding to some kubernetes PVC.
While rolling MongoDB updates, the new MongoDB pod gets stuck waiting for the old MongoDB to free its PVC. We suspect this to be due to the MongoDB version update leading to a new yaml file.
kubectl -n nuxeo-preview-master get pod
We can see see there are 2 MongoDB masters and the newest is not ready
NAME READY STATUS RESTARTS AGE nuxeo-preview-7c956bdc98-tkdrj 0/1 CrashLoopBackOff 138 12h nuxeo-preview-master-elasticsearch-client-7fbfd8676b-99zjg 1/1 Running 0 12h nuxeo-preview-master-elasticsearch-data-0 1/1 Running 0 6d18h nuxeo-preview-master-elasticsearch-master-0 1/1 Running 0 6d18h nuxeo-preview-master-mongodb-5968cd5c74-wqprf 0/1 ContainerCreating 0 12h nuxeo-preview-master-mongodb-6d54b7ffb-sstg2 1/1 Running 0 6d18h
getting each MongoDB master pod as yaml reveals a version difference:
chart: mongodb-7.8.9
vs
chart: mongodb-7.8.10
To try solve this issue, we thought of using ReadWriteMany PVCs but this is not garanteed to work and not encouraged by cloud platforms.
MongoDB allows to work with statefulsets. So we'd rather try solving the rollout issue using the useStatefulSet value:
cf https://github.com/bitnami/charts/blob/master/bitnami/mongodb/README.md
cf https://github.com/bitnami/charts/blob/master/bitnami/mongodb/README.md#production-configuration-and-horizontal-scaling