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

Quay 3.7.0 push image get 500 internal error

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Blocker Blocker
    • quay-v3.7.0
    • quay-v3.7.0
    • quay
    • None
    • 0

      Description:

      This is an issue found when push image to Quay, when the backend storage is Azure MAG Blob storage, push image get 500 internal error, and checked Quay APP POD, get error "gunicorn-registry stdout | peewee.DataError: invalid input syntax for integer: "quay", see attached Quay APP POD logs quay370_app_pod1.logs 

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

      Config Quay to use MAG storage with config editor:

      podman push quay370.apps.quayperf370.perfscale.devcluster.openshift.com/quay/demo --tls-verify=false
      Getting image source signatures
      Copying blob eb4827143dd5 [--------------------------------------] 8.0b / 3.4MiB
      Copying blob 289452c265f5 [--------------------------------------] 8.0b / 4.0MiB
      Copying blob 8f6516bbd7c3 [--------------------------------------] 8.0b / 332.0KiB
      Copying blob f121e8841357 [--------------------------------------] 8.0b / 9.7MiB
      Copying blob 9829cf46cc7b [--------------------------------------] 8.0b / 24.5MiB
      Copying blob 9c1b6dd6c1e6 [--------------------------------------] 8.0b / 80.0MiB
      Copying blob 54ccbeacfc8c [--------------------------------------] 8.0b / 2.0KiB
      Copying blob 12e6d5c212c5 [--------------------------------------] 8.0b / 8.5KiB
      Copying blob bb50f3907a94 [--------------------------------------] 8.0b / 65.0KiB
      Copying blob 65a24bc36638 [--------------------------------------] 8.0b / 2.0KiB
      Copying blob f689b0784ee9 [--------------------------------------] 8.0b / 3.5KiB
      Copying blob a17023a68ac1 [--------------------------------------] 8.0b / 15.0KiB
      Copying blob 1c17577cdf5c [--------------------------------------] 8.0b / 244.2MiB
      Error: writing blob: initiating layer upload to /v2/quay/demo/blobs/uploads/ in quay370.apps.quayperf370.perfscale.devcluster.openshift.com: received unexpected HTTP status: 500 Internal Server Error 

      Quay APP POD logs:

      gunicorn-registry stdout | 2022-04-27 10:07:57,710 [226] [ERROR] [gunicorn.error] Error handling request /v2/quay/demo/blobs/uploads/
      gunicorn-registry stdout | Traceback (most recent call last):
      gunicorn-registry stdout |   File "/usr/local/lib/python3.8/site-packages/peewee.py", line 3057, in execute_sql
      gunicorn-registry stdout |     cursor.execute(sql, params or ())
      gunicorn-registry stdout | psycopg2.errors.InvalidTextRepresentation: invalid input syntax for integer: "quay"
      gunicorn-registry stdout | LINE 1: ...LUES ('e88e621c-7e64-4d39-a211-5027aefa4b7f', 18, 'quay', '{...
      gunicorn-registry stdout |                                                              ^
      gunicorn-registry stdout | During handling of the above exception, another exception occurred:
      gunicorn-registry stdout | Traceback (most recent call last):
      gunicorn-registry stdout |   File "/usr/local/lib/python3.8/site-packages/gunicorn/workers/base_async.py", line 55, in handle
      gunicorn-registry stdout |     self.handle_request(listener_name, req, client, addr)
      gunicorn-registry stdout |   File "/usr/local/lib/python3.8/site-packages/gunicorn/workers/ggevent.py", line 127, in handle_request
      gunicorn-registry stdout |     super().handle_request(listener_name, req, sock, addr)
      gunicorn-registry stdout |   File "/usr/local/lib/python3.8/site-packages/gunicorn/workers/base_async.py", line 108, in handle_request
      gunicorn-registry stdout |     respiter = self.wsgi(environ, resp.start_response)
      gunicorn-registry stdout |   File "/usr/local/lib/python3.8/site-packages/flask/app.py", line 2463, in __call__
      gunicorn-registry stdout |     return self.wsgi_app(environ, start_response)
      gunicorn-registry stdout |   File "/usr/local/lib/python3.8/site-packages/werkzeug/middleware/proxy_fix.py", line 232, in __call__
      gunicorn-registry stdout |     return self.app(environ, start_response)
      gunicorn-registry stdout |   File "/usr/local/lib/python3.8/site-packages/flask/app.py", line 2449, in wsgi_app
      gunicorn-registry stdout |     response = self.handle_exception(e)
      gunicorn-registry stdout |   File "/usr/local/lib/python3.8/site-packages/flask/app.py", line 1866, in handle_exception
      gunicorn-registry stdout |     reraise(exc_type, exc_value, tb)
      gunicorn-registry stdout |   File "/usr/local/lib/python3.8/site-packages/flask/_compat.py", line 39, in reraise
      gunicorn-registry stdout |     raise value
      gunicorn-registry stdout |   File "/usr/local/lib/python3.8/site-packages/flask/app.py", line 2446, in wsgi_app
      gunicorn-registry stdout |     response = self.full_dispatch_request()
      gunicorn-registry stdout |   File "/usr/local/lib/python3.8/site-packages/flask/app.py", line 1951, in full_dispatch_request
      gunicorn-registry stdout |     rv = self.handle_user_exception(e)
      gunicorn-registry stdout |   File "/usr/local/lib/python3.8/site-packages/flask/app.py", line 1820, in handle_user_exception
      gunicorn-registry stdout |     reraise(exc_type, exc_value, tb)
      gunicorn-registry stdout |   File "/usr/local/lib/python3.8/site-packages/flask/_compat.py", line 39, in reraise
      gunicorn-registry stdout |     raise value
      gunicorn-registry stdout |   File "/usr/local/lib/python3.8/site-packages/flask/app.py", line 1949, in full_dispatch_request
      gunicorn-registry stdout |     rv = self.dispatch_request()
      gunicorn-registry stdout |   File "/usr/local/lib/python3.8/site-packages/flask/app.py", line 1935, in dispatch_request
      gunicorn-registry stdout |     return self.view_functions[rule.endpoint](**req.view_args)
      gunicorn-registry stdout |   File "/quay-registry/endpoints/decorators.py", line 218, in wrapper
      gunicorn-registry stdout |     return func(*args, **kwargs)
      gunicorn-registry stdout |   File "/quay-registry/endpoints/decorators.py", line 91, in wrapper
      gunicorn-registry stdout |     return func(*args, **kwargs)
      gunicorn-registry stdout |   File "/quay-registry/auth/registry_jwt_auth.py", line 177, in wrapper
      gunicorn-registry stdout |     return func(*args, **kwargs)
      gunicorn-registry stdout |   File "/quay-registry/endpoints/v2/__init__.py", line 143, in wrapped
      gunicorn-registry stdout |     return func(namespace_name, repo_name, *args, **kwargs)
      gunicorn-registry stdout |   File "/quay-registry/endpoints/decorators.py", line 154, in wrapper
      gunicorn-registry stdout |     return func(*args, **kwargs)
      gunicorn-registry stdout |   File "/quay-registry/endpoints/decorators.py", line 179, in wrapper
      gunicorn-registry stdout |     return func(*args, **kwargs)
      gunicorn-registry stdout |   File "/quay-registry/endpoints/v2/blob.py", line 245, in start_blob_upload
      gunicorn-registry stdout |     namespacequota.notify_organization_admins(repository_ref, "quota_error")
      gunicorn-registry stdout |   File "/quay-registry/data/model/namespacequota.py", line 222, in notify_organization_admins
      gunicorn-registry stdout |     notification.create_notification(
      gunicorn-registry stdout |   File "/quay-registry/data/model/notification.py", line 24, in create_notification
      gunicorn-registry stdout |     notification = Notification.create(
      gunicorn-registry stdout |   File "/usr/local/lib/python3.8/site-packages/peewee.py", line 6235, in create
      gunicorn-registry stdout |     inst.save(force_insert=True)
      gunicorn-registry stdout |   File "/usr/local/lib/python3.8/site-packages/peewee.py", line 6433, in save
      gunicorn-registry stdout |     pk = self.insert(**field_dict).execute()
      gunicorn-registry stdout |   File "/usr/local/lib/python3.8/site-packages/peewee.py", line 1845, in inner
      gunicorn-registry stdout |     return method(self, database, *args, **kwargs)
      gunicorn-registry stdout |   File "/usr/local/lib/python3.8/site-packages/peewee.py", line 1916, in execute
      gunicorn-registry stdout |     return self._execute(database)
      gunicorn-registry stdout |   File "/usr/local/lib/python3.8/site-packages/peewee.py", line 2665, in _execute
      gunicorn-registry stdout |     return super(Insert, self)._execute(database)
      gunicorn-registry stdout |   File "/usr/local/lib/python3.8/site-packages/peewee.py", line 2398, in _execute
      gunicorn-registry stdout |     cursor = self.execute_returning(database)
      gunicorn-registry stdout |   File "/usr/local/lib/python3.8/site-packages/peewee.py", line 2405, in execute_returning
      gunicorn-registry stdout |     cursor = database.execute(self)
      gunicorn-registry stdout |   File "/usr/local/lib/python3.8/site-packages/peewee.py", line 3070, in execute
      gunicorn-registry stdout |     return self.execute_sql(sql, params, commit=commit)
      gunicorn-registry stdout |   File "/quay-registry/data/database.py", line 226, in execute_sql
      gunicorn-registry stdout |     cursor = super(RetryOperationalError, self).execute_sql(sql, params, commit)
      gunicorn-registry stdout |   File "/usr/local/lib/python3.8/site-packages/peewee.py", line 3064, in execute_sql
      gunicorn-registry stdout |     self.commit()
      gunicorn-registry stdout |   File "/usr/local/lib/python3.8/site-packages/peewee.py", line 2831, in __exit__
      gunicorn-registry stdout |     reraise(new_type, new_type(exc_value, *exc_args), traceback)
      gunicorn-registry stdout |   File "/usr/local/lib/python3.8/site-packages/peewee.py", line 183, in reraise
      gunicorn-registry stdout |     raise value.with_traceback(tb)
      gunicorn-registry stdout |   File "/usr/local/lib/python3.8/site-packages/peewee.py", line 3057, in execute_sql
      gunicorn-registry stdout |     cursor.execute(sql, params or ())
      gunicorn-registry stdout | peewee.DataError: invalid input syntax for integer: "quay"
      gunicorn-registry stdout | LINE 1: ...LUES ('e88e621c-7e64-4d39-a211-5027aefa4b7f', 18, 'quay', '{...
      gunicorn-registry stdout |                                                              ^
      gunicorn-registry stdout | 2022-04-27 10:07:57,711 [226] [INFO] [gunicorn.access]  - - [27/Apr/2022:10:07:57 +0000] "POST /v2/quay/demo/blobs/uploads/ HTTP/1.1" 500 0 "-" "-" 

            sleesinc Kenny Lee Sin Cheong
            lzha1981 luffy zhang
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: