diff --git a/ironic/common/pxe_utils.py b/ironic/common/pxe_utils.py index 34f79ada84..c3ce89a370 100644 --- a/ironic/common/pxe_utils.py +++ b/ironic/common/pxe_utils.py @@ -32,7 +32,7 @@ CONF = cfg.CONF LOG = logging.getLogger(__name__) -PXE_CFG_DIR_NAME = 'pxelinux.cfg' +PXE_CFG_DIR_NAME = CONF.pxe.pxe_config_subdir DHCP_CLIENT_ID = '61' # rfc2132 DHCP_TFTP_SERVER_NAME = '66' # rfc2132 diff --git a/ironic/conf/pxe.py b/ironic/conf/pxe.py index a893e1509b..1a2454327d 100644 --- a/ironic/conf/pxe.py +++ b/ironic/conf/pxe.py @@ -92,6 +92,13 @@ opts = [ cfg.StrOpt('pxe_bootfile_name', default='pxelinux.0', help=_('Bootfile DHCP parameter.')), + cfg.StrOpt('pxe_config_subdir', + default='pxelinux.cfg', + help=_('Directory in which to create symbolic links which ' + 'represent the MAC or IP address of the the ports on ' + 'a node and allow boot loaders to load the PXE ' + 'file for the node. This directory name is relative ' + 'to the PXE or iPXE folders.')), cfg.StrOpt('uefi_pxe_bootfile_name', default='bootx64.efi', help=_('Bootfile DHCP parameter for UEFI boot mode.')), diff --git a/releasenotes/notes/allow-pxelinux-config-folder-to-be-defined-da0ddd397d58dcc8.yaml b/releasenotes/notes/allow-pxelinux-config-folder-to-be-defined-da0ddd397d58dcc8.yaml new file mode 100644 index 0000000000..93e481d331 --- /dev/null +++ b/releasenotes/notes/allow-pxelinux-config-folder-to-be-defined-da0ddd397d58dcc8.yaml @@ -0,0 +1,10 @@ +--- +features: + - | + Adds a new configuration option ``[pxe]pxe_config_subdir`` to allow + operators to define the specific directory that may be used inside of + ``/tftpboot`` or ``/httpboot`` for a boot loader to locate the + configuration file for the node. This option defaults to ``pxelinux.cfg`` + which is the directory that the Syslinux `pxelinux.0` bootloader utilized. + Operators may wish to change the directory name if they are using other boot + loaders such as `GRUB` or `iPXE`.