Reviewed: https://review.opendev.org/c/openstack/nova/+/790660 Committed: https://opendev.org/openstack/nova/commit/e98994027f0af0b22277bcfaed4ab6e6f4a2c74e Submitter: "Zuul (22348)" Branch: master
commit e98994027f0af0b22277bcfaed4ab6e6f4a2c74e Author: Lee Yarwood <[email protected]> Date: Tue May 11 11:37:22 2021 +0100 hardware: Use image_meta.id within get_mem_encryption_constraint This change resolves bug #1928063 by replacing the use of image_meta.name with image_meta.id as I55d66c3a6cbd50da90065f4a58f77b5cd29ce9ea should ensure it is always available. The removal of other references to image_meta.name within virt.hardware is left for follow ups to keep this change small and backportable. Closes-Bug: #1928063 Change-Id: I66299e97bdb5b95e149b1780231a1c1bbdbd9865 ** Changed in: nova Status: In Progress => Fix Released -- You received this bug notification because you are a member of Yahoo! Engineering Team, which is subscribed to OpenStack Compute (nova). https://bugs.launchpad.net/bugs/1928063 Title: SEV enabled instance unable to hard reboot Status in OpenStack Compute (nova): Fix Released Bug description: Description =========== Hard rebooting a SEV enabled instance fails with a NotImplementedError raised as the image_meta stashed in the system_metadata of the instance doesn't contain the image name or id: 2021-05-10 16:50:24.847 7 ERROR oslo_messaging.rpc.server File "/usr/lib/python3.6/site-packages/nova/compute/manager.py", line 3739, in _reboot_instance 2021-05-10 16:50:24.847 7 ERROR oslo_messaging.rpc.server bad_volumes_callback=bad_volumes_callback) 2021-05-10 16:50:24.847 7 ERROR oslo_messaging.rpc.server File "/usr/lib/python3.6/site-packages/nova/virt/libvirt/driver.py", line 3292, in reboot 2021-05-10 16:50:24.847 7 ERROR oslo_messaging.rpc.server block_device_info) 2021-05-10 16:50:24.847 7 ERROR oslo_messaging.rpc.server File "/usr/lib/python3.6/site-packages/nova/virt/libvirt/driver.py", line 3386, in _hard_reboot 2021-05-10 16:50:24.847 7 ERROR oslo_messaging.rpc.server mdevs=mdevs) 2021-05-10 16:50:24.847 7 ERROR oslo_messaging.rpc.server File "/usr/lib/python3.6/site-packages/nova/virt/libvirt/driver.py", line 6331, in _get_guest_xml 2021-05-10 16:50:24.847 7 ERROR oslo_messaging.rpc.server context, mdevs) 2021-05-10 16:50:24.847 7 ERROR oslo_messaging.rpc.server File "/usr/lib/python3.6/site-packages/nova/virt/libvirt/driver.py", line 5949, in _get_guest_config 2021-05-10 16:50:24.847 7 ERROR oslo_messaging.rpc.server flavor, image_meta) 2021-05-10 16:50:24.847 7 ERROR oslo_messaging.rpc.server File "/usr/lib/python3.6/site-packages/nova/virt/libvirt/driver.py", line 5504, in _get_guest_memory_backing_config 2021-05-10 16:50:24.847 7 ERROR oslo_messaging.rpc.server if self._sev_enabled(flavor, image_meta): 2021-05-10 16:50:24.847 7 ERROR oslo_messaging.rpc.server File "/usr/lib/python3.6/site-packages/nova/virt/libvirt/driver.py", line 6117, in _sev_enabled 2021-05-10 16:50:24.847 7 ERROR oslo_messaging.rpc.server mach_type) 2021-05-10 16:50:24.847 7 ERROR oslo_messaging.rpc.server File "/usr/lib/python3.6/site-packages/nova/virt/hardware.py", line 1271, in get_mem_encryption_constraint 2021-05-10 16:50:24.847 7 ERROR oslo_messaging.rpc.server image_meta.name) 2021-05-10 16:50:24.847 7 ERROR oslo_messaging.rpc.server File "/usr/lib/python3.6/site-packages/oslo_versionedobjects/base.py", line 67, in getter 2021-05-10 16:50:24.847 7 ERROR oslo_messaging.rpc.server self.obj_load_attr(name) 2021-05-10 16:50:24.847 7 ERROR oslo_messaging.rpc.server File "/usr/lib/python3.6/site-packages/oslo_versionedobjects/base.py", line 603, in obj_load_attr 2021-05-10 16:50:24.847 7 ERROR oslo_messaging.rpc.server _("Cannot load '%s' in the base class") % attrname) 2021-05-10 16:50:24.847 7 ERROR oslo_messaging.rpc.server NotImplementedError: Cannot load 'name' in the base class 2021-05-10 16:50:24.847 7 ERROR oslo_messaging.rpc.server Steps to reproduce ================== Hard reboot a SEV enabled instance. Expected result =============== Instance hard reboots as expected. Actual result ============= Instance fails to reboot with a NotImplementedError exception raised. Environment =========== 1. Exact version of OpenStack you are running. See the following list for all releases: http://docs.openstack.org/releases/ stable/train but likely the same on master. 2. Which hypervisor did you use? (For example: Libvirt + KVM, Libvirt + XEN, Hyper-V, PowerKVM, ...) What's the version of that? libvirt + KVM 2. Which storage type did you use? (For example: Ceph, LVM, GPFS, ...) What's the version of that? N/A 3. Which networking type did you use? (For example: nova-network, Neutron with OpenVSwitch, ...) N/A Logs & Configs ============== To manage notifications about this bug go to: https://bugs.launchpad.net/nova/+bug/1928063/+subscriptions -- Mailing list: https://launchpad.net/~yahoo-eng-team Post to : [email protected] Unsubscribe : https://launchpad.net/~yahoo-eng-team More help : https://help.launchpad.net/ListHelp

