stx-gui has invalid imports for sysinv api

Bug #1789718 reported by Kristine Bujold
14
This bug affects 1 person
Affects Status Importance Assigned to Milestone
StarlingX
Fix Released
High
Eddie Ramirez

Bug Description

Brief Description
-----------------

Some of the imports were not updated during the move of sysinv api to stx-gui

2018-08-28 17:44:45,722 [ERROR] horizon.tables.base: Error while checking action permissions.
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/horizon/tables/base.py", line 1421, in _filter_action
    return action._allowed(request, datum) and row_matched
  File "/usr/lib/python2.7/site-packages/horizon/tables/actions.py", line 142, in _allowed
    return self.allowed(request, datum)
  File "/usr/lib/python2.7/site-packages/starlingx_dashboard/dashboards/admin/inventory/interfaces/tables.py", line 69, in allowed
    return not api.sysinv.is_system_mode_simplex(request)
AttributeError: 'module' object has no attribute 'sysinv'
2018-08-28 17:44:45,825 [ERROR] horizon.tables.base: Error while checking action permissions.
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/horizon/tables/base.py", line 1421, in _filter_action
    return action._allowed(request, datum) and row_matched
  File "/usr/lib/python2.7/site-packages/horizon/tables/actions.py", line 142, in _allowed
    return self.allowed(request, datum)
  File "/usr/lib/python2.7/site-packages/starlingx_dashboard/dashboards/admin/inventory/interfaces/tables.py", line 69, in allowed
    return not api.sysinv.is_system_mode_simplex(request)
AttributeError: 'module' object has no attribute 'sysinv'
2018-08-28 17:44:45,892 [ERROR] horizon.tables.base: Error while checking action permissions.
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/horizon/tables/base.py", line 1421, in _filter_action
    return action._allowed(request, datum) and row_matched
  File "/usr/lib/python2.7/site-packages/horizon/tables/actions.py", line 142, in _allowed
    return self.allowed(request, datum)
  File "/usr/lib/python2.7/site-packages/starlingx_dashboard/dashboards/admin/inventory/devices/tables.py", line 35, in allowed
    api.sysinv.SUBFUNCTIONS_COMPUTE in host.subfunctions)
AttributeError: 'module' object has no attribute 'sysinv'
2018-08-28 17:44:45,896 [ERROR] horizon.tables.base: Error while checking action permissions.
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/horizon/tables/base.py", line 1421, in _filter_action
    return action._allowed(request, datum) and row_matched
  File "/usr/lib/python2.7/site-packages/horizon/tables/actions.py", line 142, in _allowed
    return self.allowed(request, datum)
  File "/usr/lib/python2.7/site-packages/starlingx_dashboard/dashboards/admin/inventory/devices/tables.py", line 35, in allowed
    api.sysinv.SUBFUNCTIONS_COMPUTE in host.subfunctions)
AttributeError: 'module' object has no attribute 'sysinv'
2018-08-28 17:44:45,899 [ERROR] horizon.tables.base: Error while checking action permissions.
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/horizon/tables/base.py", line 1421, in _filter_action
    return action._allowed(request, datum) and row_matched
  File "/usr/lib/python2.7/site-packages/horizon/tables/actions.py", line 142, in _allowed
    return self.allowed(request, datum)
  File "/usr/lib/python2.7/site-packages/starlingx_dashboard/dashboards/admin/inventory/devices/tables.py", line 35, in allowed
    api.sysinv.SUBFUNCTIONS_COMPUTE in host.subfunctions)
AttributeError: 'module' object has no attribute 'sysinv'
2018-08-28 17:44:45,903 [ERROR] horizon.tables.base: Error while checking action permissions.
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/horizon/tables/base.py", line 1421, in _filter_action
    return action._allowed(request, datum) and row_matched
  File "/usr/lib/python2.7/site-packages/horizon/tables/actions.py", line 142, in _allowed
    return self.allowed(request, datum)
  File "/usr/lib/python2.7/site-packages/starlingx_dashboard/dashboards/admin/inventory/devices/tables.py", line 35, in allowed
    api.sysinv.SUBFUNCTIONS_COMPUTE in host.subfunctions)
AttributeError: 'module' object has no attribute 'sysinv'
2018-08-28 17:44:45,906 [ERROR] horizon.tables.base: Error while checking action permissions.
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/horizon/tables/base.py", line 1421, in _filter_action
    return action._allowed(request, datum) and row_matched
  File "/usr/lib/python2.7/site-packages/horizon/tables/actions.py", line 142, in _allowed
    return self.allowed(request, datum)
  File "/usr/lib/python2.7/site-packages/starlingx_dashboard/dashboards/admin/inventory/devices/tables.py", line 35, in allowed
    api.sysinv.SUBFUNCTIONS_COMPUTE in host.subfunctions)
