summaryrefslogtreecommitdiff
path: root/devstack
diff options
context:
space:
mode:
authorSam Betts <sam@code-smash.net>2017-12-18 15:13:48 +0000
committerSam Betts <sam@code-smash.net>2018-10-30 10:36:26 +0000
commit55ac08ab8567df00a7cd91c1d471cd193a926f28 (patch)
tree33de1c642228cc0834152e7c53e4c9dd48420fdf /devstack
parent7e47264ece751939aab9d54306ea61a2d02b36e9 (diff)
downloadironic-55ac08ab8567df00a7cd91c1d471cd193a926f28.tar.gz
[devstack] Allow setting TFTP max blocksize
Configuring the block size correctly for TFTPd prevents fragmentation of the TFTP UDP packets, which can significantly slow down or even prevent servers from booting correctly with PXE. Change-Id: Ic00bbcfb3137edb58479c019edb3fcdc4ef55d69
Diffstat (limited to 'devstack')
-rw-r--r--devstack/lib/ironic2
-rw-r--r--devstack/tools/ironic/templates/tftpd-xinetd.template2
2 files changed, 3 insertions, 1 deletions
diff --git a/devstack/lib/ironic b/devstack/lib/ironic
index d559f3a36..b69ad39e8 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 5f3d03f3b..ec84b0588 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.