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

Quay edit permissions of robot account redirect to quay 500 error page

XMLWordPrintable

    • Utapau [Quay 188]

      Description:

      This is an issue when edit the permissions of robot account, after click "Set Repository Permissions" for target robot account, quay redirect to 500 error page, checked Quay POD logs, get "AttributeError: module 'data.model' has no attribute 'repositoy'", see Quay POD logs attached.

      Quay Image: quay.io/projectquay/quay:50ba6130

      Steps:

      1. Login Quay Console
      2. Create new Organization
      3. Create new Image repositoryA
      4. Create new robot account, give write permissions to repositoryA
      5. Create new image repositoryB
      6. Click "Set Repository Permissions" for robot account

      Expected Results:

      Quay should navigate to page where users can edit the permissions

      Actual Results:

      Quay navigate to quay 500 error page

      Quay POD logs:

      gunicorn-web stdout | 2020-08-05 08:04:49,543 [364] [ERROR] [gunicorn.error] Error handling request /api/v1/organization/qateam/robots/siri/permissions

      gunicorn-web stdout | Traceback (most recent call last):

      gunicorn-web stdout |   File "/usr/local/lib/python3.6/site-packages/gunicorn/workers/base_async.py", line 55, in handle

      gunicorn-web stdout |     self.handle_request(listener_name, req, client, addr)

      gunicorn-web stdout |   File "/usr/local/lib/python3.6/site-packages/gunicorn/workers/ggevent.py", line 143, in handle_request

      gunicorn-web stdout |     super().handle_request(listener_name, req, sock, addr)

      gunicorn-web stdout |   File "/usr/local/lib/python3.6/site-packages/gunicorn/workers/base_async.py", line 106, in handle_request

      gunicorn-web stdout |     respiter = self.wsgi(environ, resp.start_response)

      gunicorn-web stdout |   File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 2463, in _call_

      gunicorn-web stdout |     return self.wsgi_app(environ, start_response)

      gunicorn-web stdout |   File "/usr/local/lib/python3.6/site-packages/werkzeug/middleware/proxy_fix.py", line 232, in _call_

      gunicorn-web stdout |     return self.app(environ, start_response)

      gunicorn-web stdout |   File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 2449, in wsgi_app

      gunicorn-web stdout |     response = self.handle_exception(e)

      gunicorn-web stdout |   File "/usr/local/lib/python3.6/site-packages/flask_restful/_init_.py", line 269, in error_router

      gunicorn-web stdout |     return original_handler(e)

      gunicorn-web stdout |   File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 1866, in handle_exception

      gunicorn-web stdout |     reraise(exc_type, exc_value, tb)

      ......

      gunicorn-web stdout |   File "/usr/local/lib/python3.6/site-packages/flask_restful/_init_.py", line 458, in wrapper

      gunicorn-web stdout |     resp = resource(*args, **kwargs)

      gunicorn-web stdout |   File "/usr/local/lib/python3.6/site-packages/flask/views.py", line 89, in view

      gunicorn-web stdout |     return self.dispatch_request(*args, **kwargs)

      gunicorn-web stdout |   File "/usr/local/lib/python3.6/site-packages/flask_restful/_init_.py", line 573, in dispatch_request

      gunicorn-web stdout |     resp = meth(*args, **kwargs)

      gunicorn-web stdout |   File "/quay-registry/endpoints/decorators.py", line 141, in wrapper

      gunicorn-web stdout |     return func(*args, **kwargs)

      gunicorn-web stdout |   File "/quay-registry/endpoints/decorators.py", line 120, in wrapper

      gunicorn-web stdout |     return func(*args, **kwargs)

      gunicorn-web stdout |   File "/quay-registry/endpoints/api/_init_.py", line 320, in wrapped

      gunicorn-web stdout |     return func(self, *args, **kwargs)

      gunicorn-web stdout |   File "/quay-registry/endpoints/api/robot.py", line 307, in get

      gunicorn-web stdout |     permissions = model.list_robot_permissions(robot.name)

      gunicorn-web stdout |   File "/quay-registry/endpoints/api/robot_models_pre_oci.py", line 31, in list_robot_permissions

      gunicorn-web stdout |     for permission in permissions

      gunicorn-web stdout |   File "/quay-registry/endpoints/api/robot_models_pre_oci.py", line 31, in <listcomp>

      gunicorn-web stdout |     for permission in permissions

      gunicorn-web stdout | AttributeError: module 'data.model' has no attribute 'repositoy'

      gunicorn-web stdout | 2020-08-05 08:04:49,544 [364] [INFO] [gunicorn.access]  - - [05/Aug/2020:08:04:49 +0000] "GET /api/v1/organization/qateam/robots/siri/permissions HTTP/1.0" 500 0 "" ""

      nginx stdout | 10.128.2.4 () - - [05/Aug/2020:08:04:49 +0000] "GET /api/v1/organization/qateam/robots/siri/permissions HTTP/2.0" 500 141 "https://demo-quayecosystem-quay-quay-enterprise.apps.quay-281.qe.devcluster.openshift.com/organization/qateam?tab=robots" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:68.0) Gecko/20100101 Firefox/68.0" (0.029 498 0.029)

        1. Quay 500 Error Page.png
          286 kB
          luffy zhang
        2. quaypython3.logs
          9.94 MB
          luffy zhang
        3. Set Repository Permissions.png
          222 kB
          luffy zhang

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

                Created:
                Updated:
                Resolved: