Uploaded image for project: 'Couchbase Kubernetes'
  1. Couchbase Kubernetes
  2. K8S-3167

Operator continually updates magma bucket settings if history retention annotations are missing

    XMLWordPrintable

Details

    • 2.6.0 - Hopefully Done?
    • 1

    Description

      Using CAO 2.5.0 and Couchbase Server 7.2.0

      The Operator repeatedly updates bucket settings unnecessarily on the cluster when no actual configuration has changed:

      {"level":"info","ts":1694691294.6770737,"logger":"cluster","msg":"Resource updated","cluster":"default/cb-example","diff":"  strings.Join({\n  \t... // 82 identical bytes\n  \t\"Flush: false\\nenableIndexReplica: false\\nevictionPolicy: fullEvict\",\n  \t\"ion\\nhistoryRetentionBytes: 0\\nhistoryRetentionCollectionDefault: \",\n- \t\"true\",\n+ \t\"null\",\n  \t\"\\nhistoryRetentionSeconds: 0\\nioPriority: low\\nmaxTTL: 0\\nmemoryQuot\",\n  \t\"a: 1024\\nname: magma-history-bucket\\npassword: \\\"\\\"\\nreplicas: 0\\nstor\",\n  \t\"ageBackend: magma\\ntype: couchbase\\n\",\n  }, \"\")\n"}
      {"level":"info","ts":1694691294.7036622,"logger":"cluster","msg":"Bucket updated","cluster":"default/cb-example","name":"magma-history-bucket"}
      {"level":"info","ts":1694691307.6788216,"logger":"cluster","msg":"Resource updated","cluster":"default/cb-example","diff":"  strings.Join({\n  \t... // 82 identical bytes\n  \t\"Flush: false\\nenableIndexReplica: false\\nevictionPolicy: fullEvict\",\n  \t\"ion\\nhistoryRetentionBytes: 0\\nhistoryRetentionCollectionDefault: \",\n- \t\"true\",\n+ \t\"null\",\n  \t\"\\nhistoryRetentionSeconds: 0\\nioPriority: low\\nmaxTTL: 0\\nmemoryQuot\",\n  \t\"a: 1024\\nname: magma-history-bucket\\npassword: \\\"\\\"\\nreplicas: 0\\nstor\",\n  \t\"ageBackend: magma\\ntype: couchbase\\n\",\n  }, \"\")\n"}
      {"level":"info","ts":1694691307.705179,"logger":"cluster","msg":"Bucket updated","cluster":"default/cb-example","name":"magma-history-bucket"}
      {"level":"info","ts":1694691320.6817575,"logger":"cluster","msg":"Resource updated","cluster":"default/cb-example","diff":"  strings.Join({\n  \t... // 82 identical bytes\n  \t\"Flush: false\\nenableIndexReplica: false\\nevictionPolicy: fullEvict\",\n  \t\"ion\\nhistoryRetentionBytes: 0\\nhistoryRetentionCollectionDefault: \",\n- \t\"true\",\n+ \t\"null\",\n  \t\"\\nhistoryRetentionSeconds: 0\\nioPriority: low\\nmaxTTL: 0\\nmemoryQuot\",\n  \t\"a: 1024\\nname: magma-history-bucket\\npassword: \\\"\\\"\\nreplicas: 0\\nstor\",\n  \t\"ageBackend: magma\\ntype: couchbase\\n\",\n  }, \"\")\n"}
      {"level":"info","ts":1694691320.7079859,"logger":"cluster","msg":"Bucket updated","cluster":"default/cb-example","name":"magma-history-bucket"}
      

      In the diffs in the above lines it looks like it's repeatedly perceiving historyRetentionCollectionDefault as transitioning from true to null.

      This is visible to the end user as it spams the logs:

      I've attached a minimal reproduction configuration to this ticket:
      test-cluster.yaml
      And Operator logs from a run of this reproduction:
      operator_logs.log

      Adding the annotation cao.couchbase.com/historyRetention.collectionHistoryDefault: "true" to the bucket seems to fix this.

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              abhi.bose Abhi Bose (Inactive)
              jack.bakes Jack Bakes
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty