As of now, when attempting to rescue a volume-based instance
using an image without the hw_rescue_device and/or hw_rescue_bus
properties set, the rescue api call fails (as non-stable rescue
for volume-based instances are not supported) leaving the instance
in error state.
This change checks for hw_rescue_device/hw_rescue_bus image
properties before attempting to rescue and if the property
is not set, then fail with proper error message, without changing
instance state.
Related-Bug: #1978958
Closes-Bug: #1926601
Change-Id: Id4c8c5f3b32985ac7d3d7c833b82e0876f7367c1
(cherry picked from commit 6eed55bf55469f4ceaa7d4d4eb1be635e14bc73b)
(cherry picked from commit d00a848a735f98b028f5930798ee69ef205c8e2e)
(cherry picked from commit 4073aa51f79be54e2e6e8143666a7c1f9a00e03d)
Reviewed: https:/ /review. opendev. org/c/openstack /nova/+ /875343 /opendev. org/openstack/ nova/commit/ c977027b1933e40 8c58508e883f6a7 99ffacc4cc
Committed: https:/
Submitter: "Zuul (22348)"
Branch: stable/xena
commit c977027b1933e40 8c58508e883f6a7 99ffacc4cc
Author: Rajesh Tailor <email address hidden>
Date: Wed Aug 10 18:15:04 2022 +0530
Fix rescue volume-based instance
As of now, when attempting to rescue a volume-based instance
using an image without the hw_rescue_device and/or hw_rescue_bus
properties set, the rescue api call fails (as non-stable rescue
for volume-based instances are not supported) leaving the instance
in error state.
This change checks for hw_rescue_ device/ hw_rescue_ bus image
properties before attempting to rescue and if the property
is not set, then fail with proper error message, without changing
instance state.
Related-Bug: #1978958 ac7d3d7c833b82e 0876f7367c1 ceaa7d4d4eb1be6 35e14bc73b) 028f5930798ee69 ef205c8e2e) e2e6e8143666a7c 1f9a00e03d)
Closes-Bug: #1926601
Change-Id: Id4c8c5f3b32985
(cherry picked from commit 6eed55bf55469f4
(cherry picked from commit d00a848a735f98b
(cherry picked from commit 4073aa51f79be54