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

Accessing build logs from super user panel doesnt work

XMLWordPrintable

      Navigate to Quay UI --> Super user panel -->  Build logs --> providing the build ID --> Get Logs. Once we click Get Logs it shows Quay 500 error page and throws "AttributeError: 'RepositoryBuild' object has no attribute 'repository_namespace_user_username"  in Quay logs, detailed logs below

       

      {"log":"2020-08-27 03:58:39,422 [451] [DEBUG] [auth.permissions] Deferring permissions for user with uuid: 398a4c20-150a-43de-8144-b534da108005\n","stream":"stdout","time":"2020-08-27T03:58:39.424152715Z"}
      {"log":"gunicorn-web stdout | 2020-08-27 03:58:39,422 [451] [DEBUG] [endpoints.api] Checking fresh login for user testadmin: Last login at 2020-08-27 03:57:44\n","stream":"stdout","time":"2020-08-27T03:58:39.424330718Z"}
      {"log":"2020-08-27 03:58:39,422 [451] [DEBUG] [auth.permissions] Loading user permissions after deferring for: 398a4c20-150a-43de-8144-b534da108005\n","stream":"stdout","time":"2020-08-27T03:58:39.42434008Z"}
      {"log":"2020-08-27 03:58:39,422 [451] [DEBUG] [auth.permissions] User permission: userspecificneed(type='user', username=u'testadmin', role='admin')\n","stream":"stdout","time":"2020-08-27T03:58:39.424343583Z"}
      {"log":"2020-08-27 03:58:39,422 [451] [DEBUG] [auth.permissions] User namespace permission: namespacewide(type='organization', namespace=u'testadmin', role='admin')\n","stream":"stdout","time":"2020-08-27T03:58:39.424346898Z"}
      {"log":"2020-08-27 03:58:39,422 [451] [DEBUG] [auth.permissions] User namespace repo permission: namespacewide(type='organizationrepo', namespace=u'testadmin', role='admin')\n","stream":"stdout","time":"2020-08-27T03:58:39.424350074Z"}
      {"log":"2020-08-27 03:58:39,423 [451] [DEBUG] [auth.permissions] Adding superuser to user: testadmin\n","stream":"stdout","time":"2020-08-27T03:58:39.424353374Z"}
      {"log":"gunicorn-web stdout | 2020-08-27 03:58:39,426 [451] [DEBUG] [peewee] ('SELECT `t1`.`id`, `t1`.`uuid`, `t1`.`repository_id`, `t1`.`access_token_id`, `t1`.`resource_key`, `t1`.`job_config`, `t1`.`phase`, `t1`.`started`, `t1`.`display_name`, `t1`.`trigger_id`, `t1`.`pull_robot_id`, `t1`.`logs_archived`, `t1`.`queue_id`, `t2`.`id`, `t2`.`uuid`, `t2`.`service_id`, `t2`.`repository_id`, `t2`.`connected_user_id`, `t2`.`secure_auth_token`, `t2`.`secure_private_key`, `t2`.`fully_migrated`, `t2`.`config`, `t2`.`write_token_id`, `t2`.`pull_robot_id`, `t2`.`enabled`, `t2`.`disabled_reason_id`, `t2`.`disabled_datetime`, `t2`.`successive_failure_count`, `t2`.`successive_internal_error_count`, `t3`.`id`, `t3`.`name`, `t4`.`id`, `t4`.`namespace_user_id`, `t4`.`name`, `t4`.`visibility_id`, `t4`.`description`, `t4`.`badge_token`, `t4`.`kind_id`, `t4`.`trust_enabled`, `t4`.`state`, `t5`.`id`, `t5`.`uuid`, `t5`.`username`, `t5`.`password_hash`, `t5`.`email`, `t5`.`verified`, `t5`.`stripe_id`, `t5`.`organization`, `t5`.`robot`, `t5`.`invoice_email`, `t5`.`invalid_login_attempts`, `t5`.`last_invalid_login`, `t5`.`removed_tag_expiration_s`, `t5`.`enabled`, `t5`.`invoice_email_address`, `t5`.`given_name`, `t5`.`family_name`, `t5`.`company`, `t5`.`location`, `t5`.`maximum_queued_builds_count`, `t5`.`creation_date`, `t5`.`last_accessed`, `t6`.`id`, `t6`.`uuid`, `t6`.`username`, `t6`.`password_hash`, `t6`.`email`, `t6`.`verified`, `t6`.`stripe_id`, `t6`.`organization`, `t6`.`robot`, `t6`.`invoice_email`, `t6`.`invalid_login_attempts`, `t6`.`last_invalid_login`, `t6`.`removed_tag_expiration_s`, `t6`.`enabled`, `t6`.`invoice_email_address`, `t6`.`given_name`, `t6`.`family_name`, `t6`.`company`, `t6`.`location`, `t6`.`maximum_queued_builds_count`, `t6`.`creation_date`, `t6`.`last_accessed` FROM `repositorybuild` AS `t1` INNER JOIN `repository` AS `t4` ON (`t1`.`repository_id` = `t4`.`id`) INNER JOIN `user` AS `t5` ON (`t4`.`namespace_user_id` = `t5`.`id`) LEFT OUTER JOIN `user` AS `t6` ON (`t1`.`pull_robot_id` = `t6`.`id`) LEFT OUTER JOIN `repositorybuildtrigger` AS `t2` ON (`t1`.`trigger_id` = `t2`.`id`) LEFT OUTER JOIN `buildtriggerservice` AS `t3` ON (`t2`.`service_id` = `t3`.`id`) WHERE (`t1`.`uuid` = %s) ORDER BY `t1`.`started` DESC LIMIT %s OFFSET %s', [u'595b8c45-d2ea-44ca-ac32-c4a7aecd05fa', 1, 0])\n","stream":"stdout","time":"2020-08-27T03:58:39.428855574Z"}
      {"log":"gunicorn-web stdout | 2020-08-27 03:58:39,435 [451] [DEBUG] [data.database] Disconnecting from database.\n","stream":"stdout","time":"2020-08-27T03:58:39.437983832Z"}
      {"log":"gunicorn-web stdout | 2020-08-27 03:58:39,436 [451] [ERROR] [gunicorn.error] Error handling request /api/v1/superuser/595b8c45-d2ea-44ca-ac32-c4a7aecd05fa/build\n","stream":"stdout","time":"2020-08-27T03:58:39.486544122Z"}
      {"log":"Traceback (most recent call last):\n","stream":"stdout","time":"2020-08-27T03:58:39.486596594Z"}
      {"log":"  File \"/opt/rh/python27/root/usr/lib/python2.7/site-packages/gunicorn/workers/base_async.py\", line 56, in handle\n","stream":"stdout","time":"2020-08-27T03:58:39.486601608Z"}
      {"log":"    self.handle_request(listener_name, req, client, addr)\n","stream":"stdout","time":"2020-08-27T03:58:39.486605271Z"}
      {"log":"  File \"/opt/rh/python27/root/usr/lib/python2.7/site-packages/gunicorn/workers/ggevent.py\", line 160, in handle_request\n","stream":"stdout","time":"2020-08-27T03:58:39.48660839Z"}
      {"log":"    addr)\n","stream":"stdout","time":"2020-08-27T03:58:39.486612833Z"}
      {"log":"  File \"/opt/rh/python27/root/usr/lib/python2.7/site-packages/gunicorn/workers/base_async.py\", line 107, in handle_request\n","stream":"stdout","time":"2020-08-27T03:58:39.48661613Z"}
      {"log":"    respiter = self.wsgi(environ, resp.start_response)\n","stream":"stdout","time":"2020-08-27T03:58:39.486619431Z"}
      {"log":"  File \"/opt/rh/python27/root/usr/lib/python2.7/site-packages/flask/app.py\", line 2463, in __call__\n","stream":"stdout","time":"2020-08-27T03:58:39.486622348Z"}
      {"log":"    return self.wsgi_app(environ, start_response)\n","stream":"stdout","time":"2020-08-27T03:58:39.486625485Z"}
      {"log":"  File \"/opt/rh/python27/root/usr/lib/python2.7/site-packages/werkzeug/middleware/proxy_fix.py\", line 232, in __call__\n","stream":"stdout","time":"2020-08-27T03:58:39.486628439Z"}
      {"log":"    return self.app(environ, start_response)\n","stream":"stdout","time":"2020-08-27T03:58:39.486631693Z"}
      {"log":"  File \"/opt/rh/python27/root/usr/lib/python2.7/site-packages/flask/app.py\", line 2449, in wsgi_app\n","stream":"stdout","time":"2020-08-27T03:58:39.486672896Z"}
      {"log":"    response = self.handle_exception(e)\n","stream":"stdout","time":"2020-08-27T03:58:39.486678495Z"}
      {"log":"  File \"/opt/rh/python27/root/usr/lib/python2.7/site-packages/flask_restful/__init__.py\", line 269, in error_router\n","stream":"stdout","time":"2020-08-27T03:58:39.486681435Z"}
      {"log":"    return original_handler(e)\n","stream":"stdout","time":"2020-08-27T03:58:39.486684767Z"}
      {"log":"  File \"/opt/rh/python27/root/usr/lib/python2.7/site-packages/flask/app.py\", line 1866, in handle_exception\n","stream":"stdout","time":"2020-08-27T03:58:39.486687643Z"}
      {"log":"    reraise(exc_type, exc_value, tb)\n","stream":"stdout","time":"2020-08-27T03:58:39.486691252Z"}
      {"log":"  File \"/opt/rh/python27/root/usr/lib/python2.7/site-packages/flask_restful/__init__.py\", line 266, in error_router\n","stream":"stdout","time":"2020-08-27T03:58:39.486694176Z"}
      {"log":"    return self.handle_error(e)\n","stream":"stdout","time":"2020-08-27T03:58:39.486697323Z"}
      {"log":"  File \"/opt/rh/python27/root/usr/lib/python2.7/site-packages/flask_restful/utils/cors.py\", line 35, in wrapped_function\n","stream":"stdout","time":"2020-08-27T03:58:39.486700127Z"}
      {"log":"    resp = make_response(f(*args, **kwargs))\n","stream":"stdout","time":"2020-08-27T03:58:39.486703296Z"}
      {"log":"  File \"/quay-registry/endpoints/api/__init__.py\", line 61, in handle_error\n","stream":"stdout","time":"2020-08-27T03:58:39.486706649Z"}
      {"log":"    return super(ApiExceptionHandlingApi, self).handle_error(error)\n","stream":"stdout","time":"2020-08-27T03:58:39.486710024Z"}
      {"log":"  File \"/opt/rh/python27/root/usr/lib/python2.7/site-packages/flask/app.py\", line 2446, in wsgi_app\n","stream":"stdout","time":"2020-08-27T03:58:39.486713105Z"}
      {"log":"    response = self.full_dispatch_request()\n","stream":"stdout","time":"2020-08-27T03:58:39.486716148Z"}
      {"log":"  File \"/opt/rh/python27/root/usr/lib/python2.7/site-packages/flask/app.py\", line 1951, in full_dispatch_request\n","stream":"stdout","time":"2020-08-27T03:58:39.486720356Z"}
      {"log":"    rv = self.handle_user_exception(e)\n","stream":"stdout","time":"2020-08-27T03:58:39.486723589Z"}
      {"log":"  File \"/opt/rh/python27/root/usr/lib/python2.7/site-packages/flask_restful/__init__.py\", line 269, in error_router\n","stream":"stdout","time":"2020-08-27T03:58:39.486726392Z"}
      {"log":"    return original_handler(e)\n","stream":"stdout","time":"2020-08-27T03:58:39.486733588Z"}
      {"log":"  File \"/opt/rh/python27/root/usr/lib/python2.7/site-packages/flask/app.py\", line 1820, in handle_user_exception\n","stream":"stdout","time":"2020-08-27T03:58:39.486736536Z"}
      {"log":"    reraise(exc_type, exc_value, tb)\n","stream":"stdout","time":"2020-08-27T03:58:39.486739924Z"}
      {"log":"  File \"/opt/rh/python27/root/usr/lib/python2.7/site-packages/flask_restful/__init__.py\", line 266, in error_router\n","stream":"stdout","time":"2020-08-27T03:58:39.486742753Z"}
      {"log":"    return self.handle_error(e)\n","stream":"stdout","time":"2020-08-27T03:58:39.486745801Z"}
      {"log":"  File \"/opt/rh/python27/root/usr/lib/python2.7/site-packages/flask_restful/utils/cors.py\", line 35, in wrapped_function\n","stream":"stdout","time":"2020-08-27T03:58:39.486748583Z"}
      {"log":"    resp = make_response(f(*args, **kwargs))\n","stream":"stdout","time":"2020-08-27T03:58:39.486751626Z"}
      {"log":"  File \"/quay-registry/endpoints/api/__init__.py\", line 61, in handle_error\n","stream":"stdout","time":"2020-08-27T03:58:39.486754485Z"}
      {"log":"    return super(ApiExceptionHandlingApi, self).handle_error(error)\n","stream":"stdout","time":"2020-08-27T03:58:39.486757482Z"}
      {"log":"  File \"/opt/rh/python27/root/usr/lib/python2.7/site-packages/flask/app.py\", line 1949, in full_dispatch_request\n","stream":"stdout","time":"2020-08-27T03:58:39.48676032Z"}
      {"log":"    rv = self.dispatch_request()\n","stream":"stdout","time":"2020-08-27T03:58:39.486763431Z"}
      {"log":"  File \"/opt/rh/python27/root/usr/lib/python2.7/site-packages/flask/app.py\", line 1935, in dispatch_request\n","stream":"stdout","time":"2020-08-27T03:58:39.486766527Z"}
      {"log":"    return self.view_functions[rule.endpoint](**req.view_args)\n","stream":"stdout","time":"2020-08-27T03:58:39.486769617Z"}
      {"log":"  File \"/quay-registry/endpoints/decorators.py\", line 197, in wrapper\n","stream":"stdout","time":"2020-08-27T03:58:39.486773921Z"}
      {"log":"    return func(*args, **kwargs)\n","stream":"stdout","time":"2020-08-27T03:58:39.486781651Z"}
      {"log":"  File \"/quay-registry/auth/decorators.py\", line 65, in wrapper\n","stream":"stdout","time":"2020-08-27T03:58:39.486788738Z"}
      {"log":"    return func(*args, **kwargs)\n","stream":"stdout","time":"2020-08-27T03:58:39.486796178Z"}
      {"log":"  File \"/opt/rh/python27/root/usr/lib/python2.7/site-packages/flask_restful/utils/cors.py\", line 35, in wrapped_function\n","stream":"stdout","time":"2020-08-27T03:58:39.486815274Z"}
      {"log":"    resp = make_response(f(*args, **kwargs))\n","stream":"stdout","time":"2020-08-27T03:58:39.487215286Z"}
      {"log":"  File \"/quay-registry/endpoints/csrf.py\", line 73, in wrapper\n","stream":"stdout","time":"2020-08-27T03:58:39.487231286Z"}
      {"log":"    resp = func(*args, **kwargs)\n","stream":"stdout","time":"2020-08-27T03:58:39.487236418Z"}
      {"log":"  File \"/opt/rh/python27/root/usr/lib/python2.7/site-packages/flask_restful/__init__.py\", line 458, in wrapper\n","stream":"stdout","time":"2020-08-27T03:58:39.48724047Z"}
      {"log":"    resp = resource(*args, **kwargs)\n","stream":"stdout","time":"2020-08-27T03:58:39.487246719Z"}
      {"log":"  File \"/opt/rh/python27/root/usr/lib/python2.7/site-packages/flask/views.py\", line 89, in view\n","stream":"stdout","time":"2020-08-27T03:58:39.487251449Z"}
      {"log":"    return self.dispatch_request(*args, **kwargs)\n","stream":"stdout","time":"2020-08-27T03:58:39.48726172Z"}
      {"log":"  File \"/opt/rh/python27/root/usr/lib/python2.7/site-packages/flask_restful/__init__.py\", line 573, in dispatch_request\n","stream":"stdout","time":"2020-08-27T03:58:39.487382803Z"}
      {"log":"    resp = meth(*args, **kwargs)\n","stream":"stdout","time":"2020-08-27T03:58:39.487412737Z"}
      {"log":"  File \"/quay-registry/endpoints/decorators.py\", line 141, in wrapper\n","stream":"stdout","time":"2020-08-27T03:58:39.487418713Z"}
      {"log":"    return func(*args, **kwargs)\n","stream":"stdout","time":"2020-08-27T03:58:39.487424728Z"}
      {"log":"  File \"/quay-registry/endpoints/decorators.py\", line 120, in wrapper\n","stream":"stdout","time":"2020-08-27T03:58:39.487448801Z"}
      {"log":"    return func(*args, **kwargs)\n","stream":"stdout","time":"2020-08-27T03:58:39.487562679Z"}
      {"log":"  File \"/quay-registry/endpoints/api/__init__.py\", line 370, in wrapped\n","stream":"stdout","time":"2020-08-27T03:58:39.487632417Z"}
      {"log":"    return func(*args, **kwargs)\n","stream":"stdout","time":"2020-08-27T03:58:39.487685476Z"}
      {"log":"  File \"/quay-registry/endpoints/api/__init__.py\", line 343, in wrapped\n","stream":"stdout","time":"2020-08-27T03:58:39.487692135Z"}
      {"log":"    return func(*args, **kwargs)\n","stream":"stdout","time":"2020-08-27T03:58:39.487697944Z"}
      {"log":"  File \"/quay-registry/endpoints/api/__init__.py\", line 382, in wrapped\n","stream":"stdout","time":"2020-08-27T03:58:39.487702448Z"}
      {"log":"    return func(*args, **kwargs)\n","stream":"stdout","time":"2020-08-27T03:58:39.487707055Z"}
      {"log":"  File \"/quay-registry/endpoints/api/superuser.py\", line 922, in get\n","stream":"stdout","time":"2020-08-27T03:58:39.487711868Z"}
      {"log":"    build = pre_oci_model.get_repository_build(build_uuid)\n","stream":"stdout","time":"2020-08-27T03:58:39.487717227Z"}
      {"log":"  File \"/quay-registry/endpoints/api/superuser_models_pre_oci.py\", line 78, in get_repository_build\n","stream":"stdout","time":"2020-08-27T03:58:39.487722749Z"}
      {"log":"    repo_namespace = build.repository_namespace_user_username\n","stream":"stdout","time":"2020-08-27T03:58:39.487726478Z"}
      {"log":"  File \"/quay-registry/data/database.py\", line 577, in __getattribute__\n","stream":"stdout","time":"2020-08-27T03:58:39.487734629Z"}
      {"log":"    return super(BaseModel, self).__getattribute__(name)\n","stream":"stdout","time":"2020-08-27T03:58:39.487747956Z"}
      {"log":"AttributeError: 'RepositoryBuild' object has no attribute 'repository_namespace_user_username'\n","stream":"stdout","time":"2020-08-27T03:58:39.487761302Z"}
      {"log":"gunicorn-web stdout | 2020-08-27 03:58:39,482 [451] [INFO] [gunicorn.access]  - - [27/Aug/2020:03:58:39 +0000] \"GET /api/v1/superuser/595b8c45-d2ea-44ca-ac32-c4a7aecd05fa/build HTTP/1.0\" 500 0 \"-\" \"-\"\n","stream":"stdout","time":"2020-08-27T03:58:39.487775467Z"}
      {"log":"nginx stdout | 10.64.54.156 () - - [27/Aug/2020:03:58:39 +0000] \"GET /api/v1/superuser/595b8c45-d2ea-44ca-ac32-c4a7aecd05fa/build HTTP/2.0\" 500 141 \"https://node-0.quaydix.lab.pnq2.cee.redhat.com/superuser/?tab=super-user-build-logs\" \"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.181 Safari/537.36\" (0.080 2590 0.080)\n","stream":"stdout","time":"2020-08-27T03:58:39.488637672Z"}
      
      

       

              sleesinc Kenny Lee Sin Cheong
              rhn-support-dgangaia Dixit Gangaiah (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: