Bug 2089874

Summary: Trait MEM_ENCRYPTION_CONTEXT not reported when using AMD-SEV Computes
Product: Red Hat OpenStack Reporter: James Parker <jparker>
Component: openstack-novaAssignee: Balazs Gibizer <bgibizer>
Status: CLOSED ERRATA QA Contact: OSP DFG:Compute <osp-dfg-compute>
Severity: medium Docs Contact:
Priority: high    
Version: 17.0 (Wallaby)CC: alifshit, bgibizer, dasmith, eglynn, jhakimra, kchamart, sbauza, sgordon, smooney, vromanso
Target Milestone: z1Keywords: Patch, Regression, Triaged
Target Release: 17.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: openstack-nova-23.2.2-0.20221121200753.7074ac0.el9ost Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of:
: 2144597 (view as bug list) Environment:
Last Closed: 2023-01-25 12:28:50 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 2144597    
Bug Blocks:    

Comment 3 James Parker 2022-05-25 19:12:37 UTC
FYI testing this downstream with the proposed fix added it to placement:

2022-05-25 17:47:39.599 2 DEBUG nova.virt.libvirt.host [req-9b82cf32-5601-4c2f-9c7d-f27a210fa093 - - - - -] /sys/module/kvm_amd/parameters/sev contains [Y
] _kernel_supports_amd_sev /usr/lib/python3.9/site-packages/nova/virt/libvirt/host.py:1558
2022-05-25 17:47:39.599 2 DEBUG nova.virt.libvirt.host [req-9b82cf32-5601-4c2f-9c7d-f27a210fa093 - - - - -] Checking SEV support for arch i686 and machine type pc-i440fx-rhel7.6.0 supports_amd_sev /usr/lib/python3.9/site-packages/nova/virt/libvirt/host.py:1589
2022-05-25 17:47:39.599 2 INFO nova.virt.libvirt.host [req-9b82cf32-5601-4c2f-9c7d-f27a210fa093 - - - - -] AMD SEV support detected
2022-05-25 17:47:39.600 2 DEBUG nova.compute.provider_tree [req-9b82cf32-5601-4c2f-9c7d-f27a210fa093 - - - - -] Updating inventory in ProviderTree for provider ba3bccf9-c283-4cb5-a14d-35ae7ba88533 with inventory: {'MEMORY_MB': {'total': 257000, 'min_unit': 1, 'max_unit': 257000, 'step_size': 1, 'allocation_ratio': 1.0, 'reserved': 4096}, 'VCPU': {'total': 20, 'min_unit': 1, 'max_unit': 20, 'step_size': 1, 'allocation_ratio': 16.0, 'reserved': 0}, 'PCPU': {'total': 20, 'min_unit': 1, 'max_unit': 20, 'step_size': 1, 'allocation_ratio': 1, 'reserved': 0}, 'MEM_ENCRYPTION_CONTEXT': {'total': 2147483647, 'min_unit': 1, 'max_unit': 1, 'step_size': 1, 'allocation_ratio': 1.0, 'reserved': 0}, 'DISK_GB': {'total': 867, 'min_unit': 1, 'max_unit': 867, 'step_size': 1, 'allocation_ratio': 1.0, 'reserved': 0}} update_inventory /usr/lib/python3.9/site-packages/nova/compute/provider_tree.py:175
2022-05-25 17:47:39.600 2 DEBUG nova.virt.libvirt.driver [req-9b82cf32-5601-4c2f-9c7d-f27a210fa093 - - - - -] CPU mode 'host-model' models '' was chosen, with extra flags: '' _get_guest_cpu_model_config /usr/lib/python3.9/site-packages/nova/virt/libvirt/driver.py:5081
2022-05-25 17:47:39.631 2 DEBUG nova.scheduler.client.report [req-9b82cf32-5601-4c2f-9c7d-f27a210fa093 - - - - -] Updated inventory for provider ba3bccf9-c283-4cb5-a14d-35ae7ba88533 with generation 19 in Placement from set_inventory_for_provider using data: {'MEMORY_MB': {'total': 257000, 'min_unit': 1, 'max_unit': 257000, 'step_size': 1, 'allocation_ratio': 1.0, 'reserved': 4096}, 'VCPU': {'total': 20, 'min_unit': 1, 'max_unit': 20, 'step_size': 1, 'allocation_ratio': 16.0, 'reserved': 0}, 'PCPU': {'total': 20, 'min_unit': 1, 'max_unit': 20, 'step_size': 1, 'allocation_ratio': 1, 'reserved': 0}, 'MEM_ENCRYPTION_CONTEXT': {'total': 2147483647, 'min_unit': 1, 'max_unit': 1, 'step_size': 1, 'allocation_ratio': 1.0, 'reserved': 0}, 'DISK_GB': {'total': 867, 'min_unit': 1, 'max_unit': 867, 'step_size': 1, 'allocation_ratio': 1.0, 'reserved': 0}} set_inventory_for_provider /usr/lib/python3.9/site-packages/nova/scheduler/client/report.py:910
2022-05-25 17:47:39.632 2 DEBUG nova.compute.provider_tree [req-9b82cf32-5601-4c2f-9c7d-f27a210fa093 - - - - -] Updating resource provider ba3bccf9-c283-4cb5-a14d-35ae7ba88533 generation from 19 to 20 during operation: update_inventory _update_generation /usr/lib/python3.9/site-packages/nova/compute/provider_tree.py:163
2022-05-25 17:47:39.632 2 DEBUG nova.compute.provider_tree [req-9b82cf32-5601-4c2f-9c7d-f27a210fa093 - - - - -] Updating inventory in ProviderTree for provider ba3bccf9-c283-4cb5-a14d-35ae7ba88533 with inventory: {'MEMORY_MB': {'total': 257000, 'reserved': 4096, 'min_unit': 1, 'max_unit': 257000, 'step_size': 1, 'allocation_ratio': 1.0}, 'VCPU': {'total': 20, 'reserved': 0, 'min_unit': 1, 'max_unit': 20, 'step_size': 1, 'allocation_ratio': 16.0}, 'PCPU': {'total': 20, 'reserved': 0, 'min_unit': 1, 'max_unit': 20, 'step_size': 1, 'allocation_ratio': 1}, 'MEM_ENCRYPTION_CONTEXT': {'total': 2147483647, 'reserved': 0, 'min_unit': 1, 'max_unit': 1, 'step_size': 1, 'allocation_ratio': 1.0}, 'DISK_GB': {'total': 867, 'reserved': 0, 'min_unit': 1, 'max_unit': 867, 'step_size': 1, 'allocation_ratio': 1.0}} update_inventory /usr/lib/python3.9/site-packages/nova/compute/provider_tree.py:175

(overcloud) [stack@undercloud-0 ~]$ openstack  resource provider inventory list  ba3bccf9-c283-4cb5-a14d-35ae7ba88533
+------------------------+------------------+----------+----------+----------+-----------+------------+
| resource_class         | allocation_ratio | min_unit | max_unit | reserved | step_size |      total |
+------------------------+------------------+----------+----------+----------+-----------+------------+
| VCPU                   |             16.0 |        1 |       20 |        0 |         1 |         20 |
| MEMORY_MB              |              1.0 |        1 |   257000 |     4096 |         1 |     257000 |
| DISK_GB                |              1.0 |        1 |      867 |        0 |         1 |        867 |
| PCPU                   |              1.0 |        1 |       20 |        0 |         1 |         20 |
| MEM_ENCRYPTION_CONTEXT |              1.0 |        1 |        1 |        0 |         1 | 2147483647 |
+------------------------+------------------+----------+----------+----------+-----------+------------+

Comment 14 errata-xmlrpc 2023-01-25 12:28:50 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 (Red Hat OpenStack Platform 17.0.1 bug fix and enhancement advisory), 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/RHBA-2023:0271