From c158e0f5674922a364be8b68201e8ed4f3f9d8c2 Mon Sep 17 00:00:00 2001
From: Dmitry Tantsur <dtantsur@protonmail.com>
Date: Thu, 27 Jan 2022 15:21:39 +0100
Subject: [PATCH] Document new properties used by Ironic

* rootfs_uuid (introduced a while ago) specifies which partition of a
  whole-disk image is a root.
* img_type specifies whether the image is a whole-disk or a partition
  image. Currently Ironic uses kernel_id/ramdisk_id to decide that, but
  this logic only makes sense when booting instances from network.

img_type will be introduced by https://review.opendev.org/c/openstack/ironic/+/825305

Change-Id: Idd0d38fc312d08a99b5f5b2072cc991bc4575719
---
 doc/source/admin/useful-image-properties.rst | 25 ++++++++++++++++++++
 1 file changed, 25 insertions(+)

diff --git a/doc/source/admin/useful-image-properties.rst b/doc/source/admin/useful-image-properties.rst
index c3c3b120c6..fa59a0c962 100644
--- a/doc/source/admin/useful-image-properties.rst
+++ b/doc/source/admin/useful-image-properties.rst
@@ -13,6 +13,9 @@ the behavior of those other services.  For example:
 * Image properties can be used to affect the behavior of particular Nova
   hypervisors
 
+* Image properties can be used to provide additional information to Ironic
+  (even when Nova is not used)
+
 Using image properties
 ----------------------
 
@@ -155,6 +158,22 @@ Here is a list of useful image properties and the values they expect.
   - ``mandatory``
   - ``optional`` (default if property is not used)
 
+``img_type``
+  :Type: str
+
+  Specifies the partitioning type of the image. The default value is
+  ``partition`` if the ``kernel_id``/``ramdisk_id`` properties are present,
+  otherwise ``whole-disk``.
+
+  One of:
+
+  - ``whole-disk`` - an image with a partition table embedded.
+  - ``partition`` - an image with only the root partition without a partition
+    table.
+
+  .. note::
+     This property is currently only recognized by Ironic.
+
 ``kernel_id``
   :Type: str
 
@@ -251,6 +270,12 @@ Here is a list of useful image properties and the values they expect.
 
   The value must be a valid image ID.
 
+``rootfs_uuid``
+  For whole-disk images (see ``img_type`` above), the UUID of the root
+  partition.
+
+  This property is used by Ironic when configuring software RAID.
+
 ``trait:<trait_name>``
   :Type: str