From 2f25d4356691d32d8a4da6fdbc7dbcc21d854865 Mon Sep 17 00:00:00 2001 From: Mark Goddard Date: Fri, 3 Mar 2017 13:37:34 +0000 Subject: [PATCH] Create volumes for Bifrost's persistent data Using Docker volumes for persistent data in the bifrost container is necessary for upgrading the bifrost services. This change adds the following volumes: * bifrost_httpboot * bifrost_ironic * bifrost_mariadb * bifrost_rabbitmq * bifrost_tftpboot Ironic creates hardlinks between the TFTP master image store and the HTTP root path when iPXE is enabled. With different 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. Change-Id: I8653268d3598e7a59d2eb45c8750d45b6fc9e35f Partially-implements: blueprint bifrost-upgrade --- ansible/roles/bifrost/tasks/bootstrap.yml | 14 ++++++++++++++ ansible/roles/bifrost/tasks/start.yml | 5 +++++ .../bifrost-persistent-data-019294fe3326cf82.yaml | 5 +++++ 3 files changed, 24 insertions(+) create mode 100644 releasenotes/notes/bifrost-persistent-data-019294fe3326cf82.yaml diff --git a/ansible/roles/bifrost/tasks/bootstrap.yml b/ansible/roles/bifrost/tasks/bootstrap.yml index 8f841d98ee..3b051df143 100644 --- a/ansible/roles/bifrost/tasks/bootstrap.yml +++ b/ansible/roles/bifrost/tasks/bootstrap.yml @@ -37,3 +37,17 @@ 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/tasks/start.yml b/ansible/roles/bifrost/tasks/start.yml index 717f419284..537a6def2e 100644 --- a/ansible/roles/bifrost/tasks/start.yml +++ b/ansible/roles/bifrost/tasks/start.yml @@ -11,3 +11,8 @@ - "/etc/localtime:/etc/localtime:ro" - "/dev:/dev" - "kolla_logs:/var/log/kolla/" + - "bifrost_httpboot:/httpboot/" + - "bifrost_ironic:/var/lib/ironic/" + - "bifrost_mariadb:/var/lib/mysql/" + - "bifrost_rabbitmq:/var/lib/rabbitmq/" + - "bifrost_tftpboot:/tftpboot/" diff --git a/releasenotes/notes/bifrost-persistent-data-019294fe3326cf82.yaml b/releasenotes/notes/bifrost-persistent-data-019294fe3326cf82.yaml new file mode 100644 index 0000000000..0b0aa50c30 --- /dev/null +++ b/releasenotes/notes/bifrost-persistent-data-019294fe3326cf82.yaml @@ -0,0 +1,5 @@ +--- +features: + - | + Adds Docker volumes for storing persistent data in the ``bifrost_deploy`` + container on the deployment host.