Horizon Traceback (Internal Server Error) navigating to API Access page

Bug #1874902 reported by Wendy Mitchell
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
StarlingX
Fix Released
Medium
Andy

Bug Description

Horizon Project - API Access navigation generates Traceback (Internal Server Error)

Severity
--------
Standard

Steps to Reproduce
------------------

1. Log into the Horizon
2. Select Project - API Access

Expected Behavior
------------------
Did not expect Internal server error

Actual Behavior
----------------
Internal server error on Navigation to API Access page

Reproducibility
---------------
yes

System Configuration
----------------
any

Branch/Pull Time/Commit
-----------------------
"2020-04-23_15-52-58"

Last Pass
---------

Timestamp/Logs
--------------

2020-04-24 19:48:32,008 [ERROR] django.request: Internal Server Error: /project/api_access/
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/django/core/handlers/exception.py", line 41, in inner
    response = get_response(request)
  File "/usr/lib/python2.7/site-packages/django/core/handlers/base.py", line 187, in _get_response
    response = self.process_exception_by_middleware(e, request)
  File "/usr/lib/python2.7/site-packages/django/core/handlers/base.py", line 185, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/usr/lib/python2.7/site-packages/horizon/decorators.py", line 52, in dec
    return view_func(request, *args, **kwargs)
  File "/usr/lib/python2.7/site-packages/horizon/decorators.py", line 36, in dec
    return view_func(request, *args, **kwargs)
  File "/usr/lib/python2.7/site-packages/horizon/decorators.py", line 36, in dec
    return view_func(request, *args, **kwargs)
  File "/usr/lib/python2.7/site-packages/horizon/decorators.py", line 113, in dec
    return view_func(request, *args, **kwargs)
  File "/usr/lib/python2.7/site-packages/django/views/generic/base.py", line 68, in view
    return self.dispatch(request, *args, **kwargs)
  File "/usr/lib/python2.7/site-packages/django/views/generic/base.py", line 88, in dispatch
    return handler(request, *args, **kwargs)
  File "/usr/lib/python2.7/site-packages/horizon/tables/views.py", line 223, in get
    handled = self.construct_tables()
  File "/usr/lib/python2.7/site-packages/horizon/tables/views.py", line 214, in construct_tables
    handled = self.handle_table(table)
  File "/usr/lib/python2.7/site-packages/horizon/tables/views.py", line 123, in handle_table
    data = self._get_data_dict()
  File "/usr/lib/python2.7/site-packages/horizon/tables/views.py", line 252, in _get_data_dict
    self._data = {self.table_class._meta.name: self.get_data()}
  File "/usr/share/openstack-dashboard/openstack_dashboard/dashboards/project/api_access/views.py", line 238, in get_data
    self.request.user.services_region))
  File "/usr/share/openstack-dashboard/openstack_dashboard/api/keystone.py", line 96, in __init__
    self.url = base.get_url_for_service(service, region)
TypeError: get_url_for_service() takes exactly 3 arguments (2 given)

Possibly related to commit https://review.opendev.org/#/c/720852/1

Test Activity
------------
regression

tags: added: stx.retestneeded
Revision history for this message
Ghada Khalil (gkhalil) wrote :

stx.4.0 / medium priority - issue appears isolated to this particular page. Unclear if this page was working previously.

tags: added: stx.4.0 stx.gui
Changed in starlingx:
importance: Undecided → Medium
status: New → Triaged
assignee: nobody → Dariush Eslimi (deslimi)
Ghada Khalil (gkhalil)
Changed in starlingx:
assignee: Dariush Eslimi (deslimi) → Andy (andy.wrs)
Revision history for this message
Ghada Khalil (gkhalil) wrote :

It's suspected that this is related to a recent code change: https://review.opendev.org/#/c/720852/

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to upstream (master)

Fix proposed to branch: master
Review: https://review.opendev.org/724651

Changed in starlingx:
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to upstream (master)

Reviewed: https://review.opendev.org/724651
Committed: https://git.openstack.org/cgit/starlingx/upstream/commit/?id=3b04384192301098aba2cc56831d7d25b8737433
Submitter: Zuul
Branch: master

