Uploaded image for project: 'ONAP Operations Manager'
  1. ONAP Operations Manager
  2. OOM-2864

Mongo data persistency not working

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: High High
    • Jakarta Release
    • Honolulu Release
    • charts
    • Hide

       

      Problem

      Using the given template for mongo instances (common/mongo)
      it is possible to configure the service to persist its DB data to an attached volume.
      This volume is mounted to /var/lib/mongo:

                volumeMounts:
                - name: {{ include "common.fullname" . }}-data
                  mountPath: /var/lib/mongo
      

      Unfortunately the mongo application is storing its data to the directory "/data/db"

      mongodb@onap-multicloud-k8s-mongo-0:/$ ls -al /data/db/
      total 3392
      drwxr-xr-x 4 mongodb mongodb    4096 Oct 12 14:32 .
      drwxr-xr-x 4 root    root         32 Apr  2  2019 ..
      -rw------- 1 mongodb mongodb      45 Aug 30 12:09 WiredTiger
      -rw------- 1 mongodb mongodb      21 Aug 30 12:09 WiredTiger.lock
      -rw------- 1 mongodb mongodb    1077 Oct 12 14:32 WiredTiger.turtle
      -rw------- 1 mongodb mongodb   77824 Oct 12 14:32 WiredTiger.wt
      -rw------- 1 mongodb mongodb    4096 Aug 30 12:09 WiredTigerLAS.wt
      -rw------- 1 mongodb mongodb   36864 Aug 31 03:30 _mdb_catalog.wt
      ...
      mongodb@onap-multicloud-k8s-mongo-0:/$ mount|grep mongo 
      10.42.8.10:/dockerdata-nfs/onap/multicloud-k8s/mongo/data-0 on /var/lib/mongo type nfs4 (rw,relatime,vers=4.1,rsize=131072,wsize=131072,namlen=255,hard,proto=tcp,timeo=600,retrans=2,sec=sys,clientaddr=10.42.8.32,local_lock=none,addr=10.42.8.10)
      
      mongodb@onap-multicloud-k8s-mongo-0:/$ ls -al /var/lib/mongo/
      total 0
      drwxr-xr-x 2 root root  6 Aug 26 11:01 .
      drwxr-xr-x 1 root root 19 Aug 30 12:09 ..
      

      So after a restart of the mongo pod instance the DB content will be gone !

       

      Show
        Problem Using the given template for mongo instances ( common/mongo ) it is possible to configure the service to persist its DB data to an attached volume. This volume is mounted to /var/lib/mongo: volumeMounts: - name: {{ include "common.fullname" . }}-data mountPath: / var /lib/mongo Unfortunately the mongo application is storing its data to the directory "/data/db" mongodb@onap-multicloud-k8s-mongo-0:/$ ls -al /data/db/ total 3392 drwxr-xr-x 4 mongodb mongodb 4096 Oct 12 14:32 . drwxr-xr-x 4 root root 32 Apr 2 2019 .. -rw------- 1 mongodb mongodb 45 Aug 30 12:09 WiredTiger -rw------- 1 mongodb mongodb 21 Aug 30 12:09 WiredTiger.lock -rw------- 1 mongodb mongodb 1077 Oct 12 14:32 WiredTiger.turtle -rw------- 1 mongodb mongodb 77824 Oct 12 14:32 WiredTiger.wt -rw------- 1 mongodb mongodb 4096 Aug 30 12:09 WiredTigerLAS.wt -rw------- 1 mongodb mongodb 36864 Aug 31 03:30 _mdb_catalog.wt ... mongodb@onap-multicloud-k8s-mongo-0:/$ mount|grep mongo 10.42.8.10:/dockerdata-nfs/onap/multicloud-k8s/mongo/data-0 on / var /lib/mongo type nfs4 (rw,relatime,vers=4.1,rsize=131072,wsize=131072,namlen=255,hard,proto=tcp,timeo=600,retrans=2,sec=sys,clientaddr=10.42.8.32,local_lock=none,addr=10.42.8.10) mongodb@onap-multicloud-k8s-mongo-0:/$ ls -al / var /lib/mongo/ total 0 drwxr-xr-x 2 root root 6 Aug 26 11:01 . drwxr-xr-x 1 root root 19 Aug 30 12:09 .. So after a restart of the mongo pod instance the DB content will be gone !  

          sdesbure sdesbure
          andreasgeissler Andreas Geissler
          Votes:
          0 Vote for this issue
          Watchers:
          3 Start watching this issue

            Created:
            Updated:
            Resolved: