From a39e53b110610aaa8dd8ad3f8ccfdbfca4eb1d8f Mon Sep 17 00:00:00 2001 From: Kevin Carter Date: Wed, 27 Jun 2018 14:22:36 -0500 Subject: [PATCH] Correct data disk format when using nspawn With the change back to using a directory backed container by default, the path /var/lib/machines is no longer assumed to be running BTRFS. This change checks the `container_tech` option and if it's nspawn sets the backend store to BTRFS, otherwise the normal `lxc_container_backing_store` option will be used to determine the data disk format. Change-Id: I8ad207d4d2b09f15cdf95b5c6c7fc8fa22449f8c Signed-off-by: Kevin Carter --- tests/roles/bootstrap-host/defaults/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/roles/bootstrap-host/defaults/main.yml b/tests/roles/bootstrap-host/defaults/main.yml index 43476ea230..dc676866a6 100644 --- a/tests/roles/bootstrap-host/defaults/main.yml +++ b/tests/roles/bootstrap-host/defaults/main.yml @@ -258,8 +258,8 @@ bootstrap_host_data_mount_options: lvm: "defaults" swap: "%%" -bootstrap_host_data_disk2_fs: "{{ bootstrap_host_data_disk2_formats[lxc_container_backing_store] }}" -bootstrap_host_data_disk2_fs_mount_options: "{{ bootstrap_host_data_mount_options[lxc_container_backing_store] }}" +bootstrap_host_data_disk2_fs: "{{ bootstrap_host_data_disk2_formats[((container_tech == 'nspawn') | ternary('btrfs', lxc_container_backing_store))] }}" +bootstrap_host_data_disk2_fs_mount_options: "{{ bootstrap_host_data_mount_options[((container_tech == 'nspawn') | ternary('btrfs', lxc_container_backing_store))] }}" bootstrap_host_data_disk2_path: "{{ (lxc_container_backing_store == 'machinectl' or container_tech == 'nspawn') | ternary('/var/lib/machines', '/var/lib/lxc') }}" # Boolean option to build Amphora image and certs