From 172cd49f3a5d9b9761a11a13b39104ec94ccb159 Mon Sep 17 00:00:00 2001 From: Franciszek Przewozny Date: Fri, 4 Apr 2025 14:36:36 +0200 Subject: [PATCH 1/2] Fix vTPM metadefs. According to the Nova documentation[1], valid tpm_model properties are: tpm-tis and tpm-crb, not TIS and CRB. This patch fixes the misalignment and also adds missing tpm_version property. [1]https://docs.openstack.org/nova/latest/admin/emulated-tpm.html Closes-Bug: #2106223 Change-Id: I698dbd2946555c0a6455b1be17a6bf4a8d407ee7 (cherry picked from commit df5f2b3c8693ce288209e86bee656e7f9c7b9566) --- etc/metadefs/compute-vtpm-hw.json | 18 ++++++++++++++---- glance/tests/functional/db/base_metadef.py | 2 +- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/etc/metadefs/compute-vtpm-hw.json b/etc/metadefs/compute-vtpm-hw.json index 0a4f060269..5d3f72fef4 100644 --- a/etc/metadefs/compute-vtpm-hw.json +++ b/etc/metadefs/compute-vtpm-hw.json @@ -17,14 +17,24 @@ "properties": { "tpm_model": { "title": "TPM model", - "description": "TPM model to use. Option CRB is only valid for TPM version 2.0. Defaults to TIS.", + "description": "TPM model to use. Option tpm-crb is only valid for TPM version 2.0. Defaults to tpm-tis.", "operators": [""], "type": "string", "enum": [ - "TIS", - "CRB" + "tpm-tis", + "tpm-crb" ], - "default": "TIS" + "default": "tpm-tis" + }, + "tpm_version": { + "title": "TPM version", + "description": "TPM version to use. Required if requesting a vTPM. Model tpm-tis supports both, tpm-crb supports only 2.0.", + "operators": [""], + "type": "string", + "enum": [ + "1.2", + "2.0" + ] } }, "objects": [] diff --git a/glance/tests/functional/db/base_metadef.py b/glance/tests/functional/db/base_metadef.py index 1760c6b7ab..aacea71f98 100644 --- a/glance/tests/functional/db/base_metadef.py +++ b/glance/tests/functional/db/base_metadef.py @@ -791,7 +791,7 @@ class MetadefLoadUnloadTests: 'OS::Glance::CommonImageProperties': 10, 'OS::Compute::GuestShutdownBehavior': 1, 'OS::Compute::VMwareFlavor': 2, - 'OS::Compute::TPM': 1, + 'OS::Compute::TPM': 2, 'OS::Compute::GuestMemoryBacking': 1, 'OS::Compute::LibvirtImage': 16, 'OS::Compute::VMware': 6, From de73d00ae0db0c07d13dd9a027639923bc565c19 Mon Sep 17 00:00:00 2001 From: Tobias Urdin Date: Tue, 11 Feb 2025 19:50:19 +0100 Subject: [PATCH 2/2] Update glance-store requirement to >= 4.7.0 The glance-api service doesn't start unless there is a newer glance-store version installed, when doing a SLURP upgrade from Antelope to Caracal glance-api did not start until glance-store was upgraded to a newer version. Change-Id: I8a47d701c195d9418040b4163a3d58af8a4468bc Signed-off-by: Tobias Urdin --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 98552adde4..c2aea2460f 100644 --- a/requirements.txt +++ b/requirements.txt @@ -42,7 +42,7 @@ retrying!=1.3.0,>=1.2.3 # Apache-2.0 osprofiler>=1.4.0 # Apache-2.0 # Glance Store -glance-store>=2.3.0 # Apache-2.0 +glance-store>=4.7.0 # Apache-2.0 debtcollector>=1.19.0 # Apache-2.0