Switch to using a dedicated TFTPd for baremetal.

We currently use dnsmasq to provide TFTP when booting baremetal nodes,
but that becomes redundant when we switch to using neutron's DHCP
agent. Instead we need a dedicated TFTPd, and we can use that with
dnsmasq by disabling dnsmasq's built-in TFTPd, giving a consistent
setup.

Change-Id: I985fff9a3dded1b0dffe82fa5d48009441777733
This commit is contained in:
Robert Collins 2013-09-26 16:16:56 +12:00
parent f878019629
commit 7bd7693447
2 changed files with 17 additions and 2 deletions

View File

@ -20,8 +20,6 @@ script
exec dnsmasq --conf-file= \\
--keep-in-foreground \\
--port=0 \\
--enable-tftp \\
--tftp-root=/tftpboot \\
--dhcp-boot=pxelinux.0 \\
--bind-interfaces \\
--pid-file=/var/run/dnsmasq.pid \\

View File

@ -1,6 +1,9 @@
#!/bin/bash
set -eux
# syslinux is installed by nova-compute, which contains pxelinux.0
install-packages atftpd xinetd
mkdir -p /tftpboot/pxelinux.cfg/
if [ -f /usr/lib/syslinux/pxelinux.0 ]; then
cp /usr/lib/syslinux/pxelinux.0 /tftpboot/ # Ubuntu
@ -10,3 +13,17 @@ else
echo "Failed to find pxelinux.0."
exit 1
fi
cat > /etc/xinetd.d/tftp << EOF
service tftp
{
protocol = udp
port = 69
socket_type = dgram
wait = yes
user = nobody
server = /usr/sbin/in.tftpd
server_args = /tftpboot
disable = no
}
EOF