Add Zuulv3 native jobs for the dummy driver

- Split the existing "manila-tempest-minimal-dsvm-dummy"
  functional job into two jobs:
  * manila-tempest-plugin-dummy-no-dhss (DHSS=False)
  * manila-tempest-plugin-dummy-dhss (DHSS=True
  to take advantage of the zuul and tempest ansible
  roles available to us.
- Base these new jobs on a minimal devstack, that only
  runs manila and keystone and no other OpenStack services.
  This makes these tests run really fast, coupled
  with the fact that they're running against a no-op
  driver.
- Introduce a role to copy tempest configuration
  after orchestrating devstack because devstack's
  "test-config" hook [1] misbehaves when the base
  services are not enabled.

Depends-On: I4fd282673074887cada729b6e4491ee493e230cc
Change-Id: I4c9f552e6a495b3d3f9dd63c1657ea40a3f9033b
Signed-off-by: Goutham Pacha Ravi <gouthampravi@gmail.com>
This commit is contained in:
Goutham Pacha Ravi 2020-07-10 18:02:30 -07:00
parent 38544589c4
commit df804d8020
7 changed files with 228 additions and 2 deletions

View File

@ -0,0 +1,6 @@
- hosts: tempest
become: true
roles:
- role: fetch-subunit-output
zuul_work_dir: '{{ devstack_base_dir }}/tempest'
- role: process-stackviz

View File

@ -0,0 +1,11 @@
- hosts: all
roles:
- orchestrate-devstack
- hosts: tempest
roles:
- setup-tempest-run-dir
- set-tempest-config
- setup-tempest-data-dir
- acl-devstack-files
- run-tempest

View File

@ -0,0 +1,19 @@
set-tempest-config
==================
This is a workaround for the `merge_config_file <https://opendev
.org/openstack/devstack/src/commit/76d7d7c90c3979c72404fddd31ee884c8bfdb1ec
/inc/meta-config#L82>`_ routine that doesn't working correctly on jobs based on
the "devstack-minimal" profile.
**Role Variables**
.. zuul:rolevar:: devstack_base_dir
:default: /opt/stack
The devstack base directory.
.. zuul:rolevar:: devstack_local_conf_path
:default: "{{ devstack_base_dir }}/devstack/local.conf"
Where to find the local.conf file

View File

@ -0,0 +1,3 @@
---
devstack_base_dir: /opt/stack
devstack_local_conf_path: "{{ devstack_base_dir }}/devstack/local.conf"

View File

@ -0,0 +1,14 @@
- name: Install required pip packages
pip:
name: devstack-tools
state: "latest"
virtualenv: /var/tmp/venv
- name: Copy tempest config
shell: >-
. /var/tmp/venv/bin/activate && \
dsconf extract {{ devstack_local_conf_path }} \
test-config \
'$TEMPEST_CONFIG' \
{{ devstack_base_dir }}/tempest/etc/tempest.conf
become: yes

View File

@ -44,6 +44,8 @@
MANILA_ALLOW_NAS_SERVER_PORTS_ON_HOST: true
MANILA_DEFAULT_SHARE_TYPE_EXTRA_SPECS: 'snapshot_support=True create_share_from_snapshot_support=True'
MANILA_CONFIGURE_DEFAULT_TYPES: true
MANILA_SHARE_MIGRATION_PERIOD_TASK_INTERVAL: 1
MANILA_REPLICA_STATE_UPDATE_INTERVAL: 10
- job:
@ -58,6 +60,58 @@
required-projects: *manila-tempest-required-projects
vars: *manila-tempest-base-vars
- job:
name: manila-tempest-plugin-standalone-base
abstract: true
description: |
Base job for running a minimal devstack with tempest based manila jobs.
timeout: 3600
parent: devstack-minimal
irrelevant-files: *irrelevant-files
roles:
- zuul: opendev.org/openstack/devstack
- zuul: opendev.org/openstack/tempest
required-projects:
- openstack/keystone
- openstack/manila
- openstack/manila-tempest-plugin
- openstack/python-manilaclient
- openstack/tempest
run: playbooks/manila-tempest-plugin-standalone/run.yaml
post-run: playbooks/manila-tempest-plugin-standalone/post.yaml
vars:
tox_envlist: all
tempest_test_regex: manila_tempest_tests.tests.api
tempest_concurrency: 16
tempest_plugins:
- manila-tempest-plugin
devstack_plugins:
manila: https://opendev.org/openstack/manila
manila-tempest-plugin: https://opendev.org/openstack/manila-tempest-plugin
test_results_stage_name: test_results
zuul_copy_output:
'{{ devstack_base_dir }}/tempest/etc/tempest.conf': logs
'{{ devstack_base_dir }}/tempest/etc/accounts.yaml': logs
'{{ devstack_base_dir }}/tempest/tempest.log': logs
'{{ stage_dir }}/{{ test_results_stage_name }}.subunit': logs
'{{ stage_dir }}/{{ test_results_stage_name }}.html': logs
'{{ stage_dir }}/stackviz': logs
extensions_to_txt:
conf: true
log: true
yaml: true
yml: true
devstack_localrc:
USE_PYTHON3: true
MANILA_INSTALL_TEMPEST_PLUGIN_SYSTEMWIDE: false
MANILA_SERVICE_IMAGE_ENABLED: false
MANILA_SHARE_MIGRATION_PERIOD_TASK_INTERVAL: 1
MANILA_REPLICA_STATE_UPDATE_INTERVAL: 10
devstack_services:
tls-proxy: true
key: true
tempest: true
- job:
name: manila-tempest-plugin-zfsonlinux
description: Test ZFSOnLinux multibackend (DHSS=False) with postgresql db
@ -309,4 +363,121 @@
capability_create_share_from_snapshot_support: false
image_password: manila
- job:
name: manila-tempest-plugin-dummy-no-dhss
description: Test the Dummy driver with DHSS=False
parent: manila-tempest-plugin-standalone-base
vars:
devstack_localrc:
SHARE_DRIVER: manila.tests.share.drivers.dummy.DummyDriver
MANILA_CONFIGURE_GROUPS: alpha,beta,gamma,membernet
MANILA_DEFAULT_SHARE_TYPE_EXTRA_SPECS: 'snapshot_support=True create_share_from_snapshot_support=True revert_to_snapshot_support=True mount_snapshot_support=True'
MANILA_ENABLED_BACKENDS: alpha,beta,gamma
MANILA_OPTGROUP_alpha_driver_handles_share_servers: false
MANILA_OPTGROUP_alpha_replication_domain: DUMMY_DOMAIN
MANILA_OPTGROUP_alpha_share_backend_name: ALPHA
MANILA_OPTGROUP_alpha_share_driver: manila.tests.share.drivers.dummy.DummyDriver
MANILA_OPTGROUP_beta_driver_handles_share_servers: false
MANILA_OPTGROUP_beta_replication_domain: DUMMY_DOMAIN
MANILA_OPTGROUP_beta_share_backend_name: BETA
MANILA_OPTGROUP_beta_share_driver: manila.tests.share.drivers.dummy.DummyDriver
# With below opts we'll enable a DHSS=True back-end solely for
# for the migration test case "test_migration_opposite_driver_modes"
MANILA_OPTGROUP_gamma_driver_handles_share_servers: true
MANILA_OPTGROUP_gamma_network_config_group: membernet
MANILA_OPTGROUP_gamma_share_backend_name: GAMMA
MANILA_OPTGROUP_gamma_share_driver: manila.tests.share.drivers.dummy.DummyDriver
MANILA_OPTGROUP_gamma_admin_network_config_group: membernet
MANILA_OPTGROUP_membernet_network_api_class: manila.network.standalone_network_plugin.StandaloneNetworkPlugin
MANILA_OPTGROUP_membernet_network_plugin_ipv4_enabled: true
MANILA_OPTGROUP_membernet_standalone_network_plugin_allowed_ip_ranges: 10.0.0.10-10.0.0.209
MANILA_OPTGROUP_membernet_standalone_network_plugin_gateway: 10.0.0.1
MANILA_OPTGROUP_membernet_standalone_network_plugin_mask: 24
MANILA_OPTGROUP_membernet_standalone_network_plugin_network_type: vlan
MANILA_OPTGROUP_membernet_standalone_network_plugin_segmentation_id: 1010
devstack_local_conf:
test-config:
"$TEMPEST_CONFIG":
share:
backend_names: ALPHA,BETA
backend_replication_type: readable
build_timeout: 180
capability_sg_consistent_snapshot_support: pool
enable_ip_rules_for_protocols: nfs
enable_ro_access_level_for_protocols: nfs,cifs
enable_user_rules_for_protocols: cifs
multi_backend: true
multitenancy_enabled: false
run_driver_assisted_migration_tests: true
run_manage_unmanage_snapshot_tests: true
run_manage_unmanage_tests: true
run_migration_with_preserve_snapshots_tests: true
run_mount_snapshot_tests: true
run_replication_tests: true
run_revert_to_snapshot_tests: true
# for migration test case "test_migration_opposite_driver_modes"
create_networks_when_multitenancy_enabled: false
- job:
name: manila-tempest-plugin-dummy-dhss
description: Test the Dummy driver with DHSS=True
parent: manila-tempest-plugin-standalone-base
vars:
devstack_localrc:
SHARE_DRIVER: manila.tests.share.drivers.dummy.DummyDriver
MANILA_CONFIGURE_GROUPS: alpha,beta,gamma,membernet,adminnet
MANILA_DEFAULT_SHARE_TYPE_EXTRA_SPECS: 'snapshot_support=True create_share_from_snapshot_support=True revert_to_snapshot_support=True mount_snapshot_support=True'
MANILA_ENABLED_BACKENDS: alpha,beta
MANILA_OPTGROUP_DEFAULT_quota_share_networks: 50
MANILA_OPTGROUP_adminnet_network_api_class: manila.network.standalone_network_plugin.StandaloneNetworkPlugin
MANILA_OPTGROUP_adminnet_network_plugin_ipv4_enabled: true
MANILA_OPTGROUP_adminnet_standalone_network_plugin_allowed_ip_ranges: 11.0.0.10-11.0.0.19,11.0.0.30-11.0.0.39,11.0.0.50-11.0.0.199
MANILA_OPTGROUP_adminnet_standalone_network_plugin_gateway: 11.0.0.1
MANILA_OPTGROUP_adminnet_standalone_network_plugin_mask: 24
MANILA_OPTGROUP_adminnet_standalone_network_plugin_network_type: vlan
MANILA_OPTGROUP_adminnet_standalone_network_plugin_segmentation_id: 1011
MANILA_OPTGROUP_alpha_admin_network_config_group: adminnet
MANILA_OPTGROUP_alpha_driver_handles_share_servers: true
MANILA_OPTGROUP_alpha_network_config_group: membernet
MANILA_OPTGROUP_alpha_replication_domain: DUMMY_DOMAIN
MANILA_OPTGROUP_alpha_share_backend_name: ALPHA
MANILA_OPTGROUP_alpha_share_driver: manila.tests.share.drivers.dummy.DummyDriver
MANILA_OPTGROUP_beta_admin_network_config_group: adminnet
MANILA_OPTGROUP_beta_driver_handles_share_servers: true
MANILA_OPTGROUP_beta_network_config_group: membernet
MANILA_OPTGROUP_beta_replication_domain: DUMMY_DOMAIN
MANILA_OPTGROUP_beta_share_backend_name: BETA
MANILA_OPTGROUP_beta_share_driver: manila.tests.share.drivers.dummy.DummyDriver
MANILA_OPTGROUP_membernet_network_api_class: manila.network.standalone_network_plugin.StandaloneNetworkPlugin
MANILA_OPTGROUP_membernet_network_plugin_ipv4_enabled: true
MANILA_OPTGROUP_membernet_standalone_network_plugin_allowed_ip_ranges: 10.0.0.10-10.0.0.209
MANILA_OPTGROUP_membernet_standalone_network_plugin_gateway: 10.0.0.1
MANILA_OPTGROUP_membernet_standalone_network_plugin_mask: 24
MANILA_OPTGROUP_membernet_standalone_network_plugin_network_type: vlan
MANILA_OPTGROUP_membernet_standalone_network_plugin_segmentation_id: 1010
# With below opts we'll enable a DHSS=False back-end solely for
# for the migration test case "test_migration_opposite_driver_modes"
MANILA_OPTGROUP_gamma_driver_handles_share_servers: false
MANILA_OPTGROUP_gamma_share_backend_name: GAMMA
MANILA_OPTGROUP_gamma_share_driver: manila.tests.share.drivers.dummy.DummyDriver
devstack_local_conf:
test-config:
"$TEMPEST_CONFIG":
share:
backend_names: ALPHA,BETA
backend_replication_type: readable
build_timeout: 180
capability_sg_consistent_snapshot_support: pool
create_networks_when_multitenancy_enabled: false
enable_ip_rules_for_protocols: nfs
enable_ro_access_level_for_protocols: nfs,cifs
enable_user_rules_for_protocols: cifs
multi_backend: true
multitenancy_enabled: true
run_driver_assisted_migration_tests: true
run_manage_unmanage_snapshot_tests: true
run_manage_unmanage_tests: true
run_migration_with_preserve_snapshots_tests: true
run_mount_snapshot_tests: true
run_replication_tests: true
run_revert_to_snapshot_tests: true

View File

@ -4,8 +4,9 @@
- tempest-plugin-jobs
check:
jobs:
- manila-tempest-plugin-dummy-no-dhss
- manila-tempest-plugin-dummy-dhss
- manila-tempest-plugin-lvm
- manila-tempest-minimal-dsvm-dummy
- manila-tempest-plugin-zfsonlinux:
voting: false
- manila-tempest-plugin-cephfs-native:
@ -19,7 +20,8 @@
gate:
queue: manila
jobs:
- manila-tempest-minimal-dsvm-dummy
- manila-tempest-plugin-dummy-no-dhss
- manila-tempest-plugin-dummy-dhss
- manila-tempest-plugin-lvm
experimental:
jobs: