From e78f823110b16011659df11d809cb468a2fbfab1 Mon Sep 17 00:00:00 2001 From: Mark Goddard Date: Wed, 4 Jul 2018 15:36:58 +0100 Subject: [PATCH] Bifrost: set TFTP cache master path properly Ironic creates hardlinks between the TFTP master image store and the HTTP root path when iPXE is enabled. With Docker volumes used for these locations we run into https://bugs.launchpad.net/ironic/+bug/1507894 during deployment. If we use a directory under /httpboot to store the master images this issue is avoided. This change uses the new bifrost config variable, ironic_tftp_master_path added in [1] to configure the path, rather than the existing hacked approach of modifying the ironic.conf config file after the bifrost_deploy container has started. [1] https://review.openstack.org/#/c/577071 Change-Id: I5c62999c4956bebd0d3920d756ce67ba194b0ebe --- ansible/roles/bifrost/tasks/bootstrap.yml | 14 -------------- ansible/roles/bifrost/templates/bifrost.yml.j2 | 7 +++++++ 2 files changed, 7 insertions(+), 14 deletions(-) diff --git a/ansible/roles/bifrost/tasks/bootstrap.yml b/ansible/roles/bifrost/tasks/bootstrap.yml index 352e896c70..442cad658c 100644 --- a/ansible/roles/bifrost/tasks/bootstrap.yml +++ b/ansible/roles/bifrost/tasks/bootstrap.yml @@ -41,17 +41,3 @@ chown ironic:ironic /home/ironic/.ssh/id_rsa && chown ironic:ironic /home/ironic/.ssh/id_rsa.pub && chown ironic:ironic /home/ironic/.ssh/config' - -# Ironic creates hardlinks between the TFTP master image store and the -# HTTP root path when iPXE is enabled. With Docker volumes used for these -# locations we run into https://bugs.launchpad.net/ironic/+bug/1507894 -# during deployment. If we use a directory under /httpboot to store the -# master images this issue is avoided. -- name: Configuring TFTP master image path - command: | - docker exec bifrost_deploy - bash -c 'cat >> /etc/ironic/ironic.conf << EOF - [pxe] - tftp_master_path = /httpboot/master_images - EOF - systemctl restart ironic-conductor' diff --git a/ansible/roles/bifrost/templates/bifrost.yml.j2 b/ansible/roles/bifrost/templates/bifrost.yml.j2 index 10ac974419..cc5ac14551 100644 --- a/ansible/roles/bifrost/templates/bifrost.yml.j2 +++ b/ansible/roles/bifrost/templates/bifrost.yml.j2 @@ -10,3 +10,10 @@ nginx_log_dir: "/var/log/kolla/nginx" ansible_python_interpreter: /var/lib/kolla/venv/bin/python network_interface: "{{ bifrost_network_interface }}" + +# Ironic creates hardlinks between the TFTP master image store and the +# HTTP root path when iPXE is enabled. With Docker volumes used for these +# locations we run into https://bugs.launchpad.net/ironic/+bug/1507894 +# during deployment. If we use a directory under /httpboot to store the +# master images this issue is avoided. +ironic_tftp_master_path: "/httpboot/master_images"