From 38ee58b390b7dd32590e10d55cb40e9d4443d47d Mon Sep 17 00:00:00 2001 From: Dmitriy Rabotyagov Date: Mon, 26 Sep 2022 20:39:05 +0200 Subject: [PATCH] Extend NFS scenario to support cinder We do have NFS scenario to deploy glance with NFS backend. However we did not test cinder with NFS. With this change we extend possible usecase of NFS server to support cinder as a backend. Change-Id: I5bc0e5e08fdfd8f0fb90e5716cc6b9a0b1401c55 --- tests/roles/bootstrap-host/tasks/prepare_nfs.yml | 2 ++ .../templates/user_variables.aio.yml.j2 | 2 +- .../templates/user_variables_nfs.yml.j2 | 15 +++++++++++++++ 3 files changed, 18 insertions(+), 1 deletion(-) diff --git a/tests/roles/bootstrap-host/tasks/prepare_nfs.yml b/tests/roles/bootstrap-host/tasks/prepare_nfs.yml index 5ca558fd29..89c344ca75 100644 --- a/tests/roles/bootstrap-host/tasks/prepare_nfs.yml +++ b/tests/roles/bootstrap-host/tasks/prepare_nfs.yml @@ -73,6 +73,7 @@ group: "nfs-user" with_items: - "/srv/nfs/glance" + - "/srv/nfs/cinder" - name: Create exports file lineinfile: @@ -84,6 +85,7 @@ create: yes with_items: - "/srv/nfs/glance" + - "/srv/nfs/cinder" register: nfs_exportfs - name: Restart nfs-server diff --git a/tests/roles/bootstrap-host/templates/user_variables.aio.yml.j2 b/tests/roles/bootstrap-host/templates/user_variables.aio.yml.j2 index 535c0b2fe9..dd433e9ba8 100644 --- a/tests/roles/bootstrap-host/templates/user_variables.aio.yml.j2 +++ b/tests/roles/bootstrap-host/templates/user_variables.aio.yml.j2 @@ -287,7 +287,7 @@ deployment_environment_variables: lxc_container_networks: {} {% endif %} -{% if 'ceph' not in bootstrap_host_scenarios_expanded %} +{% if 'ceph' not in bootstrap_host_scenarios_expanded and 'nfs' not in bootstrap_host_scenarios_expanded %} cinder_backends: lvm: volume_group: cinder-volumes diff --git a/tests/roles/bootstrap-host/templates/user_variables_nfs.yml.j2 b/tests/roles/bootstrap-host/templates/user_variables_nfs.yml.j2 index c68fc85fed..2a8045cbb6 100644 --- a/tests/roles/bootstrap-host/templates/user_variables_nfs.yml.j2 +++ b/tests/roles/bootstrap-host/templates/user_variables_nfs.yml.j2 @@ -6,3 +6,18 @@ glance_remote_client: where: "/var/lib/glance/images" type: "nfs" options: "_netdev,auto" +cinder_default_volume_type: aio_nfs +cinder_backends: + aio_nfs: + volume_backend_name: nfs + volume_driver: cinder.volume.drivers.nfs.NfsDriver + nfs_shares_config: /etc/cinder/nfs_shares + nfs_qcow2_volumes: true + nfs_mount_options: vers=4,nfsvers=4,noatime,rw,bg,intr,async,timeo=60 + nfs_snapshot_support: true + nas_secure_file_operations: false + shares: + - ip: 172.29.244.100 + share: /srv/nfs/cinder +tempest_test_includelist: + - tempest.scenario.test_volume_boot_pattern.TestVolumeBootPattern.test_volume_boot_pattern