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
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
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