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

[Synchronize] Should CRD validation fail when user tries to set synchronize to true without a selector?

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 2.3.0
    • 2.3.0
    • operator
    • 1

    Description

      2.3.0-236

      Currently, I am able to set synchronize to true by editing couchbasecluster without setting a selector. kubectl edit goes thru but the operation fails with this error in the logs:

      7T21:45:33Z\"\n- \t  lastUpdateTime: \"2022-01-27T21:45:33Z\"\n- \t  message: Data topology synchronization failed, enabling management unsafe and may\n- \t    delete data\n- \t  reason: SynchronizationFailed\n- \t  status: \"False\"\n+ \t- lastTransitionTime: \"2022-01-27T21:49:16Z\"\n+ \t  lastUpdateTime: \"2022-01-27T21:49:16Z\"\n+ \t  message: Data topology synchronized and ready to be managed\n+ \t  reason: SynchronizationComplete\n+ \t  status: \"True\"\n  \t  type: Synchronized\n  \t- lastTransitionTime: \"2022-01-27T21:45:33Z\"\n  \t... // 13 identical lines\n  \t\"\"\"\n  )\n"}
      {"level":"info","ts":1643320156.4410374,"logger":"cluster","msg":"Resource updated","cluster":"default/cb-example","diff":"  (\n  \t\"\"\"\n  \t... // 37 identical lines\n  \t  status: \"True\"\n  \t  type: Synchronized\n- \t- lastTransitionTime: \"2022-01-27T21:45:33Z\"\n- \t  lastUpdateTime: \"2022-01-27T21:45:33Z\"\n- \t  message: 'required resource attribute missing: bucket label selector not set'\n- \t  reason: ErrorEncountered\n- \t  status: \"True\"\n- \t  type: Error\n  \tcurrentVersion: 7.0.3\n  \tmembers:\n  \t... // 6 identical lines\n  \t\"\"\"\n  )\n"}
      

      It might be better to add CRD validation to fail if user is trying to do this

      Attachments

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

        Activity

          People

            prateek.kumar Prateek Kumar (Inactive)
            arunkumar Arunkumar Senthilnathan (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty