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

Quay 3.7.0 Operator doesn't create new upgrade Job after config quay to use new external Postgres DB with config editor

XMLWordPrintable

      Description:

      This is an issue found when using Quay config editor to configure Quay to use external postgres DB to replace managed postgres database, initially deployed Quay with Operator and use managed postgres DB, then use config editor to update to use external postgres DB, after click 'reconfigure quay', found quay operator will not create new upgrade Job to create schema to new external Postgres DB, the results is new Quay APP POD was crashed, refer to Quay Operator POD logs quay370_operator_pod.logs 

      Quay Image: quay-operator-bundle-container-v3.7.0-114

      Config quay to use unmanaged Postgres DB with config editor:

      oc get pod
      NAME                                             READY   STATUS             RESTARTS      AGE
      demoquay370-clair-app-55c4b9f7c9-4wh4m           1/1     Running            0             3m34s
      demoquay370-clair-app-55c4b9f7c9-cvn47           1/1     Running            0             3m34s
      demoquay370-clair-app-55c4b9f7c9-fqwsq           1/1     Running            0             3m24s
      demoquay370-clair-app-55c4b9f7c9-ssjxk           1/1     Running            0             3m24s
      demoquay370-clair-app-55c4b9f7c9-wf7p6           1/1     Running            0             3m34s
      demoquay370-clair-postgres-868cccf458-rrj4d      1/1     Running            1 (19m ago)   20m
      demoquay370-quay-app-58f958778b-4lwsj            1/1     Running            0             19m
      demoquay370-quay-app-58f958778b-92ww2            1/1     Running            0             19m
      demoquay370-quay-app-5945b9db7b-46brw            0/1     CrashLoopBackOff   5 (11s ago)   3m34s
      demoquay370-quay-app-upgrade-vw78f               0/1     Completed          1             20m
      demoquay370-quay-config-editor-55d448595-xhhw6   1/1     Running            0             3m34s
      demoquay370-quay-database-8c885f655-j6dc6        1/1     Running            0             20m
      demoquay370-quay-mirror-594579d95f-5mgh5         0/1     CrashLoopBackOff   4 (63s ago)   3m4s
      demoquay370-quay-mirror-594579d95f-qmtcz         0/1     CrashLoopBackOff   4 (56s ago)   3m4s
      demoquay370-quay-redis-795c65d98c-r8d28          1/1     Running            0             20m
      quay-operator.v3.7.0-5bc4b6858b-88296            1/1     Running            0             6h48m 
      
      Quay APP POD Logs:
      During handling of the above exception, another exception occurred:
      
      
      Traceback (most recent call last):
        File "./boot.py", line 147, in <module>
          main()
        File "./boot.py", line 138, in main
          sync_database_with_config(app.config)
        File "/quay-registry/util/config/database.py", line 13, in sync_database_with_config
          model.image.ensure_image_locations(*location_names)
        File "/quay-registry/data/model/image.py", line 485, in ensure_image_locations
          for location in locations:
        File "/usr/local/lib/python3.8/site-packages/peewee.py", line 6731, in __iter__
          self.execute()
        File "/usr/local/lib/python3.8/site-packages/peewee.py", line 1845, in inner
          return method(self, database, *args, **kwargs)
        File "/usr/local/lib/python3.8/site-packages/peewee.py", line 1916, in execute
          return self._execute(database)
        File "/usr/local/lib/python3.8/site-packages/peewee.py", line 2087, in _execute
          cursor = database.execute(self)
        File "/usr/local/lib/python3.8/site-packages/peewee.py", line 3070, in execute
          return self.execute_sql(sql, params, commit=commit)
        File "/quay-registry/data/database.py", line 226, in execute_sql
          cursor = super(RetryOperationalError, self).execute_sql(sql, params, commit)
        File "/usr/local/lib/python3.8/site-packages/peewee.py", line 3064, in execute_sql
          self.commit()
        File "/usr/local/lib/python3.8/site-packages/peewee.py", line 2831, in __exit__
          reraise(new_type, new_type(exc_value, *exc_args), traceback)
        File "/usr/local/lib/python3.8/site-packages/peewee.py", line 183, in reraise
          raise value.with_traceback(tb)
        File "/usr/local/lib/python3.8/site-packages/peewee.py", line 3057, in execute_sql
          cursor.execute(sql, params or ())
      peewee.ProgrammingError: relation "imagestoragelocation" does not exist
      LINE 1: SELECT "t1"."id", "t1"."name" FROM "imagestoragelocation" AS...

      Steps:

      1. Deploy Quay with Operator, and use all managed components, only set monitoring component to unmanaged
      2. Login Quay Config editor to update to use external Postgres DB(AWS RDS Postgres), upload the TLS CA Cert of AWS RDS
      3. Click Validate Changes
      4. Click Reconfigure Quay

      Expected Results:

      Operator will create new Upgrade Job to create schema Objects to new unmanaged Postgres DB.

      Actual Results:

      Operator doesn't create new Upgrade Job, the results is new Quay APP POD was crashed.

        1. image-2022-05-09-17-07-31-340.png
          363 kB
          luffy zhang
        2. quay370_operator_pod.logs
          5.99 MB
          luffy zhang

              rmarasch@redhat.com Ricardo Maraschini (Inactive)
              lzha1981 luffy zhang
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: