Add manila tempest testing

This patch adds definiton of manila extra configuration, which should be used
for correct work of tempest and running manila test.
Additionally it sets default manila backend to cephfs and extends scenario

Change-Id: I636bf2fee1833d33d66c4f2812f2d510cabd15d6
This commit is contained in:
Dmitriy Rabotyagov 2019-08-05 19:59:41 +03:00
parent 1f50c8b538
commit 8a2ea4d3ee
14 changed files with 121 additions and 44 deletions

View File

@ -99,6 +99,7 @@ global_overrides:
- glance_api
- cinder_api
- cinder_volume
- manila_share
- nova_compute
- swift_proxy

View File

@ -124,6 +124,7 @@ global_overrides:
- cinder_api
- cinder_volume
- nova_compute
- manila_share
- swift_proxy
# galera, memcache, rabbitmq, utility

View File

@ -70,6 +70,7 @@ global_overrides:
- glance_api
- cinder_api
- cinder_volume
- manila_share
- nova_compute
- ceph-osd
@ -106,6 +107,12 @@ shared-infra_hosts: *infrastructure_hosts
# ceph-mon containers
ceph-mon_hosts: *infrastructure_hosts
# ceph-mds containers
ceph-mds_hosts: *infrastructure_hosts
# ganesha-nfs hosts
ceph-nfs_hosts: *infrastructure_hosts
# repository (apt cache, python packages, etc)
repo-infra_hosts: *infrastructure_hosts
@ -156,5 +163,9 @@ metering-alarm_hosts: *infrastructure_hosts
# gnocchi (telemetry metrics storage)
metrics_hosts: *infrastructure_hosts
# manila (share service)
manila-infra_hosts: *infrastructure_hosts
manila-data_hosts: *infrastructure_hosts
# ceilometer compute agent (telemetry data collection)
metering-compute_hosts: *compute_hosts

View File

@ -54,5 +54,5 @@ openstack_keys:
- { name: client.cinder, caps: { mon: "profile rbd", osd: "allow class-read object_prefix rbd_children, profile rbd pool={{ openstack_cinder_pool.name }}, profile rbd pool={{ openstack_nova_pool.name }}, profile rbd pool={{ openstack_glance_pool.name }}"}, mode: "0600" }
- { name: client.cinder-backup, caps: { mon: "profile rbd", osd: "profile rbd pool={{ openstack_cinder_backup_pool.name }}"}, mode: "0600" }
- { name: client.gnocchi, caps: { mon: "profile rbd", osd: "profile rbd pool={{ openstack_gnocchi_pool.name }}"}, mode: "0600", }
- { name: client.manila, caps: { mon: "allow r, allow command 'auth del', allow command 'auth caps', allow command 'auth get', allow command 'auth get-or-create'", mds: "allow *", osd: "allow rw"}, mode: "0600", }
- { name: client.openstack, caps: { mon: "profile rbd", osd: "profile rbd pool={{ openstack_glance_pool.name }}, profile rbd pool={{ openstack_nova_pool.name }}, profile rbd pool={{ openstack_cinder_pool.name }}, profile rbd pool={{ openstack_cinder_backup_pool.name }}"}, mode: "0600" }

View File

@ -18,16 +18,50 @@ ceph_container_bind_mounts:
- bind_dir_path: "/var/lib/ceph"
mount_path: "/openstack/{{ inventory_hostname }}"
ceph_conf_overrides_manila:
client.manila:
"client mount gid": 0
"client mount uid": 0
# To extend ceph_conf_overrides use the ceph_conf_overrides_custom which will
# combine any ceph_conf_overrides with other RGW specific overrides.
ceph_conf_overrides_custom: {}
ceph_conf_overrides: "{{ (ceph_conf_overrides_rgw | default({})) | combine(ceph_conf_overrides_custom, recursive=True) }}"
ceph_conf_overrides: "{{ (ceph_conf_overrides_rgw | default({})) | combine(ceph_conf_overrides_manila, recursive=True) | combine(ceph_conf_overrides_custom, recursive=True) }}"
# Disable the NFS gateway PPA and package install by default as it is not
# needed.
nfs_file_gw: False
nfs_file_gw: "{{ (('ceph-nfs' in groups) and ('ceph-mds' in groups)) }}"
nfs_obj_gw: False
nfs_ganesha_stable: "{{ (ansible_distribution_release != 'bionic') }}"
nfs_ganesha_stable_branch: V2.8-stable
# NTP in an OSA environment is handled by ansible-hardening using chrony
# ceph-ansible's default enabling of ntpd conflicts with the OSA defaults
ntp_service_enabled: False
openstack_cephfs_data_pool:
name: "manila_data"
pg_num: "{{ osd_pool_default_pg_num }}"
pgp_num: "{{ osd_pool_default_pg_num }}"
rule_name: "replicated_rule"
type: 1
erasure_profile: ""
expected_num_objects: ""
application: "cephfs"
size: "{{ osd_pool_default_size }}"
min_size: "{{ osd_pool_default_min_size }}"
openstack_cephfs_metadata_pool:
name: "manila_metadata"
pg_num: "{{ osd_pool_default_pg_num }}"
pgp_num: "{{ osd_pool_default_pg_num }}"
rule_name: "replicated_rule"
type: 1
erasure_profile: ""
expected_num_objects: ""
application: "cephfs"
size: "{{ osd_pool_default_size }}"
min_size: "{{ osd_pool_default_min_size }}"
cephfs_data_pool: "{{ openstack_cephfs_data_pool }}"
cephfs_metadata_pool: "{{ openstack_cephfs_metadata_pool }}"

View File

@ -16,12 +16,16 @@
# Set the available protocol list
manila_enabled_share_protocols:
- NFS
- CIFS
- CEPHFS
_manila_default_share_type: "{{ (manila_backends | default({})).keys() }}"
manila_default_share_type: "{{ ((_manila_default_share_type | length) > 0) | ternary(_manila_default_share_type[0], null) }}"
# manila_backend_lvm_inuse: True if current host has an lvm backend
manila_backend_lvm_inuse: "{{ (manila_backends | default({}) | to_json).find('lvm') != -1 }}"
# manila_backend_rbd_inuse: True if the current host has an rbd backend
manila_backend_rbd_inuse: "{{ (manila_backends | default({}) | to_json).find('manila.share.drivers.cephfs') != -1 }}"
# V1 api config
manila_service_publicuri: "{{ openstack_service_publicuri_proto|default(manila_service_proto) }}://{{ external_lb_vip_address }}:{{ manila_service_port }}"
manila_service_internaluri: "{{ openstack_service_internaluri_proto|default(manila_service_proto) }}://{{ internal_lb_vip_address }}:{{ manila_service_port }}"

View File

@ -48,6 +48,9 @@
- role: ceph-handler
tags:
- skip_ansible_lint
- role: ceph-common
tags:
- skip_ansible_lint
- role: ceph-nfs
tags:
- skip_ansible_lint

View File

@ -22,11 +22,6 @@
vars_files:
- "defaults/{{ install_method }}_install.yml"
pre_tasks:
- import_tasks: common-tasks/os-log-dir-setup.yml
vars:
log_dirs:
- src: "/openstack/log/{{ inventory_hostname }}-ceph"
dest: "/var/log/ceph"
- import_tasks: common-tasks/ceph-server.yml

View File

@ -36,21 +36,6 @@
- "'manila_api' in group_names"
- "groups['manila_api'] | length > 1"
- name: Configure container (non-nfs)
include_tasks: "common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml"
vars:
list_of_bind_mounts: "{{ manila_container_bind_mounts }}"
when:
- not is_metal
- manila_default_store == "file"
- (manila_nfs_client is not defined) or (manila_nfs_client | length == 0)
- name: Configure container (nfs)
include_tasks: "common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml"
when:
- not is_metal
- (manila_default_store != "file") or (manila_nfs_client is defined)
- include_tasks: common-tasks/unbound-clients.yml
when:
- hostvars['localhost']['resolvconf_enabled'] | bool

View File

@ -23,6 +23,7 @@
- import_playbook: rabbitmq-install.yml
- import_playbook: etcd-install.yml
- import_playbook: ceph-install.yml
- import_playbook: ceph-nfs-install.yml
- import_playbook: rsyslog-install.yml
# The journald-remote should be disabled by default until

