Public bug reported:
Description
===
When a user attempts to resize an instance with memory encryption enabled, API
returns 500 error consistently.
Looking into nova-api.log, it seems the issue is caused by a mechanism similar
to https://bugs.launchpad.net/nova/+bug/2041511 .
Steps to reproduce
==
* Create an image with hw_mem_encryption=True
$ openstack image create encrypted ...
$ openstack image set encrypted --property hw_mem_encryption=True
* Create an instance
$ openstack server create testinstance --image encrypted --flavor flavor1 ...
* Resize the instance
$ openstack server resize testinstance --flavor flavor2
Expected result
===
Instance resize is accepted and processed by nova, without errors
Actual result
=
Nova api returns 500 error and does not accept the request
Environment
===
1. Exact version of OpenStack you are running. See the following
list for all releases: http://docs.openstack.org/releases/
Ubuntu 22.04 and UCA bobcat.
# dpkg -l | grep nova
ii nova-api 3:28.0.0-0ubuntu1~cloud0 all OpenStack Compute - API frontend
ii nova-common 3:28.0.0-0ubuntu1~cloud0 all OpenStack Compute - common files
ii nova-compute 3:28.0.0-0ubuntu1~cloud0 all OpenStack Compute - compute node
base
ii nova-compute-kvm 3:28.0.0-0ubuntu1~cloud0 all OpenStack Compute - compute
node (KVM)
ii nova-compute-libvirt 3:28.0.0-0ubuntu1~cloud0 all OpenStack Compute -
compute node libvirt support
ii nova-conductor 3:28.0.0-0ubuntu1~cloud0 all OpenStack Compute - conductor
service
ii nova-novncproxy 3:28.0.0-0ubuntu1~cloud0 all OpenStack Compute - NoVNC proxy
ii nova-scheduler 3:28.0.0-0ubuntu1~cloud0 all OpenStack Compute - virtual
machine scheduler
ii python3-nova 3:28.0.0-0ubuntu1~cloud0 all OpenStack Compute Python 3
libraries
ii python3-novaclient 2:18.4.0-0ubuntu1~cloud0 all client library for OpenStack
Compute API - 3.x
2. Which hypervisor did you use?
Libvirt + KVM
3. Which storage type did you use?
LVM
4. Which networking type did you use?
ml2 + ovs
Logs & Configs
==
The following traceback is found in nova-api.log
```
2023-12-26 08:02:19.371 30791 ERROR nova.api.openstack.wsgi [None
req-20b9b69c-a792-45cd-8520-7e9cd3387c0d 838cd42e04884ddfa8ec4ac11e2f8818
baf003aa0202430a92edd003f98794a3 - - default default] Unexpected exception in
API method: NotImplementedError: Cannot load 'id' in the base class
2023-12-26 08:02:19.371 30791 ERROR nova.api.openstack.wsgi Traceback (most
recent call last):
2023-12-26 08:02:19.371 30791 ERROR nova.api.openstack.wsgi File
"/usr/lib/python3/dist-packages/nova/api/openstack/wsgi.py", line 658, in
wrapped
2023-12-26 08:02:19.371 30791 ERROR nova.api.openstack.wsgi return f(*args,
**kwargs)
2023-12-26 08:02:19.371 30791 ERROR nova.api.openstack.wsgi File
"/usr/lib/python3/dist-packages/nova/api/validation/__init__.py", line 110, in
wrapper
2023-12-26 08:02:19.371 30791 ERROR nova.api.openstack.wsgi return
func(*args, **kwargs)
2023-12-26 08:02:19.371 30791 ERROR nova.api.openstack.wsgi File
"/usr/lib/python3/dist-packages/nova/api/openstack/compute/servers.py", line
1146, in _action_resize
2023-12-26 08:02:19.371 30791 ERROR nova.api.openstack.wsgi
self._resize(req, id, flavor_ref, **kwargs)
2023-12-26 08:02:19.371 30791 ERROR nova.api.openstack.wsgi File
"/usr/lib/python3/dist-packages/nova/api/openstack/compute/servers.py", line
1060, in _resize
2023-12-26 08:02:19.371 30791 ERROR nova.api.openstack.wsgi
self.compute_api.resize(context, instance, flavor_id,
2023-12-26 08:02:19.371 30791 ERROR nova.api.openstack.wsgi File
"/usr/lib/python3/dist-packages/nova/compute/api.py", line 389, in inner
2023-12-26 08:02:19.371 30791 ERROR nova.api.openstack.wsgi return
function(self, context, instance, *args, **kwargs)
2023-12-26 08:02:19.371 30791 ERROR nova.api.openstack.wsgi File
"/usr/lib/python3/dist-packages/nova/compute/api.py", line 374, in wrapper
2023-12-26 08:02:19.371 30791 ERROR nova.api.openstack.wsgi return
func(self, context, instance, *args, **kwargs)
2023-12-26 08:02:19.371 30791 ERROR nova.api.openstack.wsgi File
"/usr/lib/python3/dist-packages/nova/compute/api.py", line 357, in wrapper
2023-12-26 08:02:19.371 30791 ERROR nova.api.openstack.wsgi return
func(self, context, instance, *args, **kwargs)
2023-12-26 08:02:19.371 30791 ERROR nova.api.openstack.wsgi File
"/usr/lib/python3/dist-packages/nova/compute/api.py", line 242, in inner
2023-12-26 08:02:19.371 30791 ERROR nova.api.openstack.wsgi return
function(self, context, instance, *args, **kwargs)
2023-12-26 08:02:19.371 30791 ERROR nova.api.openstack.wsgi File
"/usr/lib/python3/dist-packages/nova/compute/api.py", line 168, in inner
2023-12-26 08:02:19.371 30791 ERROR nova.api.openstack.wsgi return f(self,
context, instance, *args, **kw)
2023-12-26 08:02:19.371 30791 ERROR nova.api.openstack.wsgi File
"/usr/lib/python3/dist-packages/nova/comput