commit 3b04384192301098aba2cc56831d7d25b8737433
Author: Andy Ning <email address hidden>
Date: Thu Apr 30 09:15:24 2020 -0400

    Set service's self url based on settings for Horizon

    The intention of the original patch is to remove Horizon's reference to
    internal endpoint so that the default endpoint type specified in settings
    (OPENSTACK_ENDPOINT_TYPE) can take effect uniformly across all services.
    But the patched function base.get_url_for_service() take 3 mandatory
    parameters. So removing the third param causes Horizon traceback when
    accessing API Access page.

    This commit updated the patch so that services's self url is set to
    the value of OPENSTACK_ENDPOINT_TYPE in settings (or default to
    "internalURL" if OPENSTACK_ENDPOINT_TYPE is not set).

    Change-Id: I19604d702f5f2de80dc4d0f426154fb5a0b9ad78
    Closes-Bug: 1874902
    Signed-off-by: Andy Ning <email address hidden>

Changed in starlingx:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to upstream (f/centos8)

Fix proposed to branch: f/centos8
Review: https://review.opendev.org/729828

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to upstream (f/centos8)
Download full text (9.3 KiB)

Reviewed: https://review.opendev.org/729828
Committed: https://git.openstack.org/cgit/starlingx/upstream/commit/?id=253f9ec5506cb87f7d928249e39ed8349be0fd63
Submitter: Zuul
Branch: f/centos8

commit 8e1bc6dc344cf03b67c11fd5bc4b8759076d6fb4
Author: Scott Little <email address hidden>
Date: Thu Apr 30 23:21:43 2020 -0400

    Fix missing build dependency in python-neutronclient

    Closes-Bug: 1876229
    Change-Id: I61cb4f37888d4a0f1122ff5d6e15a2de3544dc1f
    Signed-off-by: Scott Little <email address hidden>

commit 3b04384192301098aba2cc56831d7d25b8737433
Author: Andy Ning <email address hidden>
Date: Thu Apr 30 09:15:24 2020 -0400

    Set service's self url based on settings for Horizon

    The intention of the original patch is to remove Horizon's reference to
    internal endpoint so that the default endpoint type specified in settings
    (OPENSTACK_ENDPOINT_TYPE) can take effect uniformly across all services.
    But the patched function base.get_url_for_service() take 3 mandatory
    parameters. So removing the third param causes Horizon traceback when
    accessing API Access page.

    This commit updated the patch so that services's self url is set to
    the value of OPENSTACK_ENDPOINT_TYPE in settings (or default to
    "internalURL" if OPENSTACK_ENDPOINT_TYPE is not set).

    Change-Id: I19604d702f5f2de80dc4d0f426154fb5a0b9ad78
    Closes-Bug: 1874902
    Signed-off-by: Andy Ning <email address hidden>

commit 602aa48d826d4fafdbd5a82e862bc684d2932af6
Author: Chen, Yan <email address hidden>
Date: Wed Mar 25 02:59:20 2020 +0000

    [PATCH 12/16] stx-upstream: upgrade neutronclient for Train

    Current Version: 6.14.0

    Story#2007589 is created to track the task to clean up the dependency
    of neutronclient, so that we can remove it safely.
    The cleanup task may impact:
     - sysinv
     - stx-gui
     - document for provisioning StarlingX

    Story: 2007502
    Task: 39261

    Depends-on: https://review.opendev.org/#/c/716818
    Change-Id: Ib93605829ccc48f08157a9d37b0d1658bb7d0d78
    Signed-off-by: Chen, Yan <email address hidden>

commit 3a324b66e1e9c601b627d7aa35e1548ead35aee0
Author: chron.xie <email address hidden>
Date: Tue Apr 7 15:36:03 2020 +0800

    update upstream project for horizon train upgrade.

    This change is based on openstack stable/train.

    Story: 2007502
    Task: 39268

    Depends-on: https://review.opendev.org/#/c/716954/1
    Change-Id: Ifd5adbcbd7ccd124c27b859619f21b3a7cd55de7
    Signed-off-by: Xie Quqiang <email address hidden>

commit d5f2693324302998f725898a4e05dc8c2c9d849b
Author: Tee Ngo <email address hidden>
Date: Fri Apr 17 19:27:31 2020 -0400

    Remove hardcoded endpoint type for keystone

    In this commit, Horizon in upstream repo is patched to
    remove the hardcoded endpoint type for keystone so that
    the default endpoint type specified in settings
    (OPENSTACK_ENDPOINT_TYPE) can take effect uniformly across
    all services. This change is also required in order to
    support intercloud communications securely and uniformly
    over mgmt interface via amdin endpoint type.
  ...

Read more...

tags: added: in-f-centos8
Revision history for this message
Wendy Mitchell (wmitchellwr) wrote :

verified in 2020-05-26_20-00-00
API Access page is now displaying (for each project)
Confirmed also View Credentials

tags: removed: stx.retestneeded
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.