Horizon exception when selecting host when ceph is not configured

Bug #1866664 reported by Brent Rowsell
14
This bug affects 1 person
Affects Status Importance Assigned to Milestone
StarlingX
Fix Released
High
Stefan Dinescu

Bug Description

Brief Description
-----------------
Horizon exceptions when clicking on a controller host in the Host Inventory Panel
This causes the horizon panel not to load and returns "Danger"

Severity
--------
Major

Steps to Reproduce
------------------
See above

Expected Behavior
------------------
It works

Actual Behavior
----------------
It exceptions

Reproducibility
---------------
100%

System Configuration
--------------------
AIO-SX without CEPH

Branch/Pull Time/Commit
-----------------------
BUILD_DATE="2020-02-25 17:09:33 -0500"

Last Pass
---------
Not sure

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

23:45:28,814 [admin 992e6e7ea97242038b45a105b98842a0] [admin b16e477c070a44c79d4e38ae0876231e] [POST /auth/login/ 302] parameters:[{"fake_email": "", "username": "admin", "fake_password": "********", "region": "default", "next": "/admin/1/detail/", "csrfmiddlewaretoken": "YO0vgDYT5xD0jRageGN8ly21m1vxGqPi3hWQ1VkhSpVV4fIW0bngu2nTbjXdNTAQ", "password": "********"}] message:[None]
2020-03-08 23:45:30,062 [ERROR] django.request: Internal Server Error: /admin/1/detail/
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 36, 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 113, 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 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/tabs/views.py", line 139, in get
    context = self.get_context_data(**kwargs)
  File "/usr/lib/python2.7/site-packages/starlingx_dashboard/dashboards/admin/inventory/views.py", line 92, in get_context_data
    context = super(DetailView, self).get_context_data(**kwargs)
  File "/usr/lib/python2.7/site-packages/horizon/tables/views.py", line 106, in get_context_data
    context = super(MultiTableMixin, self).get_context_data(**kwargs)
  File "/usr/lib/python2.7/site-packages/horizon/tabs/views.py", line 55, in get_context_data
    exceptions.handle(self.request)
  File "/usr/lib/python2.7/site-packages/horizon/exceptions.py", line 348, in handle
    six.reraise(exc_type, exc_value, exc_traceback)
  File "/usr/lib/python2.7/site-packages/horizon/tabs/views.py", line 53, in get_context_data
    context["tab_group"].load_tab_data()
  File "/usr/lib/python2.7/site-packages/horizon/tabs/base.py", line 178, in load_tab_data
    exceptions.handle(self.request)
  File "/usr/lib/python2.7/site-packages/horizon/exceptions.py", line 348, in handle
    six.reraise(exc_type, exc_value, exc_traceback)
  File "/usr/lib/python2.7/site-packages/horizon/tabs/base.py", line 175, in load_tab_data
    tab._data = tab.get_context_data(self.request)
  File "/usr/lib/python2.7/site-packages/starlingx_dashboard/dashboards/admin/inventory/tabs.py", line 507, in get_context_data
    stx_api.sysinv.is_host_with_storage(request, host.uuid)
  File "/usr/lib/python2.7/site-packages/starlingx_dashboard/api/sysinv.py", line 2676, in is_host_with_storage
    storage_model = get_ceph_storage_model(request)
  File "/usr/lib/python2.7/site-packages/starlingx_dashboard/api/sysinv.py", line 2672, in get_ceph_storage_model
    return cluster.deployment_model
AttributeError: 'NoneType' object has no attribute 'deployment_model'

Test Activity
-------------
Developer Testing

Workaround
----------
None

Revision history for this message
Ghada Khalil (gkhalil) wrote :

stx.4.0 / high priority - issue with horizon; recently introduced by the optional ceph code changes

description: updated
Changed in starlingx:
importance: Undecided → High
status: New → Triaged
tags: added: stx.4.0 stx.gui
Changed in starlingx:
assignee: nobody → Stefan Dinescu (stefandinescu)
Revision history for this message
Ghada Khalil (gkhalil) wrote :

For reference, this is introduced by: https://storyboard.openstack.org/#!/story/2007064

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

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

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

Reviewed: https://review.opendev.org/712090
Committed: https://git.openstack.org/cgit/starlingx/gui/commit/?id=5d41bb083c384092792193297a67d0bcde675f27
Submitter: Zuul
Branch: master

