Bug 2076482 - [RHOSP16.2.2] Resize from horizon fails
Summary: [RHOSP16.2.2] Resize from horizon fails
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: python-django-horizon
Version: 16.2 (Train)
Hardware: All
OS: All
high
high
Target Milestone: z4
: 16.2 (Train on RHEL 8.4)
Assignee: Tatiana Ovchinnikova
QA Contact: Ashish Gupta
URL:
Whiteboard:
Depends On:
Blocks: 2106126
TreeView+ depends on / blocked
 
Reported: 2022-04-19 07:39 UTC by Rohini Diwakar
Modified: 2023-12-13 15:50 UTC (History)
23 users (show)

Fixed In Version: python-django-horizon-16.2.3-2.20220519094831.d3d3d18.el8ost
Doc Type: No Doc Update
Doc Text:
Clone Of:
: 2106126 (view as bug list)
Environment:
Last Closed: 2022-12-07 19:27:28 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
OpenStack gerrit 838533 0 None MERGED Fix for "Resize instance" button 2022-07-08 14:11:54 UTC
Red Hat Issue Tracker OSP-14736 0 None None None 2022-04-19 07:44:19 UTC
Red Hat Knowledge Base (Solution) 6960775 0 None None None 2022-05-25 17:19:46 UTC
Red Hat Product Errata RHSA-2022:8856 0 None None None 2022-12-07 19:27:40 UTC

Description Rohini Diwakar 2022-04-19 07:39:53 UTC
Description of problem:
Resize of instance fails from horizon with the error `Danger: An error occurred. Please try again later`. 

Resize from CLI works perfectly fine. 

The error that we get in horizon logs.
++++
2022-04-19 07:21:34,992 59 ERROR django.request Internal Server Error: /dashboard/project/instances/275e726b-b215-4b3c-8956-42244b35a341/resize
Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/horizon/utils/memoized.py", line 107, in wrapped
    value = cache[key] = cache.pop(key)
KeyError: ((<weakref at 0x7fd2682d2b38; to 'ResizeView' at 0x7fd268314cc0>,), ())

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/django/core/handlers/exception.py", line 35, in inner
    response = get_response(request)
  File "/usr/lib/python3.6/site-packages/django/core/handlers/base.py", line 128, in _get_response
    response = self.process_exception_by_middleware(e, request)
  File "/usr/lib/python3.6/site-packages/django/core/handlers/base.py", line 126, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/usr/lib/python3.6/site-packages/horizon/decorators.py", line 52, in dec
    return view_func(request, *args, **kwargs)
  File "/usr/lib/python3.6/site-packages/horizon/decorators.py", line 36, in dec
    return view_func(request, *args, **kwargs)
  File "/usr/lib/python3.6/site-packages/horizon/decorators.py", line 36, in dec
    return view_func(request, *args, **kwargs)
  File "/usr/lib/python3.6/site-packages/horizon/decorators.py", line 113, in dec
    return view_func(request, *args, **kwargs)
  File "/usr/lib/python3.6/site-packages/horizon/decorators.py", line 84, in dec
    return view_func(request, *args, **kwargs)
  File "/usr/lib/python3.6/site-packages/django/views/generic/base.py", line 69, in view
    return self.dispatch(request, *args, **kwargs)
  File "/usr/lib/python3.6/site-packages/django/views/generic/base.py", line 89, in dispatch
    return handler(request, *args, **kwargs)
  File "/usr/lib/python3.6/site-packages/horizon/workflows/views.py", line 155, in get
    context = self.get_context_data(**kwargs)
  File "/usr/share/openstack-dashboard/openstack_dashboard/dashboards/project/instances/views.py", line 589, in get_context_data
    context = super(ResizeView, self).get_context_data(**kwargs)
  File "/usr/lib/python3.6/site-packages/horizon/workflows/views.py", line 93, in get_context_data
    workflow = self.get_workflow()
  File "/usr/lib/python3.6/site-packages/horizon/workflows/views.py", line 79, in get_workflow
    extra_context = self.get_initial()
  File "/usr/share/openstack-dashboard/openstack_dashboard/dashboards/project/instances/views.py", line 630, in get_initial
    _object = self.get_object()
  File "/usr/lib/python3.6/site-packages/horizon/utils/memoized.py", line 109, in wrapped
    value = cache[key] = func(*args, **kwargs)
  File "/usr/share/openstack-dashboard/openstack_dashboard/dashboards/project/instances/views.py", line 602, in get_object
    flavor_id = instance.flavor['id']
KeyError: 'id'
++++

On the dashboard, when we view the instance, in it's overview section, the flavor details are not available under specs. I will attach the screenshot. 

Whereas, if we compare the same with a RHOSP16.2.1 setup, the flavor details are populated in the instance overview section. In RHOSP16.2.1 we didn't see this issue. 

Version-Release number of selected component (if applicable):
RHOSP16.2.2

How reproducible:


Steps to Reproduce:
1. Deploy RHOSP16.2.2 setup 
2. Create a VM
3. Resize the VM

Actual results:
Resize unsuccessful and flavor details like (ID,name,ram,disk,vcpu) missing under instance specs

Expected results:
Resize should be successful and the flavor details should be seen under instance specs

Additional info:
python3-django-horizon-16.2.3-2.20220124225242.3153a5b.el8ost.noarch
python3-novajoin-1.3.0-2.20220111001927.265146e.el8ost.noarch
python3-novaclient-15.1.1-2.20220111010504.79959ab.el8ost.noarch
python3-nova-20.6.2-2.20220112164912.8906554.el8ost.noarch
openstack-nova-api-20.6.2-2.20220112164912.8906554.el8ost.noarch
openstack-nova-common-20.6.2-2.20220112164912.8906554.el8ost.noarch

Comment 3 Takashi Kajinami 2022-04-19 13:20:30 UTC
This looks quite similar to https://bugs.launchpad.net/horizon/+bug/1940834 .

The fix[1] for this bug was merged in master and backported back to ussuri, but it has not yet been backported to train.
 [1] https://review.opendev.org/c/openstack/horizon/+/808102

Comment 70 errata-xmlrpc 2022-12-07 19:27:28 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Low: Red Hat OpenStack Platform 16.2.4 (python-django-horizon) security update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2022:8856


Note You need to log in before you can comment on or make changes to this bug.