Make pxelinux.cfg folder configurable

Some operators may wish to utilize different default folders
for their bootloaders to search for refernces to the asociated
configuration file.

This patch adds an option to the configuration file that allows
operators to change the default.

Change-Id: I9b8f97868aea74c1b1b458fe8f16ada1ff4ea579
This commit is contained in:
Julia Kreger 2018-07-16 12:21:42 -07:00
parent 67045c3a55
commit cfa2ddf99c
3 changed files with 18 additions and 1 deletions

View File

@ -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

View File

@ -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.')),

View File

@ -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`.