AttributeError: 'module' object has no attribute 'sysinv'
2018-08-28 17:44:47,339 [ERROR] django.request: Internal Server Error: /admin/inventory/2/addinterface/
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/django/core/handlers/base.py", line 132, 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 84, in dec
    return view_func(request, *args, **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 84, in dec
    return view_func(request, *args, **kwargs)
  File "/usr/lib/python2.7/site-packages/django/views/generic/base.py", line 71, in view
    return self.dispatch(request, *args, **kwargs)
  File "/usr/lib/python2.7/site-packages/django/views/generic/base.py", line 89, in dispatch
    return handler(request, *args, **kwargs)
  File "/usr/lib/python2.7/site-packages/django/views/generic/edit.py", line 205, in get
    form = self.get_form()
  File "/usr/lib/python2.7/site-packages/horizon/forms/views.py", line 176, in get_form
    return form_class(self.request, **self.get_form_kwargs())
  File "/usr/lib/python2.7/site-packages/starlingx_dashboard/dashboards/admin/inventory/interfaces/forms.py", line 416, in __init__
    interfaces = api.sysinv.host_interface_list(self.request, host_uuid)

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

Expected Behavior
------------------

Actual Behavior
----------------
Some panels do not work. For example Host Interfaces

Reproducibility
---------------
Always

System Configuration
--------------------
Any using stx-gui

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

Revision history for this message
Tyler Smith (tyler.smith) wrote :

Taking a quick look seems like all of these files would be affected:

./dashboards/admin/host_topology/views.py
./dashboards/admin/system_config/address_pools/forms.py
./dashboards/admin/system_config/address_pools/tables.py
./dashboards/admin/system_config/address_pools/views.py
./dashboards/admin/system_config/forms.py
./dashboards/admin/system_config/tables.py
./dashboards/admin/system_config/tabs.py
./dashboards/admin/system_config/views.py
./dashboards/admin/inventory/ports/forms.py
./dashboards/admin/inventory/ports/views.py
./dashboards/admin/inventory/interfaces/forms.py
./dashboards/admin/inventory/interfaces/tables.py
./dashboards/admin/inventory/interfaces/address/forms.py
./dashboards/admin/inventory/interfaces/address/tables.py
./dashboards/admin/inventory/interfaces/route/forms.py
./dashboards/admin/inventory/interfaces/route/tables.py
./dashboards/admin/inventory/interfaces/views.py
./dashboards/admin/inventory/sensors/forms.py
./dashboards/admin/inventory/sensors/tables.py
./dashboards/admin/inventory/sensors/views.py
./dashboards/admin/inventory/memorys/forms.py
./dashboards/admin/inventory/memorys/tables.py
./dashboards/admin/inventory/memorys/views.py
./dashboards/admin/inventory/tables.py
./dashboards/admin/inventory/workflows.py
./dashboards/admin/inventory/tabs.py
./dashboards/admin/inventory/lldp/views.py
./dashboards/admin/inventory/devices/forms.py
./dashboards/admin/inventory/devices/tables.py
./dashboards/admin/inventory/devices/views.py
./dashboards/admin/inventory/views.py
./dashboards/admin/inventory/storages/forms.py
./dashboards/admin/inventory/storages/lvg_params/forms.py
./dashboards/admin/inventory/storages/lvg_params/views.py
./dashboards/admin/inventory/storages/tables.py
./dashboards/admin/inventory/storages/tabs.py
./dashboards/admin/inventory/storages/views.py
./dashboards/admin/inventory/cpu_functions/forms.py
./dashboards/admin/inventory/cpu_functions/tables.py
./dashboards/admin/inventory/cpu_functions/views.py

And that's just for sysinv api wrapper, possibly similar issues for the other apis that were moved

Revision history for this message
Eddie Ramirez (ediardo) wrote :

This looks very bad. I'm sure I touched all of these files, I must've done something wrong in one my rebases or while resolving a conflict I had earlier. I'll double check

Revision history for this message
Eddie Ramirez (ediardo) wrote :

I remember this pretty well as it was the panel with the most number of tabs and took a while getting it right.

Ghada Khalil (gkhalil)
tags: added: stx.2018.10 stx.gui
Changed in starlingx:
importance: Undecided → High
Dariush Eslimi (deslimi)
Changed in starlingx:
assignee: nobody → Eddie Ramirez (ediardo)
Ghada Khalil (gkhalil)
Changed in starlingx:
status: New → Triaged
Revision history for this message
Eddie Ramirez (ediardo) wrote :

This patch https://review.openstack.org/#/c/591109/4 has several changes targeting the inventory panel and I thought I updated most of the imports but thanks to your revision I realized that I didn't.

I'm preparing a new patch with fixes. Thanks!

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

Reviewed: https://review.openstack.org/598337
Committed: https://git.openstack.org/cgit/openstack/stx-gui/commit/?id=c9f4ed26119833216e8f11c2ae65f4f2af3fb877
Submitter: Zuul
Branch: master

commit c9f4ed26119833216e8f11c2ae65f4f2af3fb877
Author: Eddie Ramirez <email address hidden>
Date: Thu Aug 30 12:52:06 2018 -0700

    Fix stx_api imports

    Some tabs within the Host Inventory panel
    had wrong imports. This patch updates several import lines
    with the right package name.

    Closes-bug: #1789718
    Change-Id: I414cfa6ed46156ebc845a0eef7caf3891a6d84da
    Signed-off-by: Eddie Ramirez <email address hidden>

Changed in starlingx:
status: In Progress → Fix Released
Ken Young (kenyis)
tags: added: stx.1.0
removed: stx.2018.10
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.