Merge "Align iRMC driver with Ironic's default boot_mode"

This commit is contained in:
Zuul 2022-11-25 16:32:42 +00:00 committed by Gerrit Code Review
commit c04344ca60
4 changed files with 33 additions and 17 deletions

View File

@ -123,11 +123,6 @@ Configuration via ``driver_info``
the iRMC with administrator privileges. the iRMC with administrator privileges.
- ``driver_info/irmc_password`` property to be ``password`` for - ``driver_info/irmc_password`` property to be ``password`` for
irmc_username. irmc_username.
- ``properties/capabilities`` property to be ``boot_mode:uefi`` if
UEFI boot is required.
- ``properties/capabilities`` property to be ``secure_boot:true`` if
UEFI Secure Boot is required. Please refer to `UEFI Secure Boot Support`_
for more information.
* If ``port`` in ``[irmc]`` section of ``/etc/ironic/ironic.conf`` or * If ``port`` in ``[irmc]`` section of ``/etc/ironic/ironic.conf`` or
``driver_info/irmc_port`` is set to 443, ``driver_info/irmc_verify_ca`` ``driver_info/irmc_port`` is set to 443, ``driver_info/irmc_verify_ca``
@ -191,6 +186,22 @@ Configuration via ``driver_info``
- ``driver_info/irmc_snmp_priv_password`` property to be the privacy protocol - ``driver_info/irmc_snmp_priv_password`` property to be the privacy protocol
pass phrase. The length of pass phrase should be at least 8 characters. pass phrase. The length of pass phrase should be at least 8 characters.
Configuration via ``properties``
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* Each node is configured for ``irmc`` hardware type by setting the following
ironic node object's properties:
- ``properties/capabilities`` property to be ``boot_mode:uefi`` if
UEFI boot is required, or ``boot_mode:bios`` if Legacy BIOS is required.
If this is not set, ``default_boot_mode`` at ``[default]`` section in
``ironic.conf`` will be used.
- ``properties/capabilities`` property to be ``secure_boot:true`` if
UEFI Secure Boot is required. Please refer to `UEFI Secure Boot Support`_
for more information.
Configuration via ``ironic.conf`` Configuration via ``ironic.conf``
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

View File

@ -27,9 +27,9 @@ from ironic.conductor import task_manager
from ironic.conductor import utils as manager_utils from ironic.conductor import utils as manager_utils
from ironic import conf from ironic import conf
from ironic.drivers import base from ironic.drivers import base
from ironic.drivers.modules import boot_mode_utils
from ironic.drivers.modules import ipmitool from ironic.drivers.modules import ipmitool
from ironic.drivers.modules.irmc import common as irmc_common from ironic.drivers.modules.irmc import common as irmc_common
from ironic.drivers import utils as driver_utils
irmc = importutils.try_import('scciclient.irmc') irmc = importutils.try_import('scciclient.irmc')
@ -252,7 +252,7 @@ class IRMCManagement(ipmitool.IPMIManagement):
"Invalid boot device %s specified.") % device) "Invalid boot device %s specified.") % device)
uefi_mode = ( uefi_mode = (
driver_utils.get_node_capability(task.node, 'boot_mode') == 'uefi') boot_mode_utils.get_boot_mode(task.node) == 'uefi')
# disable 60 secs timer # disable 60 secs timer
timeout_disable = "0x00 0x08 0x03 0x08" timeout_disable = "0x00 0x08 0x03 0x08"

View File

