Uploaded image for project: 'Project Quay'
  1. Project Quay
  2. PROJQUAY-2930

Quay Operator can't reconcile when specified the PVC Volume size of Clair postgresql DB

    XMLWordPrintable

Details

    • 0

    Description

      Description:

      This is an issue found when use Quay config editor to config quay to use unmanaged postgresql DB and unmanaged Object Storage, at the fresh deployment choose to give the PVC size(75GB) for Clair and Quay Postgresql DB, then open quay config editor to configure to use unmanaged AWS RDS Postgresql DB and unmanaged Object Storage, the result is Quay Operator was failed to reconcile and report following error message in Quay Operator logs.

      "error": "PersistentVolumeClaim \"quay362-clair-postgres\" is invalid: spec.resources.requests.storage: Forbidden: field can not be less than previous value"

      Based on the error message, Quay Operator is trying to specify to use default 50GB size to Clair Postgresql DB, this is not correct behavior, the expected behavior is Quay Operator is keep using the existing 75GB size for managed Clair Posgresql DB.

      Quay 3.6.2 Image: quay-operator-bundle-container-v3.6.2-15

      OCP Version: 4.10

      The following is the QuayRegistry CR use to specify the PVC Volume size, larger than default 50GB.

        components:
          - kind: postgres
            managed: true
            overrides:
              volumeSize: 75Gi
          - kind: objectstorage
            managed: true
          - kind: redis
            managed: true
          - kind: horizontalpodautoscaler
            managed: true
          - kind: route
            managed: true
          - kind: mirror
            managed: true
          - kind: monitoring
            managed: false
          - kind: tls
            managed: true
          - kind: clair
            managed: true
            overrides:
              volumeSize: 75Gi 
      2021-12-10T07:19:09.476Z        ERROR   controllers.QuayRegistry        failed to create/update object  {"quayregistry": "quay362", "Name": "quay362-clair-postgres", "GroupVersionKind": "/v1, Kind=PersistentVolumeClaim", "error": "PersistentVolumeClaim \"quay362-clair-postgres\" is invalid: spec.resources.requests.storage: Forbidden: field can not be less than previous value"}
      github.com/go-logr/zapr.(*zapLogger).Error
              /workspace/vendor/github.com/go-logr/zapr/zapr.go:132
      github.com/quay/quay-operator/controllers/quay.(*QuayRegistryReconciler).createOrUpdateObject
              /workspace/controllers/quay/quayregistry_controller.go:548
      github.com/quay/quay-operator/controllers/quay.(*QuayRegistryReconciler).Reconcile
              /workspace/controllers/quay/quayregistry_controller.go:308
      sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler
              /workspace/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:297
      sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem
              /workspace/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:252
      sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func1.2
              /workspace/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:215
      k8s.io/apimachinery/pkg/util/wait.JitterUntilWithContext.func1
              /workspace/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:185
      k8s.io/apimachinery/pkg/util/wait.BackoffUntil.func1
              /workspace/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:155
      k8s.io/apimachinery/pkg/util/wait.BackoffUntil
              /workspace/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:156
      k8s.io/apimachinery/pkg/util/wait.JitterUntil
              /workspace/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:133
      k8s.io/apimachinery/pkg/util/wait.JitterUntilWithContext
              /workspace/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:185
      k8s.io/apimachinery/pkg/util/wait.UntilWithContext
              /workspace/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:99
      2021-12-10T07:19:10.494Z        DEBUG   controller-runtime.manager.events       Warning {"object": {"kind":"QuayRegistry","namespace":"quay362","name":"quay362","uid":"75e76122-32a2-49f9-937a-eddf5e02b27c","apiVersion":"quay.redhat.com/v1","resourceVersion":"153576"}, "reason": "ComponentCreationFailed", "message": "all Kubernetes objects not created/updated successfully: PersistentVolumeClaim \"quay362-clair-postgres\" is invalid: spec.resources.requests.storage: Forbidden: field can not be less than previous value"}
      2021-12-10T07:19:10.506Z        INFO    controllers.QuayRegistryStatus  quay components conditions reconciled   {"quayregistrystatus": "quay362/quay362"} 

       

      Steps:

      1. Deploy Quay with Quay Operator to single OCP namespace
      2. Deploy Quay with all managed components except monitoring to use unmanaged, specify to Override the Volume size for both Clair and Postgresql Component, here use 75GB
      3. Open Quay Config editor to set to use external AWS RDS Postgresql DB and external AWS S3 Object Storage
      4. Click Validate configurations
      5. Click Reconfigure Quay
      6. Check the results of Quay Operator reconcile

      Expected Results:

      Quay Operator reconcile complete successfully, and Quay was configured to use external AWS RDS Postgresql DB and AWS S3 Object Storage correctly, and the component of postgres and objectstorage is changed to unmanaged.

      Actual Results:

      Quay Operator was failed to reconcile and report error message ""error": "PersistentVolumeClaim \"quay362-clair-postgres\" is invalid: spec.resources.requests.storage: Forbidden: field can not be less than previous value""

      Attachments

        Activity

          People

            fmissi Flavian Missi
            lzha1981 luffy zhang
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: