[iRMC] Set polling after RAID is built
Avoid resume clean before raid is actually configured. After creating the RAID, set up polling will notify ironic to wait for the RAID configuration to complete before proceeding to the next step instead of check IPA. Story: #2009231 Task: #43336 Signed-off-by: Zhou Hao <zhouhao@fujitsu.com> Change-Id: I7a551199224c24ca270b8b02d76b39386632c94f
This commit is contained in:
parent
8a5c672fa9
commit
b617e43462
@ -27,6 +27,7 @@ from ironic.conductor import task_manager
|
||||
from ironic.conductor import utils as manager_utils
|
||||
from ironic import conf
|
||||
from ironic.drivers import base
|
||||
from ironic.drivers.modules import deploy_utils
|
||||
from ironic.drivers.modules.irmc import common as irmc_common
|
||||
|
||||
client = importutils.try_import('scciclient.irmc')
|
||||
@ -206,6 +207,12 @@ def _commit_raid_config(task):
|
||||
LOG.info('RAID config is created successfully on node %s',
|
||||
node_uuid)
|
||||
|
||||
deploy_utils.set_async_step_flags(
|
||||
task.node,
|
||||
reboot=True,
|
||||
skip_current_step=True,
|
||||
polling=True)
|
||||
|
||||
return states.CLEANWAIT
|
||||
|
||||
|
||||
|
@ -20,6 +20,7 @@ from unittest import mock
|
||||
|
||||
from ironic.common import exception
|
||||
from ironic.conductor import task_manager
|
||||
from ironic.drivers.modules import deploy_utils
|
||||
from ironic.drivers.modules.irmc import raid
|
||||
from ironic.tests.unit.drivers.modules.irmc import test_common
|
||||
|
||||
@ -604,8 +605,10 @@ class IRMCRaidConfigurationInternalMethodsTestCase(test_common.BaseIRMCTest):
|
||||
@mock.patch('ironic.common.raid.update_raid_info', autospec=True)
|
||||
@mock.patch('ironic.drivers.modules.irmc.raid.client.elcm.'
|
||||
'get_raid_adapter', autospec=True)
|
||||
@mock.patch.object(deploy_utils, 'set_async_step_flags', autospec=True)
|
||||
def test__commit_raid_config_with_logical_drives(
|
||||
self, get_raid_adapter_mock, update_raid_info_mock):
|
||||
self, set_async_step_flags_mock,
|
||||
get_raid_adapter_mock, update_raid_info_mock):
|
||||
get_raid_adapter_mock.return_value = {
|
||||
"Server": {
|
||||
"HWConfigurationIrmc": {
|
||||
@ -698,6 +701,8 @@ class IRMCRaidConfigurationInternalMethodsTestCase(test_common.BaseIRMCTest):
|
||||
task.node.driver_info)
|
||||
update_raid_info_mock.assert_called_once_with(
|
||||
task.node, task.node.raid_config)
|
||||
set_async_step_flags_mock.assert_called_once_with(
|
||||
task.node, reboot=True, skip_current_step=True, polling=True)
|
||||
self.assertEqual(task.node.raid_config['logical_disks'],
|
||||
expected_raid_config)
|
||||
|
||||
|
@ -0,0 +1,8 @@
|
||||
---
|
||||
fixes:
|
||||
- |
|
||||
When configuring RAID on iRMC machines through ironic,
|
||||
polling is not set when RAID is created.
|
||||
After creating the RAID, set up polling will notify ironic to
|
||||
wait for the RAID configuration to complete before
|
||||
proceeding to the next step instead of check IPA.
|
Loading…
Reference in New Issue
Block a user