Browse Source

Revert "Wait until iDRAC is ready before out-of-band cleaning"

The openstack/ironic project portion [0] of the fix to bug #1691808
"Manual cleaning fails when using iDRAC driver" [1] is no longer needed.
That is because the openstack/python-dracclient project has adopted
library-wide the best practice that fix contains [2]. Therefore, this
can be removed.

[0] https://review.openstack.org/#/c/466086/
[1] https://bugs.launchpad.net/ironic/+bug/1691808
[2] https://bugs.launchpad.net/python-dracclient/+bug/1697558

This reverts commit 35f222c55d.

Change-Id: I1d313b750f931125567d1ca1c4ef1bbeb998746c
Closes-Bug: #1702195
Depends-On: Ied659a4ee45b1dd55cd3a420301d866d52c838fb
Related-Bug: #1691808
Related-Bug: #1697558
changes/18/481318/2
Richard Pioso 4 years ago
parent
commit
e3753b3597
4 changed files with 2 additions and 28 deletions
  1. +1
    -1
      driver-requirements.txt
  2. +0
    -10
      ironic/drivers/modules/drac/raid.py
  3. +0
    -16
      ironic/tests/unit/drivers/modules/drac/test_raid.py
  4. +1
    -1
      releasenotes/notes/drac-fix-oob-cleaning-b4b717895e243c9b.yaml

+ 1
- 1
driver-requirements.txt View File

@ -10,7 +10,7 @@ python-ironic-inspector-client>=1.5.0
python-oneviewclient<3.0.0,>=2.5.2
python-scciclient>=0.4.0
UcsSdk==0.8.2.2
python-dracclient>=1.2.0
python-dracclient>=1.3.0
# The CIMC drivers use the Cisco IMC SDK version 0.7.2 or greater
ImcSdk>=0.7.2


+ 0
- 10
ironic/drivers/modules/drac/raid.py View File

@ -705,11 +705,6 @@ class DracRAID(base.RAIDInterface):
"""
node = task.node
# The node is rebooting at this point, so wait for the iDRAC to
# enter the ready state before proceeding with cleaning
client = drac_common.get_drac_client(node)
client.wait_until_idrac_is_ready()
logical_disks = node.target_raid_config['logical_disks']
for disk in logical_disks:
if (disk['size_gb'] == 'MAX' and 'physical_disks' not in disk):
@ -761,11 +756,6 @@ class DracRAID(base.RAIDInterface):
"""
node = task.node
# The node is rebooting at this point, so wait for the iDRAC to
# enter the ready state before proceeding with cleaning
client = drac_common.get_drac_client(node)
client.wait_until_idrac_is_ready()
controllers = set()
for disk in list_virtual_disks(node):
controllers.add(disk.controller)


+ 0
- 16
ironic/tests/unit/drivers/modules/drac/test_raid.py View File

