From dd95e1ad7da275692198fdbb20536021e056ef52 Mon Sep 17 00:00:00 2001 From: Brian Rosmaita Date: Wed, 9 Apr 2025 22:53:18 -0400 Subject: [PATCH] [docs] update description of mv 3.46 This is the microversion that is required in order for cinder to correctly create a volume from a nova instance snapshot. Update the rest api version history doc and the api-ref to make this clear. Change-Id: I3e9723bb691ce3e5cdea703bb3b451a23eb18b13 --- api-ref/source/v3/parameters.yaml | 7 ++++++ .../openstack/rest_api_version_history.rst | 22 ++++++++++++++++++- 2 files changed, 28 insertions(+), 1 deletion(-) diff --git a/api-ref/source/v3/parameters.yaml b/api-ref/source/v3/parameters.yaml index f926241832f..072e986366b 100644 --- a/api-ref/source/v3/parameters.yaml +++ b/api-ref/source/v3/parameters.yaml @@ -1756,6 +1756,13 @@ imageRef: description: | The UUID of the image from which you want to create the volume. Required to create a bootable volume. + + **New in version 3.46**: Instead of directly consuming a zero-byte + image that has been created by the Compute service when an instance + snapshot was requested, the Block Storage service will use the + ``snapshot_id`` contained in the ``block_device_mapping`` image + property to locate the volume snapshot, and will use that to create + the volume instead. in: body required: false type: string diff --git a/cinder/api/openstack/rest_api_version_history.rst b/cinder/api/openstack/rest_api_version_history.rst index 5511f72f4f8..3a632620afd 100644 --- a/cinder/api/openstack/rest_api_version_history.rst +++ b/cinder/api/openstack/rest_api_version_history.rst @@ -381,7 +381,27 @@ Add ``count`` field to volume, backup and snapshot list and detail APIs. 3.46 ---- -Support create volume by Nova specific image (0 size image). +Modify the behavior of the volume-create (``POST /v3/volumes``) call when +passing an ``imageRef`` in the request body. Prior to this microversion, +the image was simply downloaded and written to the volume. However, when +a volume is attached to a server, it is possible to use the Compute API +server ``createImage`` action to create an instance snapshot of the volume. +This is a zero-byte image in the Image Service that has a +``block_device_mapping`` image property whose value contains ``snapshot`` +as the ``source_type`` and a ``snapshot_id`` reference to a volume snapshot +in the Block Storage service. From microversion 3.46 and later, when a +volume-create request is made referring to such an image, instead of using +the image to create a volume, the snapshot it references will be used. + +.. note:: + Due to changes to cinder to handle image-related CVEs, making a + volume-create call with an imageRef referring to a nova instance + snapshot specifying a microversion less than 3.46 may create a volume + in ``error`` status. This occurs when the ``disk_format`` property + of the image is something other than ``raw``, because for non-raw + formats, even an image containing no data will consist of more than + zero bytes, and thus the image is rejected as being of a different + format than is claimed. 3.47 ----