commit 5d41bb083c384092792193297a67d0bcde675f27
Author: Stefan Dinescu <email address hidden>
Date: Tue Mar 10 12:55:33 2020 +0000

    Check for presence of Ceph storage backend

    Some Horizon operation and APIs worked on the assumption
    that the Ceph storage backend was always present. Since
    now Ceph is no longer provisioned by default, we need
    to update certain functions to check for the presence
    of such backend.

    Tests done:
    1. Install setup with Ceph
       - use Horizon to navigate to various pages and see
         if any errors appear
       - provision OSD using Horizon
    2. Install setup without Ceph
       - use Horizon to navigate to various pages and asee
         if any errors appear
       - see that options for Ceph operations are now hidden
         since Ceph is not provisioned

    Change-Id: I0ec1d0e73bf2c261c1ef35a35d8dd1f10d827fc4
    Closes-bug: 1866664
    Signed-off-by: Stefan Dinescu <email address hidden>

Changed in starlingx:
status: In Progress → Fix Released
Ghada Khalil (gkhalil)
summary: - Horizon exception when selecting host
+ Horizon exception when selecting host when ceph is not configured
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to gui (f/centos8)

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

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

Reviewed: https://review.opendev.org/716144
Committed: https://git.openstack.org/cgit/starlingx/gui/commit/?id=c794affbd62325e03635c41d4d769cd4213fff92
Submitter: Zuul
Branch: f/centos8

commit 654fb174857d81bb17234149c3f16014f8a41b2b
Author: Teresa Ho <email address hidden>
Date: Mon Mar 16 09:49:23 2020 -0400

    Add platform network type for storage

    Added a new platform network type for optional backend storage.

    Story: 2007391
    Task: 39018

    Change-Id: I8d10a2db50f1bfc055092b81e1872b4cb69242f0
    Signed-off-by: Teresa Ho <email address hidden>

commit 5d41bb083c384092792193297a67d0bcde675f27
Author: Stefan Dinescu <email address hidden>
Date: Tue Mar 10 12:55:33 2020 +0000

    Check for presence of Ceph storage backend

    Some Horizon operation and APIs worked on the assumption
    that the Ceph storage backend was always present. Since
    now Ceph is no longer provisioned by default, we need
    to update certain functions to check for the presence
    of such backend.

    Tests done:
    1. Install setup with Ceph
       - use Horizon to navigate to various pages and see
         if any errors appear
       - provision OSD using Horizon
    2. Install setup without Ceph
       - use Horizon to navigate to various pages and asee
         if any errors appear
       - see that options for Ceph operations are now hidden
         since Ceph is not provisioned

    Change-Id: I0ec1d0e73bf2c261c1ef35a35d8dd1f10d827fc4
    Closes-bug: 1866664
    Signed-off-by: Stefan Dinescu <email address hidden>

commit e3c2a190d06c83013fc4ae613c4b071e5b70dc97
Author: Kristine Bujold <email address hidden>
Date: Tue Feb 25 16:54:23 2020 -0500

    Add Subcloud ID to the Subclouds table's detail

    Story: 2007255
    Task: 38614
    Change-Id: I4b5f802410a3d6a6d27c887314c7a09aefad071b
    Signed-off-by: Kristine Bujold <email address hidden>

commit dbd25b92cdd8e3d9f2ac01a931a9df07c0b13044
Author: Kristine Bujold <email address hidden>
Date: Tue Feb 25 10:36:41 2020 -0500

    Fix label name in Regions pull down

    Story: 2007255
    Task: 38835
    Signed-off-by: Kristine Bujold <email address hidden>
    Change-Id: I6ddee15f406c1e06d4525d30bf9b381aa891f160

commit 03571b691d7ec16dd6151ee7e0d427ea9b7fb1be
Author: Kristine Bujold <email address hidden>
Date: Mon Feb 24 11:01:02 2020 -0500

    Fix data list formatting

    Change the Storage Overview page data list formatting to centered.

    Story: 2007255
    Task: 38835
    Change-Id: I0584a58f9a6a3fcb8860459e92b57d07b64e25e2
    Signed-off-by: Kristine Bujold <email address hidden>

commit b32ae659113c288684f7bedd016a1711a1dae12e
Author: Kristine Bujold <email address hidden>
Date: Fri Feb 21 10:53:42 2020 -0500

    Add table titles and update formatting

    This commits adds table titles to Host Inventory Storage and Storage
    Overview pages which have mutiple tables in one panel. It also use the
    upstream formatting for the table info for Host Inventory Processor
    page.

    Story: 2007255
    Task: 38835
    Change-Id:...

Read more...

tags: added: in-f-centos8
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.