@ -615,7 +615,6 @@ class DracRaidInterfaceTestCase(db_base.DbTestCase):
task.driver.raid.create_configuration(
task, create_root_volume=True, create_nonroot_volumes=False)
mock_client.wait_until_idrac_is_ready.assert_called_once()
mock_client.create_virtual_disk.assert_called_once_with(
'RAID.Integrated.1-1',
['Disk.Bay.0:Enclosure.Internal.0-1:RAID.Integrated.1-1',
@ -648,7 +647,6 @@ class DracRaidInterfaceTestCase(db_base.DbTestCase):
return_value = task.driver.raid.create_configuration(
task, create_root_volume=False, create_nonroot_volumes=False)
mock_client.wait_until_idrac_is_ready.assert_called_once()
self.assertEqual(0, mock_client.create_virtual_disk.call_count)
self.assertEqual(0, mock_commit_config.call_count)
@ -690,7 +688,6 @@ class DracRaidInterfaceTestCase(db_base.DbTestCase):
task.driver.raid.create_configuration(
task, create_root_volume=True, create_nonroot_volumes=True)
mock_client.wait_until_idrac_is_ready.assert_called_once()
mock_client.create_virtual_disk.assert_called_once_with(
'RAID.Integrated.1-1',
['Disk.Bay.0:Enclosure.Internal.0-1:RAID.Integrated.1-1',
@ -732,7 +729,6 @@ class DracRaidInterfaceTestCase(db_base.DbTestCase):
task.driver.raid.create_configuration(
task, create_root_volume=True, create_nonroot_volumes=True)
mock_client.wait_until_idrac_is_ready.assert_called_once()
mock_client.create_virtual_disk.assert_has_calls(
[mock.call(
'controller-2',
@ -804,7 +800,6 @@ class DracRaidInterfaceTestCase(db_base.DbTestCase):
task.driver.raid.create_configuration(
task, create_root_volume=True, create_nonroot_volumes=True)
mock_client.wait_until_idrac_is_ready.assert_called_once()
mock_client.create_virtual_disk.assert_has_calls(
[mock.call(
'RAID.Integrated.1-1',
@ -864,7 +859,6 @@ class DracRaidInterfaceTestCase(db_base.DbTestCase):
task.driver.raid.create_configuration(
task, create_root_volume=True, create_nonroot_volumes=True)
mock_client.wait_until_idrac_is_ready.assert_called_once()
mock_client.create_virtual_disk.assert_has_calls(
[mock.call(
'RAID.Integrated.1-1',
@ -925,7 +919,6 @@ class DracRaidInterfaceTestCase(db_base.DbTestCase):
task.driver.raid.create_configuration(
task, create_root_volume=True, create_nonroot_volumes=True)
mock_client.wait_until_idrac_is_ready.assert_called_once()
mock_client.create_virtual_disk.assert_has_calls(
[mock.call(
'RAID.Integrated.1-1',
@ -982,7 +975,6 @@ class DracRaidInterfaceTestCase(db_base.DbTestCase):
exception.InvalidParameterValue,
task.driver.raid.create_configuration,
task)
mock_client.wait_until_idrac_is_ready.assert_called_once()
@mock.patch.object(drac_common, 'get_drac_client', spec_set=True,
autospec=True)
@ -1015,7 +1007,6 @@ class DracRaidInterfaceTestCase(db_base.DbTestCase):
task.driver.raid.create_configuration(
task, create_root_volume=True, create_nonroot_volumes=True)
mock_client.wait_until_idrac_is_ready.assert_called_once()
mock_client.create_virtual_disk.assert_has_calls(
[mock.call(
'RAID.Integrated.1-1',
@ -1070,7 +1061,6 @@ class DracRaidInterfaceTestCase(db_base.DbTestCase):
exception.DracOperationError,
task.driver.raid.create_configuration,
task, create_root_volume=True, create_nonroot_volumes=True)
mock_client.wait_until_idrac_is_ready.assert_called_once()
@mock.patch.object(drac_common, 'get_drac_client', spec_set=True,
autospec=True)
@ -1108,7 +1098,6 @@ class DracRaidInterfaceTestCase(db_base.DbTestCase):
task.driver.raid.create_configuration(
task, create_root_volume=True, create_nonroot_volumes=True)
mock_client.wait_until_idrac_is_ready.assert_called_once()
mock_client.create_virtual_disk.assert_has_calls(
[mock.call(
'RAID.Integrated.1-1',
@ -1174,7 +1163,6 @@ class DracRaidInterfaceTestCase(db_base.DbTestCase):
exception.DracOperationError,
task.driver.raid.create_configuration,
task, create_root_volume=True, create_nonroot_volumes=True)
mock_client.wait_until_idrac_is_ready.assert_called_once()
@mock.patch.object(drac_common, 'get_drac_client', spec_set=True,
autospec=True)
@ -1210,7 +1198,6 @@ class DracRaidInterfaceTestCase(db_base.DbTestCase):
exception.DracOperationError,
task.driver.raid.create_configuration,
task, create_root_volume=True, create_nonroot_volumes=True)
mock_client.wait_until_idrac_is_ready.assert_called_once()
@mock.patch.object(drac_common, 'get_drac_client', spec_set=True,
autospec=True)
@ -1248,7 +1235,6 @@ class DracRaidInterfaceTestCase(db_base.DbTestCase):
exception.DracOperationError,
task.driver.raid.create_configuration,
task, create_root_volume=True, create_nonroot_volumes=True)
mock_client.wait_until_idrac_is_ready.assert_called_once()
@mock.patch.object(drac_common, 'get_drac_client', spec_set=True,
autospec=True)
@ -1283,7 +1269,6 @@ class DracRaidInterfaceTestCase(db_base.DbTestCase):
shared=False) as task:
return_value = task.driver.raid.delete_configuration(task)
mock_client.wait_until_idrac_is_ready.assert_called_once()
mock_client.delete_virtual_disk.assert_called_once_with(
'Disk.Virtual.0:RAID.Integrated.1-1')
mock_commit_config.assert_called_once_with(
@ -1313,7 +1298,6 @@ class DracRaidInterfaceTestCase(db_base.DbTestCase):
shared=False) as task:
return_value = task.driver.raid.delete_configuration(task)
mock_client.wait_until_idrac_is_ready.assert_called_once()
self.assertEqual(0, mock_client.delete_virtual_disk.call_count)
self.assertEqual(0, mock_commit_config.call_count)


+ 1
- 1
releasenotes/notes/drac-fix-oob-cleaning-b4b717895e243c9b.yaml View File

@ -4,4 +4,4 @@ fixes:
cleaning would frequently fail when using the iDRAC driver due to
Export Configuration job running. For more information, see
https://bugs.launchpad.net/ironic/+bug/1691808. Note that this fix
requires python-dracclient version 1.2.0 or higher.
requires python-dracclient version 1.3.0 or higher.

Loading…
Cancel
Save