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

Quay 3.9.0 delete organization hit 500 error when enabled quota management

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Critical Critical
    • quay-v3.9.0
    • quay-v3.9.0
    • quay
    • False
    • Hide

      None

      Show
      None
    • False

      Description:

      This is an issue found of Quay 3.9.0. after enabled Quota Management, create new organization and new image repository, configure new image repo to mirror images from external image registry(1000 tags), during the mirror process(not finished), click delete organization, hit Quay 500 error page. Attached the Quay Logs, Pls review this issue.

      Quay Version:  quay-operator-bundle-container-v3.9.0-71

      Remove Quay Organization hit Quay 500 Error Page:

      nginx stdout | 127.0.0.1 (-) - - [09/May/2023:10:01:17 +0000] "GET /v1/_internal_ping HTTP/1.1" 200 4 "-" "python-requests/2.27.1" (0.002 162 0.002)
      gunicorn-web stdout |     robot.delete_instance(recursive=True, delete_nullable=True)
      gunicorn-web stdout |   File "/quay-registry/data/database.py", line 705, in delete_instance
      gunicorn-web stdout |     super(User, self).delete_instance(recursive=False, delete_nullable=False)
      gunicorn-web stdout |   File "/usr/local/lib/python3.9/site-packages/peewee.py", line 6480, in delete_instance
      gunicorn-web stdout |     return type(self).delete().where(self._pk_expr()).execute()
      gunicorn-web stdout |   File "/usr/local/lib/python3.9/site-packages/peewee.py", line 1845, in inner
      gunicorn-web stdout |     return method(self, database, *args, **kwargs)
      gunicorn-web stdout |   File "/usr/local/lib/python3.9/site-packages/peewee.py", line 1916, in execute
      gunicorn-web stdout |     return self._execute(database)
      gunicorn-web stdout |   File "/usr/local/lib/python3.9/site-packages/peewee.py", line 2400, in _execute
      gunicorn-web stdout |     cursor = database.execute(self)
      gunicorn-web stdout |   File "/usr/local/lib/python3.9/site-packages/peewee.py", line 3070, in execute
      gunicorn-web stdout |     return self.execute_sql(sql, params, commit=commit)
      gunicorn-web stdout |   File "/quay-registry/data/database.py", line 226, in execute_sql
      gunicorn-web stdout |     cursor = super(RetryOperationalError, self).execute_sql(sql, params, commit)
      gunicorn-web stdout |   File "/usr/local/lib/python3.9/site-packages/peewee.py", line 3064, in execute_sql
      gunicorn-web stdout |     self.commit()
      gunicorn-web stdout |   File "/usr/local/lib/python3.9/site-packages/peewee.py", line 2831, in __exit__
      gunicorn-web stdout |     reraise(new_type, new_type(exc_value, *exc_args), traceback)
      gunicorn-web stdout |   File "/usr/local/lib/python3.9/site-packages/peewee.py", line 183, in reraise
      gunicorn-web stdout |     raise value.with_traceback(tb)
      gunicorn-web stdout |   File "/usr/local/lib/python3.9/site-packages/peewee.py", line 3057, in execute_sql
      gunicorn-web stdout |     cursor.execute(sql, params or ())
      gunicorn-web stdout | peewee.IntegrityError: update or delete on table "user" violates foreign key constraint "fk_quotanamespacesize_namespace_user_id_user" on table "quotanamespacesize"
      gunicorn-web stdout | DETAIL:  Key (id)=(3) is still referenced from table "quotanamespacesize".
      gunicorn-web stdout | 2023-05-09 10:01:14,718 [193] [INFO] [gunicorn.access]  - - [09/May/2023:10:01:14 +0000] "DELETE /api/v1/organization/qateam HTTP/1.0" 500 0 "-" "-"
      nginx stdout | 10.131.0.23 (-) - - [09/May/2023:10:01:14 +0000] "DELETE /api/v1/organization/qateam HTTP/1.1" 500 141 "https://quay390-quay-quay-enterprise-720.apps.quaytest-720.qe.devcluster.openshift.com/organization/qateam?tab=settings" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:109.0) Gecko/20100101 Firefox/112.0" (0.160 1712 0.159) 

        1. quay390-1-app-pod.logs
          5.64 MB
          luffy zhang
        2. image-2023-05-09-18-05-24-702.png
          293 kB
          luffy zhang

              bcaton@redhat.com Brandon Caton
              lzha1981 luffy zhang
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: