Uploaded image for project: 'Configuration Persistence Service'
  1. Configuration Persistence Service
  2. CPS-271

Data is not persisted when cps-postgres pods are restarted

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: High High
    • Honolulu Release
    • Honolulu Release
    • None
    • None

      When restarting postgres databases pods, cps data is lost.

       

      Steps to reproduce:

      1. Deploy cps helm chart and verify they are running properly

      (⎈ |bruno.sakoto-ltec-com:rockhoppers)➜  kubernetes git:(review/claudio_david_gasparini/feature/CPS-175) ✗ kc get pods | grep cps
      
      bison-cps-56c7b5b6bf-f4j6n                    1/1     Running   0          20m
      bison-cps-postgres-primary-7f44b99678-wzm6x   1/1     Running   0          20m
      bison-cps-postgres-replica-565b78c9f8-jwpxw   1/1     Running   0          20m
      

      2. Create a dataspace and verify its presence in database

      (⎈ |bruno.sakoto-ltec-com:rockhoppers)➜  kubernetes git:(review/claudio_david_gasparini/feature/CPS-175) ✗ kc exec -it bison-cps-postgres-primary-7f44b99678-wzm6x -- psql -d nsocpsdb -U nsocps -c "select * from dataspace;"
      
       id |       name
      ----+------------------
        1 | bsa-dataspace-01
      (1 row)
      
      

      3. Delete postgres pods 

      (⎈ |bruno.sakoto-ltec-com:rockhoppers)➜  kubernetes git:(review/claudio_david_gasparini/feature/CPS-175) ✗ kc delete pods bison-cps-postgres-primary-7f44b99678-wzm6x bison-cps-postgres-replica-565b78c9f8-jwpxw
      
      pod "bison-cps-postgres-primary-7f44b99678-wzm6x" deleted
      pod "bison-cps-postgres-replica-565b78c9f8-jwpxw" deleted
      

       4. Let postrgres pod restarting

      (⎈ |bruno.sakoto-ltec-com:rockhoppers)➜  kubernetes git:(review/claudio_david_gasparini/feature/CPS-175) ✗ kc get pods | grep cps
      
      bison-cps-56c7b5b6bf-f4j6n                    1/1     Running   1          27m
      bison-cps-postgres-primary-7f44b99678-btckl   1/1     Running   0          105s
      bison-cps-postgres-replica-565b78c9f8-plg76   1/1     Running   0          105s
      

      Actual behaviour:

      CPS data is lost

      (⎈ |bruno.sakoto-ltec-com:rockhoppers)➜  kubernetes git:(review/claudio_david_gasparini/feature/CPS-175) ✗ kc exec -it bison-cps-postgres-primary-7f44b99678-btckl -- psql -d nsocpsdb -U nsocps -c "select * from dataspace;"
      
       id | name
      ----+------
      (0 rows)
      
      
      (⎈ |bruno.sakoto-ltec-com:rockhoppers)➜  kubernetes git:(review/claudio_david_gasparini/feature/CPS-175) ✗ kc exec -it bison-cps-postgres-replica-565b78c9f8-plg76 -- psql -d nsocpsdb -U nsocps -c "select * from dataspace;"
      
       id | name
      ----+------
      (0 rows)
      

      Expected behaviour:

      CPS data is not lost when postgres pods are restarted.

       

      I'm recommending not fixing this bug in merge request 117099 currently in progress. Let's first have this large 117099 change merged and we'll fix this persistence bug in another change after.

       

            puthuparambil.aditya puthuparambil.aditya
            brusak brusak
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: