From 1cb4962922198da781440719bd96a21ed7c95bef Mon Sep 17 00:00:00 2001 From: Kevin Carter Date: Fri, 8 Apr 2016 16:59:34 -0500 Subject: [PATCH] updated Ironic role to fix tftp-hpa issues This change addresses two issues: 1 - the tftpd-hpa package has to be installed on all conductors regardless of standalone more or not. 2 - the tftpd-hpa has an issue where is till not function over ipv4 unless expressly set. To resolve this issue the default configuration file has been changed to lockdown the listen address and set the port. This is the related launchpad issue for tftp-hpa [0] [0] - https://bugs.launchpad.net/ubuntu/+source/tftp-hpa/+bug/1448500 Change-Id: I9861de0a0384661a27f0971f77ab340f4c1d59e3 Signed-off-by: Kevin Carter --- defaults/main.yml | 2 +- tasks/ironic_conductor_post_install.yml | 4 ++-- templates/ironic.conf.j2 | 1 + files/tftpd-hpa => templates/tftpd-hpa.j2 | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) rename files/tftpd-hpa => templates/tftpd-hpa.j2 (66%) diff --git a/defaults/main.yml b/defaults/main.yml index 828454ab..22df7449 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -163,10 +163,10 @@ ironic_conductor_apt_packages: - python-yaml - open-iscsi - ipmitool + - tftpd-hpa ironic_conductor_standalone_apt_packages: - isc-dhcp-server - - tftpd-hpa ## RabbitMQ info ironic_rabbitmq_userid: ironic diff --git a/tasks/ironic_conductor_post_install.yml b/tasks/ironic_conductor_post_install.yml index 3ba1a2dd..2dce0660 100644 --- a/tasks/ironic_conductor_post_install.yml +++ b/tasks/ironic_conductor_post_install.yml @@ -34,8 +34,8 @@ - tftpd-hpa - name: Copy in tftpd-hpa config file - copy: - src: tftpd-hpa + template: + src: tftpd-hpa.j2 dest: /etc/default/tftpd-hpa notify: - Restart tftpd-hpa diff --git a/templates/ironic.conf.j2 b/templates/ironic.conf.j2 index bf123db7..329629b8 100644 --- a/templates/ironic.conf.j2 +++ b/templates/ironic.conf.j2 @@ -134,6 +134,7 @@ pool_max_size = {{ ironic_wsgi_processes }} [oslo_policy] [pxe] +tftp_server = {{ ironic_tftp_server_address }} [seamicro] diff --git a/files/tftpd-hpa b/templates/tftpd-hpa.j2 similarity index 66% rename from files/tftpd-hpa rename to templates/tftpd-hpa.j2 index 37b94c86..b683ea35 100644 --- a/files/tftpd-hpa +++ b/templates/tftpd-hpa.j2 @@ -1,4 +1,4 @@ TFTP_USERNAME="tftp" TFTP_DIRECTORY="/tftpboot" -TFTP_ADDRESS="[::]:69" +TFTP_ADDRESS="{{ ironic_tftp_server_address }}:69" TFTP_OPTIONS="-vvvv --map-file /tftpboot/map-file"