diff options
author | Dan Smith <dansmith@redhat.com> | 2022-02-24 11:03:39 -0800 |
---|---|---|
committer | whoami-rajat <rajatdhasmana@gmail.com> | 2022-08-31 18:05:03 +0530 |
commit | 45c5b80fd076d0017f957a2150d7496f6d4a4fcf (patch) | |
tree | 31e23795b09c20bff4aff8a834d556fbde749244 /api-ref | |
parent | 6919db561280874d18fdf61b6750e0c765e0f632 (diff) | |
download | nova-45c5b80fd076d0017f957a2150d7496f6d4a4fcf.tar.gz |
Add API support for rebuilding BFV instances
This adds a microversion and API support for triggering a rebuild
of volume-backed instances by leveraging cinder functionality to
do so.
Implements: blueprint volume-backed-server-rebuild
Closes-Bug: #1482040
Co-Authored-By: Rajat Dhasmana <rajatdhasmana@gmail.com>
Change-Id: I211ad6b8aa7856eb94bfd40e4fdb7376a7f5c358
Diffstat (limited to 'api-ref')
-rw-r--r-- | api-ref/source/parameters.yaml | 17 | ||||
-rw-r--r-- | api-ref/source/servers-actions.inc | 14 |
2 files changed, 20 insertions, 11 deletions
diff --git a/api-ref/source/parameters.yaml b/api-ref/source/parameters.yaml index 63f0f58963..ad5e72fb9b 100644 --- a/api-ref/source/parameters.yaml +++ b/api-ref/source/parameters.yaml @@ -4019,14 +4019,15 @@ imageRef: type: string imageRef_rebuild: description: | - The UUID of the image to rebuild for your server instance. - It must be a valid UUID otherwise API will return 400. - If rebuilding a volume-backed server with a new image - (an image different from the image used when creating the volume), - the API will return 400. - For non-volume-backed servers, specifying a new image will result - in validating that the image is acceptable for the current compute host - on which the server exists. If the new image is not valid, + The UUID of the image to rebuild for your server instance. It + must be a valid UUID otherwise API will return 400. To rebuild a + volume-backed server with a new image, at least microversion 2.93 + needs to be provided in the request else the request will fall + back to old behaviour i.e. the API will return 400 (for an image + different from the image used when creating the volume). For + non-volume-backed servers, specifying a new image will result in + validating that the image is acceptable for the current compute + host on which the server exists. If the new image is not valid, the server will go into ``ERROR`` status. in: body required: true diff --git a/api-ref/source/servers-actions.inc b/api-ref/source/servers-actions.inc index f480403a40..3b8b68d4ff 100644 --- a/api-ref/source/servers-actions.inc +++ b/api-ref/source/servers-actions.inc @@ -540,7 +540,13 @@ Rebuilds a server. Specify the ``rebuild`` action in the request body. This operation recreates the root disk of the server. -For a volume-backed server, this operation keeps the contents of the volume. + +With microversion 2.93, we support rebuilding volume backed +instances which will reimage the volume with the provided +image. For microversion < 2.93, this operation keeps the +contents of the volume given the image provided is same as +the image with which the volume was created else the opearation +will error out. **Preconditions** @@ -552,8 +558,10 @@ If the server was in status ``SHUTOFF`` before the rebuild, it will be stopped and in status ``SHUTOFF`` after the rebuild, otherwise it will be ``ACTIVE`` if the rebuild was successful or ``ERROR`` if the rebuild failed. -.. note:: There is a `known limitation`_ where the root disk is not - replaced for volume-backed instances during a rebuild. +.. note:: With microversion 2.93, we support rebuilding volume backed + instances. If any microversion < 2.93 is specified, there is a + `known limitation`_ where the root disk is not replaced for + volume-backed instances during a rebuild. .. _known limitation: https://bugs.launchpad.net/nova/+bug/1482040 |