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

Quay login user hit 500 error code when use Mysql database

    XMLWordPrintable

Details

    • False
    • False
    • Undefined
    • 0

    Description

      Description:

      This is an issue found when use quay config editor to configure quay to mysql database, once validation was passed with quay configure editor, login quay new user hit 500 error code with error "peewee.InternalError: (1054, "Unknown column 't1.state' in 'field list'", see attached Quay POD logs.

      Note: this issue can not be reproduced when using Postgresql database.

      Quay PODs:

      oc get pod
      NAME                                                READY   STATUS      RESTARTS   AGE
      quay-operator.v3.5.3-6fb97d65b-k968b                1/1     Running     0          6h26m
      quayv353mysql-clair-app-645567d7bd-rn45f            1/1     Running     0          4m35s
      quayv353mysql-clair-postgres-9cf79dc7c-gg26h        1/1     Running     0          4m1s
      quayv353mysql-quay-app-696f5d5cbb-zbnsg             1/1     Running     3          4m38s
      quayv353mysql-quay-app-upgrade-9pvzf                0/1     Error       5          4m36s
      quayv353mysql-quay-config-editor-85867cb94c-glk9b   1/1     Running     0          4m36s
      quayv353mysql-quay-database-5965dd789c-jtw58        1/1     Running     0          16m
      quayv353mysql-quay-mirror-86696bcc87-d94q5          1/1     Running     2          3m59s
      quayv353mysql-quay-postgres-init-vfmkq              0/1     Completed   0          16m
      quayv353mysql-quay-redis-5d65c4fdcf-cbkf9           1/1     Running     0          4m32s
      
      oc get pod quayv353mysql-quay-app-696f5d5cbb-zbnsg -o json | jq '.spec.containers[0].image'
      "registry.redhat.io/quay/quay-rhel8@sha256:6bc0876415eee1daa28f04a325c3d31441b52b5b4b1a2c0aff2025627e34a551"
      

       

      Quay Pod logs:

      gunicorn-web stdout | 2021-07-07 09:52:23,091 [233] [ERROR] [gunicorn.error] Error handling request /api/v1/repository?last_modified=true&popularity=true&starred=true
      gunicorn-web stdout | Traceback (most recent call last):
      gunicorn-web stdout |   File "/usr/local/lib/python3.8/site-packages/peewee.py", line 3057, in execute_sql
      gunicorn-web stdout |     cursor.execute(sql, params or ())
      gunicorn-web stdout |   File "/usr/local/lib/python3.8/site-packages/pymysql/cursors.py", line 170, in execute
      gunicorn-web stdout |     result = self._query(query)
      gunicorn-web stdout |   File "/usr/local/lib/python3.8/site-packages/pymysql/cursors.py", line 328, in _query
      gunicorn-web stdout |     conn.query(q)
      gunicorn-web stdout |   File "/usr/local/lib/python3.8/site-packages/pymysql/connections.py", line 517, in query
      gunicorn-web stdout |     self._affected_rows = self._read_query_result(unbuffered=unbuffered)
      gunicorn-web stdout |   File "/usr/local/lib/python3.8/site-packages/pymysql/connections.py", line 732, in _read_query_result
      gunicorn-web stdout |     result.read()
      gunicorn-web stdout |   File "/usr/local/lib/python3.8/site-packages/pymysql/connections.py", line 1075, in read
      gunicorn-web stdout |     first_packet = self.connection._read_packet()
      gunicorn-web stdout |   File "/usr/local/lib/python3.8/site-packages/pymysql/connections.py", line 684, in _read_packet
      gunicorn-web stdout |     packet.check_error()
      gunicorn-web stdout |   File "/usr/local/lib/python3.8/site-packages/pymysql/protocol.py", line 220, in check_error
      gunicorn-web stdout |     err.raise_mysql_exception(self._data)
      gunicorn-web stdout |   File "/usr/local/lib/python3.8/site-packages/pymysql/err.py", line 109, in raise_mysql_exception
      gunicorn-web stdout |     raise errorclass(errno, errval)
      gunicorn-web stdout | pymysql.err.InternalError: (1054, "Unknown column 't1.state' in 'field list'")
      ....
      gunicorn-web stdout |   File "/usr/local/lib/python3.8/site-packages/peewee.py", line 3057, in execute_sql
      gunicorn-web stdout |     cursor.execute(sql, params or ())
      gunicorn-web stdout |   File "/usr/local/lib/python3.8/site-packages/pymysql/cursors.py", line 170, in execute
      gunicorn-web stdout |     result = self._query(query)
      gunicorn-web stdout |   File "/usr/local/lib/python3.8/site-packages/pymysql/cursors.py", line 328, in _query
      gunicorn-web stdout |     conn.query(q)
      gunicorn-web stdout |   File "/usr/local/lib/python3.8/site-packages/pymysql/connections.py", line 517, in query
      gunicorn-web stdout |     self._affected_rows = self._read_query_result(unbuffered=unbuffered)
      gunicorn-web stdout |   File "/usr/local/lib/python3.8/site-packages/pymysql/connections.py", line 732, in _read_query_result
      gunicorn-web stdout |     result.read()
      gunicorn-web stdout |   File "/usr/local/lib/python3.8/site-packages/pymysql/connections.py", line 1075, in read
      gunicorn-web stdout |     first_packet = self.connection._read_packet()
      gunicorn-web stdout |   File "/usr/local/lib/python3.8/site-packages/pymysql/connections.py", line 684, in _read_packet
      gunicorn-web stdout |     packet.check_error()
      gunicorn-web stdout |   File "/usr/local/lib/python3.8/site-packages/pymysql/protocol.py", line 220, in check_error
      gunicorn-web stdout |     err.raise_mysql_exception(self._data)
      gunicorn-web stdout |   File "/usr/local/lib/python3.8/site-packages/pymysql/err.py", line 109, in raise_mysql_exception
      gunicorn-web stdout |     raise errorclass(errno, errval)
      gunicorn-web stdout | peewee.InternalError: (1054, "Unknown column 't1.state' in 'field list'")
      gunicorn-web stdout | 2021-07-07 09:52:23,095 [233] [INFO] [gunicorn.access]  - - [07/Jul/2021:09:52:23 +0000] "GET /api/v1/repository?last_modified=true&popularity=true&starred=true HTTP/1.0" 500 0 "-" "-"

       Steps:

      1. Deploy Quay 3.5.3 with Quay Operator
      2. Login Quay config editor to change to use mysql databas
      3. Click Validate configurations and reconfigure quay
      4. After reconcile successfully, Open Quay Console and create new user, click Login

       

      Expected Results:

      Login Quay with new user successfully.

      Actual Results:

      Login Quay with new user was failed with 500 error page.

      Attachments

        Activity

          People

            bdettelb@redhat.com Bill Dettelback
            lzha1981 luffy zhang
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: