In horizon on Wallaby and Victoria release, there are some view and function which are using ID value from Instance's Flavor part of JSON. The main issue is when you want to resize instance, you are receiving output below. The issue is also on Instance detail is specs, where Flavor is Not available. But on all instances view, this is working fine and base on detail of instance object and it's details, it looks like this view is using different methods based on older API.
We are running Wallaby dashboard with openstack-helm project with nova-api 2.88
Nova version:
{"versions": [{"id": "v2.0", "status": "SUPPORTED", "version": "", "min_version": "", "updated": "2011-01-21T11:33:21Z", "links": [{"rel": "self", "href": "http://nova.openstack.svc.cluster.local/v2/"}]}, {"id": "v2.1", "status": "CURRENT", "version": "2.88", "min_version": "2.1", "updated": "2013-07-23T11:33:21Z", "links": [{"rel": "self", "href": "http://nova.openstack.svc.cluster.local/v2.1/"}]}]})
For example for resize initialization the log output is:
2021-08-23 12:20:30.308473 Internal Server Error: /project/instances/a872bcc6-0a56-413a-9bea-b27dc006c707/resize
2021-08-23 12:20:30.308500 Traceback (most recent call last):
2021-08-23 12:20:30.308503 File "/var/lib/openstack/lib/python3.6/site-packages/horizon/utils/memoized.py", line 107, in wrapped
2021-08-23 12:20:30.308505 value = cache[key] = cache.pop(key)
2021-08-23 12:20:30.308507 KeyError: ((<weakref at 0x7fba91b35228; to 'ResizeView' at 0x7fba91b407b8>,), ())
2021-08-23 12:20:30.308509
2021-08-23 12:20:30.308512 During handling of the above exception, another exception occurred:
2021-08-23 12:20:30.308513
2021-08-23 12:20:30.308515 Traceback (most recent call last):
2021-08-23 12:20:30.308517 File "/var/lib/openstack/lib/python3.6/site-packages/django/core/handlers/exception.py", line 34, in inner
2021-08-23 12:20:30.308519 response = get_response(request)
2021-08-23 12:20:30.308521 File "/var/lib/openstack/lib/python3.6/site-packages/django/core/handlers/base.py", line 115, in _get_response
2021-08-23 12:20:30.308523 response = self.process_exception_by_middleware(e, request)
2021-08-23 12:20:30.308525 File "/var/lib/openstack/lib/python3.6/site-packages/django/core/handlers/base.py", line 113, in _get_response
2021-08-23 12:20:30.308527 response = wrapped_callback(request, *callback_args, **callback_kwargs)
2021-08-23 12:20:30.308529 File "/var/lib/openstack/lib/python3.6/site-packages/horizon/decorators.py", line 52, in dec
2021-08-23 12:20:30.308531 return view_func(request, *args, **kwargs)
2021-08-23 12:20:30.308533 File "/var/lib/openstack/lib/python3.6/site-packages/horizon/decorators.py", line 36, in dec
2021-08-23 12:20:30.308534 return view_func(request, *args, **kwargs)
2021-08-23 12:20:30.308536 File "/var/lib/openstack/lib/python3.6/site-packages/horizon/decorators.py", line 36, in dec
2021-08-23 12:20:30.308538 return view_func(request, *args, **kwargs)
2021-08-23 12:20:30.308540 File "/var/lib/openstack/lib/python3.6/site-packages/horizon/decorators.py", line 112, in dec
2021-08-23 12:20:30.308542 return view_func(request, *args, **kwargs)
2021-08-23 12:20:30.308543 File "/var/lib/openstack/lib/python3.6/site-packages/horizon/decorators.py", line 84, in dec
2021-08-23 12:20:30.308545 return view_func(request, *args, **kwargs)
2021-08-23 12:20:30.308547 File "/var/lib/openstack/lib/python3.6/site-packages/django/views/generic/base.py", line 71, in view
2021-08-23 12:20:30.308549 return self.dispatch(request, *args, **kwargs)
2021-08-23 12:20:30.308551 File "/var/lib/openstack/lib/python3.6/site-packages/django/views/generic/base.py", line 97, in dispatch
2021-08-23 12:20:30.308553 return handler(request, *args, **kwargs)
2021-08-23 12:20:30.308554 File "/var/lib/openstack/lib/python3.6/site-packages/horizon/workflows/views.py", line 153, in get
2021-08-23 12:20:30.308556 context = self.get_context_data(**kwargs)
2021-08-23 12:20:30.308559 File "/var/lib/openstack/lib/python3.6/site-packages/openstack_dashboard/dashboards/project/instances/views.py", line 597, in get_context_data
2021-08-23 12:20:30.308561 context = super().get_context_data(**kwargs)
2021-08-23 12:20:30.308563 File "/var/lib/openstack/lib/python3.6/site-packages/horizon/workflows/views.py", line 91, in get_context_data
2021-08-23 12:20:30.308565 workflow = self.get_workflow()
2021-08-23 12:20:30.308567 File "/var/lib/openstack/lib/python3.6/site-packages/horizon/workflows/views.py", line 77, in get_workflow
2021-08-23 12:20:30.308570 extra_context = self.get_initial()
2021-08-23 12:20:30.308571 File "/var/lib/openstack/lib/python3.6/site-packages/openstack_dashboard/dashboards/project/instances/views.py", line 638, in get_initial
2021-08-23 12:20:30.308573 _object = self.get_object()
2021-08-23 12:20:30.308575 File "/var/lib/openstack/lib/python3.6/site-packages/horizon/utils/memoized.py", line 109, in wrapped
2021-08-23 12:20:30.308577 value = cache[key] = func(*args, **kwargs)
2021-08-23 12:20:30.308578 File "/var/lib/openstack/lib/python3.6/site-packages/openstack_dashboard/dashboards/project/instances/views.py", line 610, in get_object
2021-08-23 12:20:30.308583 flavor_id = instance.flavor['id']
2021-08-23 12:20:30.308586 KeyError: 'id'
For older version e.g. by this command:
curl -s -H "X-Auth-Token: $OS_TOKEN" -H "X-OpenStack-Nova-API-Version: 2.46" "http://nova-api:8774/v2.1/servers/{some server ID}" | python -mjson.tool
For current and >=2.47
curl -s -H "X-Auth-Token: $OS_TOKEN" -H "X-OpenStack-Nova-API-Version: 2.46" "http://nova-api:8774/v2.1/servers/{some server ID}" | python -mjson.tool
Steps for reproduce:
1) init resize on Wallaby release with nova-api larger then 2.47
We are running the Horizon based on e.g. openstackhelm/horizon:wallaby-ubuntu_focal-20210823
with these versions:
python-cinderclient==7.4.0
python-dateutil==2.8.1
python-glanceclient==3.3.0
python-heatclient==2.3.0
python-keystoneclient==4.2.0
python-memcached==1.59
python-neutronclient==7.3.0
python-novaclient==17.4.0
python-swiftclient==3.11.1
openstacksdk==0.55.0
In horizon on Wallaby and Victoria release, there are some view and function which are using ID value from Instance's Flavor part of JSON. The main issue is when you want to resize instance, you are receiving output below. The issue is also on Instance detail is specs, where Flavor is Not available. But on all instances view, this is working fine and base on detail of instance object and it's details, it looks like this view is using different methods based on older API.
We are running Wallaby dashboard with openstack-helm project with nova-api 2.88 21T11:33: 21Z", "links": [{"rel": "self", "href": "http:// nova.openstack. svc.cluster. local/v2/"}]}, {"id": "v2.1", "status": "CURRENT", "version": "2.88", "min_version": "2.1", "updated": "2013-07- 23T11:33: 21Z", "links": [{"rel": "self", "href": "http:// nova.openstack. svc.cluster. local/v2. 1/"}]}]})
Nova version:
{"versions": [{"id": "v2.0", "status": "SUPPORTED", "version": "", "min_version": "", "updated": "2011-01-
For example for resize initialization the log output is:
2021-08-23 12:20:30.308473 Internal Server Error: /project/ instances/ a872bcc6- 0a56-413a- 9bea-b27dc006c7 07/resize openstack/ lib/python3. 6/site- packages/ horizon/ utils/memoized. py", line 107, in wrapped openstack/ lib/python3. 6/site- packages/ django/ core/handlers/ exception. py", line 34, in inner request) openstack/ lib/python3. 6/site- packages/ django/ core/handlers/ base.py" , line 115, in _get_response exception_ by_middleware( e, request) openstack/ lib/python3. 6/site- packages/ django/ core/handlers/ base.py" , line 113, in _get_response callback( request, *callback_args, **callback_kwargs) openstack/ lib/python3. 6/site- packages/ horizon/ decorators. py", line 52, in dec openstack/ lib/python3. 6/site- packages/ horizon/ decorators. py", line 36, in dec openstack/ lib/python3. 6/site- packages/ horizon/ decorators. py", line 36, in dec openstack/ lib/python3. 6/site- packages/ horizon/ decorators. py", line 112, in dec openstack/ lib/python3. 6/site- packages/ horizon/ decorators. py", line 84, in dec openstack/ lib/python3. 6/site- packages/ django/ views/generic/ base.py" , line 71, in view request, *args, **kwargs) openstack/ lib/python3. 6/site- packages/ django/ views/generic/ base.py" , line 97, in dispatch openstack/ lib/python3. 6/site- packages/ horizon/ workflows/ views.py" , line 153, in get context_ data(** kwargs) openstack/ lib/python3. 6/site- packages/ openstack_ dashboard/ dashboards/ project/ instances/ views.py" , line 597, in get_context_data .get_context_ data(** kwargs) openstack/ lib/python3. 6/site- packages/ horizon/ workflows/ views.py" , line 91, in get_context_data openstack/ lib/python3. 6/site- packages/ horizon/ workflows/ views.py" , line 77, in get_workflow openstack/ lib/python3. 6/site- packages/ openstack_ dashboard/ dashboards/ project/ instances/ views.py" , line 638, in get_initial openstack/ lib/python3. 6/site- packages/ horizon/ utils/memoized. py", line 109, in wrapped openstack/ lib/python3. 6/site- packages/ openstack_ dashboard/ dashboards/ project/ instances/ views.py" , line 610, in get_object flavor[ 'id']
2021-08-23 12:20:30.308500 Traceback (most recent call last):
2021-08-23 12:20:30.308503 File "/var/lib/
2021-08-23 12:20:30.308505 value = cache[key] = cache.pop(key)
2021-08-23 12:20:30.308507 KeyError: ((<weakref at 0x7fba91b35228; to 'ResizeView' at 0x7fba91b407b8>,), ())
2021-08-23 12:20:30.308509
2021-08-23 12:20:30.308512 During handling of the above exception, another exception occurred:
2021-08-23 12:20:30.308513
2021-08-23 12:20:30.308515 Traceback (most recent call last):
2021-08-23 12:20:30.308517 File "/var/lib/
2021-08-23 12:20:30.308519 response = get_response(
2021-08-23 12:20:30.308521 File "/var/lib/
2021-08-23 12:20:30.308523 response = self.process_
2021-08-23 12:20:30.308525 File "/var/lib/
2021-08-23 12:20:30.308527 response = wrapped_
2021-08-23 12:20:30.308529 File "/var/lib/
2021-08-23 12:20:30.308531 return view_func(request, *args, **kwargs)
2021-08-23 12:20:30.308533 File "/var/lib/
2021-08-23 12:20:30.308534 return view_func(request, *args, **kwargs)
2021-08-23 12:20:30.308536 File "/var/lib/
2021-08-23 12:20:30.308538 return view_func(request, *args, **kwargs)
2021-08-23 12:20:30.308540 File "/var/lib/
2021-08-23 12:20:30.308542 return view_func(request, *args, **kwargs)
2021-08-23 12:20:30.308543 File "/var/lib/
2021-08-23 12:20:30.308545 return view_func(request, *args, **kwargs)
2021-08-23 12:20:30.308547 File "/var/lib/
2021-08-23 12:20:30.308549 return self.dispatch(
2021-08-23 12:20:30.308551 File "/var/lib/
2021-08-23 12:20:30.308553 return handler(request, *args, **kwargs)
2021-08-23 12:20:30.308554 File "/var/lib/
2021-08-23 12:20:30.308556 context = self.get_
2021-08-23 12:20:30.308559 File "/var/lib/
2021-08-23 12:20:30.308561 context = super()
2021-08-23 12:20:30.308563 File "/var/lib/
2021-08-23 12:20:30.308565 workflow = self.get_workflow()
2021-08-23 12:20:30.308567 File "/var/lib/
2021-08-23 12:20:30.308570 extra_context = self.get_initial()
2021-08-23 12:20:30.308571 File "/var/lib/
2021-08-23 12:20:30.308573 _object = self.get_object()
2021-08-23 12:20:30.308575 File "/var/lib/
2021-08-23 12:20:30.308577 value = cache[key] = func(*args, **kwargs)
2021-08-23 12:20:30.308578 File "/var/lib/
2021-08-23 12:20:30.308583 flavor_id = instance.
2021-08-23 12:20:30.308586 KeyError: 'id'
For older version e.g. by this command: Nova-API- Version: 2.46" "http:// nova-api: 8774/v2. 1/servers/{some server ID}" | python -mjson.tool
curl -s -H "X-Auth-Token: $OS_TOKEN" -H "X-OpenStack-
"flavor": {
"links" : [
" href": "http:// 185.22. 97.118: 30774/flavors/ 2",
" rel": "bookmark"
"id": "2",
{
}
]
}
For current and >=2.47 Nova-API- Version: 2.46" "http:// nova-api: 8774/v2. 1/servers/{some server ID}" | python -mjson.tool
curl -s -H "X-Auth-Token: $OS_TOKEN" -H "X-OpenStack-
"flavor": {
"ephemeral ": 0,
"extra_ specs": {},
"original_ name": "m1.small",
"vcpus" : 1
"disk": 20,
"ram": 2048,
"swap": 0,
}
This change in Nova is described: /specs. openstack. org/openstack/ nova-specs/ specs/pike/ implemented/ instance- flavor- api.html
https:/
Steps for reproduce:
1) init resize on Wallaby release with nova-api larger then 2.47
We are running the Horizon based on e.g. openstackhelm/ horizon: wallaby- ubuntu_ focal-20210823 cinderclient= =7.4.0 dateutil= =2.8.1 glanceclient= =3.3.0 heatclient= =2.3.0 keystoneclient= =4.2.0 memcached= =1.59 neutronclient= =7.3.0 novaclient= =17.4.0 swiftclient= =3.11.1 =0.55.0
with these versions:
python-
python-
python-
python-
python-
python-
python-
python-
python-
openstacksdk=