diff --git a/devstack/lib/ironic b/devstack/lib/ironic index d559f3a36f..b69ad39e89 100644 --- a/devstack/lib/ironic +++ b/devstack/lib/ironic @@ -128,6 +128,7 @@ IRONIC_TEMPLATES_DIR=${IRONIC_TEMPLATES_DIR:-$IRONIC_DEVSTACK_DIR/tools/ironic/t IRONIC_BAREMETAL_BASIC_OPS=$(trueorfalse False IRONIC_BAREMETAL_BASIC_OPS) IRONIC_TFTPBOOT_DIR=${IRONIC_TFTPBOOT_DIR:-$IRONIC_DATA_DIR/tftpboot} IRONIC_TFTPSERVER_IP=${IRONIC_TFTPSERVER_IP:-$HOST_IP} +IRONIC_TFTP_BLOCKSIZE=${IRONIC_TFTP_BLOCKSIZE:-$((PUBLIC_BRIDGE_MTU-50))} IRONIC_VM_COUNT=${IRONIC_VM_COUNT:-1} IRONIC_VM_SPECS_CPU=${IRONIC_VM_SPECS_CPU:-1} IRONIC_VM_SPECS_RAM=${IRONIC_VM_SPECS_RAM:-1280} @@ -2143,6 +2144,7 @@ function configure_tftpd { [ -f /etc/init/tftpd-hpa.conf ] && echo "manual" | sudo tee /etc/init/tftpd-hpa.override sudo cp $IRONIC_TEMPLATES_DIR/tftpd-xinetd.template /etc/xinetd.d/tftp sudo sed -e "s|%TFTPBOOT_DIR%|$IRONIC_TFTPBOOT_DIR|g" -i /etc/xinetd.d/tftp + sudo sed -e "s|%MAX_BLOCKSIZE%|$IRONIC_TFTP_BLOCKSIZE|g" -i /etc/xinetd.d/tftp # setup tftp file mapping to satisfy requests at the root (booting) and # /tftpboot/ sub-dir (as per deploy-ironic elements) diff --git a/devstack/tools/ironic/templates/tftpd-xinetd.template b/devstack/tools/ironic/templates/tftpd-xinetd.template index 5f3d03f3bb..ec84b0588f 100644 --- a/devstack/tools/ironic/templates/tftpd-xinetd.template +++ b/devstack/tools/ironic/templates/tftpd-xinetd.template @@ -6,7 +6,7 @@ service tftp wait = yes user = root server = /usr/sbin/in.tftpd - server_args = -v -v -v -v -v --map-file %TFTPBOOT_DIR%/map-file %TFTPBOOT_DIR% + server_args = -v -v -v -v -v --blocksize %MAX_BLOCKSIZE% --map-file %TFTPBOOT_DIR%/map-file %TFTPBOOT_DIR% disable = no # This is a workaround for Fedora, where TFTP will listen only on # IPv6 endpoint, if IPv4 flag is not used. diff --git a/doc/source/install/configure-pxe.rst b/doc/source/install/configure-pxe.rst index 0a14c1eae3..659500722e 100644 --- a/doc/source/install/configure-pxe.rst +++ b/doc/source/install/configure-pxe.rst @@ -63,6 +63,17 @@ node(s) where ``ironic-conductor`` is running. sudo systemctl restart xinetd +.. note:: + + In certain environments the network's MTU may cause TFTP UDP packets to get + fragmented. Certain PXE firmwares struggle to reconstruct the fragmented + packets which can cause significant slow down or even prevent the server from + PXE booting. In order to avoid this, TFTPd provides an option to limit the + packet size so that it they do not get fragmented. To set this additional + option in the server_args above:: + + --blocksize + #. Copy the PXE image to ``/tftpboot``. The PXE image might be found at [1]_: Ubuntu (Up to and including 14.04)::