diff --git a/doc/source/deploy/install-guide.rst b/doc/source/deploy/install-guide.rst index a2577e0258..7683bc7b67 100644 --- a/doc/source/deploy/install-guide.rst +++ b/doc/source/deploy/install-guide.rst @@ -1802,16 +1802,9 @@ The node should be in MANAGEABLE state before inspection is initiated. Specifying the disk for deployment ================================== -Starting with the Kilo release, Bare Metal service supports passing hints to the -deploy ramdisk about which disk it should pick for the deployment. In -Linux when a server has more than one SATA, SCSI or IDE disk controller, -the order in which their corresponding device nodes are added is arbitrary -[`link`_], resulting in devices like ``/dev/sda`` and ``/dev/sdb`` to -switch around between reboots. Therefore, to guarantee that a specific -disk is always chosen for the deployment, Bare Metal service introduced -root device hints. - -The list of support hints is: +Starting with the Kilo release, Bare Metal service supports passing +hints to the deploy ramdisk about which disk it should pick for the +deployment. The list of support hints is: * model (STRING): device identifier * vendor (STRING): device vendor @@ -1828,6 +1821,17 @@ The list of support hints is: * wwn (STRING): unique storage identifier * wwn_with_extension (STRING): unique storage identifier with the vendor extension appended * wwn_vendor_extension (STRING): unique vendor storage identifier +* name (STRING): the device name, e.g /dev/md0 + + + .. warning:: + The root device hint name should only be used for devices with + constant names (e.g RAID volumes). For SATA, SCSI and IDE disk + controllers this hint is not recommended because the order in which + the device nodes are added in Linux is arbitrary, resulting in + devices like /dev/sda and /dev/sdb `switching around at boot time + `_. + To associate one or more hints with a node, update the node's properties with a ``root_device`` key, for example:: @@ -1843,9 +1847,6 @@ can not be found. If multiple hints are specified, a device must satisfy all the hints. -.. _`link`: https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/Storage_Administration_Guide/persistent_naming.html - - .. _EnableHTTPSinSwift: Enabling HTTPS in Swift diff --git a/ironic/drivers/modules/deploy_utils.py b/ironic/drivers/modules/deploy_utils.py index 2a2767edc4..2148172290 100644 --- a/ironic/drivers/modules/deploy_utils.py +++ b/ironic/drivers/modules/deploy_utils.py @@ -85,7 +85,8 @@ if CONF.rootwrap_config != '/etc/ironic/rootwrap.conf': LOG = logging.getLogger(__name__) VALID_ROOT_DEVICE_HINTS = set(('size', 'model', 'wwn', 'serial', 'vendor', - 'wwn_with_extension', 'wwn_vendor_extension')) + 'wwn_with_extension', 'wwn_vendor_extension', + 'name')) SUPPORTED_CAPABILITIES = { 'boot_option': ('local', 'netboot'), diff --git a/ironic/tests/unit/drivers/modules/test_deploy_utils.py b/ironic/tests/unit/drivers/modules/test_deploy_utils.py index 67fa37bab0..3309432283 100644 --- a/ironic/tests/unit/drivers/modules/test_deploy_utils.py +++ b/ironic/tests/unit/drivers/modules/test_deploy_utils.py @@ -1203,10 +1203,10 @@ class OtherFunctionTestCase(db_base.DbTestCase): def test_parse_root_device_hints(self): self.node.properties['root_device'] = { 'wwn': 123456, 'model': 'foo-model', 'size': 123, - 'serial': 'foo-serial', 'vendor': 'foo-vendor', + 'serial': 'foo-serial', 'vendor': 'foo-vendor', 'name': '/dev/sda', 'wwn_with_extension': 123456111, 'wwn_vendor_extension': 111, } - expected = ('model=foo-model,serial=foo-serial,size=123,' + expected = ('model=foo-model,name=/dev/sda,serial=foo-serial,size=123,' 'vendor=foo-vendor,wwn=123456,wwn_vendor_extension=111,' 'wwn_with_extension=123456111') result = utils.parse_root_device_hints(self.node) diff --git a/releasenotes/notes/name-root-device-hints-a1484ea01e399065.yaml b/releasenotes/notes/name-root-device-hints-a1484ea01e399065.yaml new file mode 100644 index 0000000000..90f8f46abd --- /dev/null +++ b/releasenotes/notes/name-root-device-hints-a1484ea01e399065.yaml @@ -0,0 +1,3 @@ +--- +features: + - Root device hints extended to support the device name.