diff options
author | Zuul <zuul@review.opendev.org> | 2022-08-17 12:04:59 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2022-08-17 12:04:59 +0000 |
commit | 4a347b3069498d0f2b49105014e6e118b5972c0f (patch) | |
tree | 4cb96f206dd0c432980e8d410e96a6d939b60fef /ironic/drivers/modules/redfish/bios.py | |
parent | 2a66fd68a53381be4665c989a70bd42b72241103 (diff) | |
parent | 89f421b166915a22626dcb919382ce13f4588973 (diff) | |
download | ironic-4a347b3069498d0f2b49105014e6e118b5972c0f.tar.gz |
Merge "Do not reboot into nowhere after BIOS settings with fast-track"21.0.0
Diffstat (limited to 'ironic/drivers/modules/redfish/bios.py')
-rw-r--r-- | ironic/drivers/modules/redfish/bios.py | 24 |
1 files changed, 4 insertions, 20 deletions
diff --git a/ironic/drivers/modules/redfish/bios.py b/ironic/drivers/modules/redfish/bios.py index c2eb8fcbc..bee868e38 100644 --- a/ironic/drivers/modules/redfish/bios.py +++ b/ironic/drivers/modules/redfish/bios.py @@ -19,7 +19,6 @@ from oslo_utils import importutils from ironic.common import exception from ironic.common.i18n import _ from ironic.common import states -from ironic.conductor import task_manager from ironic.conductor import utils as manager_utils from ironic.drivers import base from ironic.drivers.modules import deploy_utils @@ -185,9 +184,8 @@ class RedfishBIOS(base.BIOSInterface): LOG.error(error_msg) raise exception.RedfishError(error=error_msg) - self.post_reset(task) self._set_reboot(task) - return deploy_utils.get_async_step_return_state(task.node) + return self.post_reset(task) else: current_attrs = bios.attributes LOG.debug('Post factory reset, BIOS configuration for node ' @@ -244,9 +242,8 @@ class RedfishBIOS(base.BIOSInterface): LOG.error(error_msg) raise exception.RedfishError(error=error_msg) - self.post_configuration(task, settings) self._set_reboot_requested(task, attributes) - return deploy_utils.get_async_step_return_state(task.node) + return self.post_configuration(task, settings) else: # Step 2: Verify requested BIOS settings applied requested_attrs = info.get('requested_bios_attrs') @@ -267,8 +264,7 @@ class RedfishBIOS(base.BIOSInterface): :param task: a TaskManager instance containing the node to act on. """ - deploy_utils.prepare_agent_boot(task) - self._reboot(task) + return deploy_utils.reboot_to_finish_step(task) def post_configuration(self, task, settings): """Perform post configuration action to store the BIOS settings. @@ -281,8 +277,7 @@ class RedfishBIOS(base.BIOSInterface): :param task: a TaskManager instance containing the node to act on. :param settings: a list of BIOS settings to be updated. """ - deploy_utils.prepare_agent_boot(task) - self._reboot(task) + return deploy_utils.reboot_to_finish_step(task) def get_properties(self): """Return the properties of the interface. @@ -322,17 +317,6 @@ class RedfishBIOS(base.BIOSInterface): LOG.debug('Verification of BIOS settings for node %(node_uuid)s ' 'successful.', {'node_uuid': task.node.uuid}) - @task_manager.require_exclusive_lock - def _reboot(self, task): - """Reboot the target Redfish service. - - :param task: a TaskManager instance containing the node to act on. - :raises: InvalidParameterValue when the wrong state is specified - or the wrong driver info is specified. - :raises: RedfishError on an error from the Sushy library - """ - manager_utils.node_power_action(task, states.REBOOT) - def _set_reboot(self, task): """Set driver_internal_info flags for deployment or cleaning reboot. |