View File

@ -42,6 +42,7 @@ COMMON_ETC_LOG_NAMES="apt \
calico \
ceph \
etcd \
ganesha \
haproxy \
httpd \
memcached \

View File

@ -80,6 +80,12 @@ placement_wsgi_processes_max: 2
placement_wsgi_processes: 2
placement_wsgi_buffer_size: 16384
## Manila
manila_wsgi_processes_max: 2
manila_wsgi_processes: 2
manila_wsgi_threads: 1
manila_wsgi_buffer_size: 65535
## Nova
nova_reserved_host_memory_mb: 256
nova_wsgi_threads: 1

View File

@ -15,33 +15,65 @@ tempest_plugins:
repo: https://opendev.org/openstack/manila-tempest-plugin
branch: master
tempest_flavors:
- name: tempest1
id: 201
ram: 256
disk: 1
vcpus: 1
- name: tempest2
id: 202
ram: 512
disk: 1
vcpus: 1
- name: manila-service-flavor
id: 100
ram: 256
disk: 2
vcpus: 1
tempest_test_whitelist:
- manila_tempest_tests.tests.scenario.test_share_basic_ops
tempest_run_concurrency: 0
tempest_tempest_conf_overrides:
share:
run_consistency_group_tests: False
run_snapshot_tests: False
multitenancy_enabled: False
run_shrink_tests: True
run_extend_tests: True
multi_backend: False
enable_protocols: nfs
run_ipv6_tests: False
share_creation_retry_number: 2
suppress_errors_in_cleanup: True
capability_storage_protocol: NFS
enable_ip_rules_for_protocols: nfs
image_with_share_tools: manila-service-image
image_password: manila
enable_protocols: nfs
enable_ip_rules_for_protocols: nfs
enable_ro_access_level_for_protocols: nfs
suppress_errors_in_cleanup: true
share_creation_retry_number: 3
run_ipv6_tests: False
tempest_images:
- url: "http://download.cirros-cloud.net/0.4.0/cirros-0.4.0-x86_64-disk.img"
checksum: "sha256:a8dd75ecffd4cdd96072d60c2237b448e0c8b2bc94d57f10fdbc8c481d9005b8"
format: "qcow2"
name: "cirros"
- url: "http://tarballs.openstack.org/manila-image-elements/images/manila-service-image-master.qcow2"
format: "qcow2"
name: "manila-service-image"
manila_backends:
nfs-share1:
share_backend_name: NFS_SHARE1
share_driver: manila.share.drivers.lvm.LVMShareDriver
cephfsnfs1:
cephfs_auth_id: manila
cephfs_cluster_name: ceph
cephfs_conf_path: /etc/ceph/ceph.conf
cephfs_enable_snapshots: False
cephfs_ganesha_server_ip: 172.29.236.100
cephfs_ganesha_server_is_remote: False
cephfs_protocol_helper_type: NFS
driver_handles_share_servers: False
lvm_share_volume_group: manila-shares
lvm_share_export_ips: 172.29.244.100
generic:
share_backend_name: GENERIC
share_driver: manila.share.drivers.generic.GenericShareDriver
driver_handles_share_servers: True
service_instance_flavor_id: 100
service_image_name: manila-service-image
service_instance_user: manila
service_instance_password: manila
interface_driver: manila.network.linux.interface.BridgeInterfaceDriver
share_backend_name: CEPHFSNFS1
share_driver: manila.share.drivers.cephfs.driver.CephFSDriver
ganesha_rados_store_enable: False
ganesha_rados_store_pool_name: manila_data

View File

@ -41,6 +41,9 @@ bootstrap_host_scenarios_expanded: |-
{% if 'magnum' in bootstrap_host_scenarios %}
{% set _ = scenario_list.extend(['heat']) %}
{% endif %}
{% if 'manila' in bootstrap_host_scenarios %}
{% set _ = scenario_list.extend(['ceph']) %}
{% endif %}
{% if 'murano' in bootstrap_host_scenarios %}
{% set _ = scenario_list.extend(['heat']) %}
{% endif %}