@ -202,7 +202,7 @@ class IRMCManagementTestCase(test_common.BaseIRMCTest):
self._test_management_interface_set_boot_device_ok( self._test_management_interface_set_boot_device_ok(
None, None,
params, params,
"0x00 0x08 0x05 0x80 0x04 0x00 0x00 0x00") "0x00 0x08 0x05 0xa0 0x04 0x00 0x00 0x00")
self._test_management_interface_set_boot_device_ok( self._test_management_interface_set_boot_device_ok(
'bios', 'bios',
params, params,
@ -216,7 +216,7 @@ class IRMCManagementTestCase(test_common.BaseIRMCTest):
self._test_management_interface_set_boot_device_ok( self._test_management_interface_set_boot_device_ok(
None, None,
params, params,
"0x00 0x08 0x05 0xc0 0x04 0x00 0x00 0x00") "0x00 0x08 0x05 0xe0 0x04 0x00 0x00 0x00")
self._test_management_interface_set_boot_device_ok( self._test_management_interface_set_boot_device_ok(
'bios', 'bios',
params, params,
@ -231,7 +231,7 @@ class IRMCManagementTestCase(test_common.BaseIRMCTest):
self._test_management_interface_set_boot_device_ok( self._test_management_interface_set_boot_device_ok(
None, None,
params, params,
"0x00 0x08 0x05 0x80 0x08 0x00 0x00 0x00") "0x00 0x08 0x05 0xa0 0x08 0x00 0x00 0x00")
self._test_management_interface_set_boot_device_ok( self._test_management_interface_set_boot_device_ok(
'bios', 'bios',
params, params,
@ -245,7 +245,7 @@ class IRMCManagementTestCase(test_common.BaseIRMCTest):
self._test_management_interface_set_boot_device_ok( self._test_management_interface_set_boot_device_ok(
None, None,
params, params,
"0x00 0x08 0x05 0xc0 0x08 0x00 0x00 0x00") "0x00 0x08 0x05 0xe0 0x08 0x00 0x00 0x00")
self._test_management_interface_set_boot_device_ok( self._test_management_interface_set_boot_device_ok(
'bios', 'bios',
params, params,
@ -260,7 +260,7 @@ class IRMCManagementTestCase(test_common.BaseIRMCTest):
self._test_management_interface_set_boot_device_ok( self._test_management_interface_set_boot_device_ok(
None, None,
params, params,
"0x00 0x08 0x05 0x80 0x20 0x00 0x00 0x00") "0x00 0x08 0x05 0xa0 0x20 0x00 0x00 0x00")
self._test_management_interface_set_boot_device_ok( self._test_management_interface_set_boot_device_ok(
'bios', 'bios',
params, params,
@ -274,7 +274,7 @@ class IRMCManagementTestCase(test_common.BaseIRMCTest):
self._test_management_interface_set_boot_device_ok( self._test_management_interface_set_boot_device_ok(
None, None,
params, params,
"0x00 0x08 0x05 0xc0 0x20 0x00 0x00 0x00") "0x00 0x08 0x05 0xe0 0x20 0x00 0x00 0x00")
self._test_management_interface_set_boot_device_ok( self._test_management_interface_set_boot_device_ok(
'bios', 'bios',
params, params,
@ -289,7 +289,7 @@ class IRMCManagementTestCase(test_common.BaseIRMCTest):
self._test_management_interface_set_boot_device_ok( self._test_management_interface_set_boot_device_ok(
None, None,
params, params,
"0x00 0x08 0x05 0x80 0x18 0x00 0x00 0x00") "0x00 0x08 0x05 0xa0 0x18 0x00 0x00 0x00")
self._test_management_interface_set_boot_device_ok( self._test_management_interface_set_boot_device_ok(
'bios', 'bios',
params, params,
@ -303,7 +303,7 @@ class IRMCManagementTestCase(test_common.BaseIRMCTest):
self._test_management_interface_set_boot_device_ok( self._test_management_interface_set_boot_device_ok(
None, None,
params, params,
"0x00 0x08 0x05 0xc0 0x18 0x00 0x00 0x00") "0x00 0x08 0x05 0xe0 0x18 0x00 0x00 0x00")
self._test_management_interface_set_boot_device_ok( self._test_management_interface_set_boot_device_ok(
'bios', 'bios',
params, params,
@ -318,7 +318,7 @@ class IRMCManagementTestCase(test_common.BaseIRMCTest):
self._test_management_interface_set_boot_device_ok( self._test_management_interface_set_boot_device_ok(
None, None,
params, params,
"0x00 0x08 0x05 0x80 0x0c 0x00 0x00 0x00") "0x00 0x08 0x05 0xa0 0x0c 0x00 0x00 0x00")
self._test_management_interface_set_boot_device_ok( self._test_management_interface_set_boot_device_ok(
'bios', 'bios',
params, params,
@ -332,7 +332,7 @@ class IRMCManagementTestCase(test_common.BaseIRMCTest):
self._test_management_interface_set_boot_device_ok( self._test_management_interface_set_boot_device_ok(
None, None,
params, params,
"0x00 0x08 0x05 0xc0 0x0c 0x00 0x00 0x00") "0x00 0x08 0x05 0xe0 0x0c 0x00 0x00 0x00")
self._test_management_interface_set_boot_device_ok( self._test_management_interface_set_boot_device_ok(
'bios', 'bios',
params, params,

View File

@ -0,0 +1,5 @@
---
fixes:
- |
Modify iRMC driver to use ironic.conf [deploy] default_boot_mode to determine
default boot_mode.