Uploaded image for project: 'Nuxeo ECM Build/Test Environment'
  1. Nuxeo ECM Build/Test Environment
  2. NXBT-3298

Fix MongoDB rollout when its chart is updated with persistency enabled

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None

      Description

      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

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 1 day, 3 hours
                  1d 3h