36b1715e86
To set up some first party backends such as ZFSOnLinux, CephFS via NFS gateway, Container (where the NAS server is containerized) and LVM, manila's devstack plugin creates a NAS server on the devstack host. On test machines, access to this NAS server is firewalled from networks outside of the host's internal network namespace (including from private project networks that are in different network namespaces, on the same devstack host). We currently use a legacy devstack-gate script to disable firewall on NFS ports; however, anyone that installs devstack with LVM, Container, ZFSOnLinux, CephFS-NFS drivers will need these firewall ports to be opened to be able to mount shares exported off their devstack host machines. Move these firewall commands to the devstack plugin. These commands can be invoked by setting the localrc variable MANILA_ALLOW_NAS_SERVER_PORTS_ON_HOST to True. The value of this variable is False by default, to preserve existing behavior. Change-Id: Ic9cad47662f1edf2e5c710dbe64d580bc5f01d44
134 lines
4.5 KiB
YAML
134 lines
4.5 KiB
YAML
- hosts: all
|
|
name: Autoconverted job manila-tempest-minimal-dsvm-cephfs-nfs-centos-7 from old job gate-manila-tempest-minimal-dsvm-cephfs-nfs-centos-7-nv
|
|
tasks:
|
|
|
|
- name: Ensure legacy workspace directory
|
|
file:
|
|
path: '{{ ansible_user_dir }}/workspace'
|
|
state: directory
|
|
|
|
- shell:
|
|
cmd: |
|
|
set -e
|
|
set -x
|
|
cat > clonemap.yaml << EOF
|
|
clonemap:
|
|
- name: openstack/devstack-gate
|
|
dest: devstack-gate
|
|
EOF
|
|
/usr/zuul-env/bin/zuul-cloner -m clonemap.yaml --cache-dir /opt/git \
|
|
https://opendev.org \
|
|
openstack/devstack-gate
|
|
executable: /bin/bash
|
|
chdir: '{{ ansible_user_dir }}/workspace'
|
|
environment: '{{ zuul | zuul_legacy_vars }}'
|
|
|
|
# Install centos-release-openstack-* needed for rabbitmq-server
|
|
- name: Add centos-release-openstack-pike support
|
|
become: yes
|
|
yum:
|
|
name: centos-release-openstack-pike
|
|
state: present
|
|
|
|
- name: Check for /etc/yum/vars/contentdir
|
|
stat:
|
|
path: /etc/yum/vars/contentdir
|
|
register: yum_contentdir
|
|
|
|
- when: not yum_contentdir.stat.exists
|
|
block:
|
|
|
|
- name: Discover package architecture
|
|
command: rpm -q --qf "%{arch}" -f /etc/redhat-release
|
|
register: rpm_arch
|
|
|
|
- debug:
|
|
msg: Package architecture is '{{ rpm_arch.stdout }}'
|
|
|
|
- name: Set contentdir to altarch
|
|
set_fact:
|
|
yum_contentdir: altarch
|
|
when: rpm_arch.stdout in ['aarch64', 'ppc64le']
|
|
|
|
- name: Populate /etc/yum/vars/contentdir
|
|
copy:
|
|
dest: /etc/yum/vars/contentdir
|
|
content: "{{ yum_contentdir|default('centos') }}"
|
|
become: true
|
|
|
|
- shell:
|
|
cmd: |
|
|
set -e
|
|
set -x
|
|
cat << 'EOF' >>"/tmp/dg-local.conf"
|
|
[[local|localrc]]
|
|
SKIP_EPEL_INSTALL=True
|
|
enable_plugin manila https://opendev.org/openstack/manila
|
|
enable_plugin manila-tempest-plugin https://opendev.org/openstack/manila-tempest-plugin
|
|
|
|
enable_plugin devstack-plugin-ceph https://opendev.org/openstack/devstack-plugin-ceph
|
|
|
|
# Enable CephFS as the backend for Manila.
|
|
ENABLE_CEPH_MANILA=True
|
|
|
|
# Disable Ceph as the storage backend for Nova.
|
|
ENABLE_CEPH_NOVA=False
|
|
|
|
# Disable Ceph as the storage backend for Glance.
|
|
ENABLE_CEPH_GLANCE=False
|
|
|
|
# Disable Ceph as the storage backend for Cinder.
|
|
ENABLE_CEPH_CINDER=False
|
|
|
|
# Disable Ceph as the storage backend for Cinder backup.
|
|
ENABLE_CEPH_C_BAK=False
|
|
|
|
# Set native or NFS variant of ceph driver
|
|
MANILA_CEPH_DRIVER=cephfsnfs
|
|
|
|
EOF
|
|
executable: /bin/bash
|
|
chdir: '{{ ansible_user_dir }}/workspace'
|
|
environment: '{{ zuul | zuul_legacy_vars }}'
|
|
|
|
- shell:
|
|
cmd: |
|
|
set -e
|
|
set -x
|
|
export PYTHONUNBUFFERED=true
|
|
export DEVSTACK_GATE_NEUTRON=1
|
|
export ENABLED_SERVICES=tempest
|
|
export PROJECTS="openstack/devstack-plugin-ceph $PROJECTS"
|
|
export DEVSTACK_PROJECT_FROM_GIT="python-manilaclient"
|
|
export KEEP_LOCALRC=1
|
|
export PROJECTS="openstack/manila-tempest-plugin $PROJECTS"
|
|
export MANILA_INSTALL_TEMPEST_PLUGIN_SYSTEMWIDE=False
|
|
export MANILA_ALLOW_NAS_SERVER_PORTS_ON_HOST=True
|
|
OVERRIDE_ENABLED_SERVICES=key,mysql,rabbit,tempest
|
|
export OVERRIDE_ENABLED_SERVICES
|
|
|
|
function pre_test_hook {
|
|
# Configure Manila with a CephFS Native or NFS driver backend.
|
|
# Refer to job-template pre_test_hook for more details on the
|
|
# arguments.
|
|
source $BASE/new/devstack-plugin-ceph/manila/pre_test_hook.sh \
|
|
false cephfsnfs singlebackend
|
|
}
|
|
export -f pre_test_hook
|
|
|
|
function post_test_hook {
|
|
# Configure and run Tempest API tests on Manila with a
|
|
# CephFSNative driver backend.
|
|
# Refer to job-template post_test_hook for more details on the
|
|
# arguments.
|
|
source $BASE/new/devstack-plugin-ceph/manila/post_test_hook.sh \
|
|
singlebackend cephfsnfs api
|
|
}
|
|
export -f post_test_hook
|
|
|
|
cp devstack-gate/devstack-vm-gate-wrap.sh ./safe-devstack-vm-gate-wrap.sh
|
|
./safe-devstack-vm-gate-wrap.sh
|
|
executable: /bin/bash
|
|
chdir: '{{ ansible_user_dir }}/workspace'
|
|
environment: '{{ zuul | zuul_legacy_vars }}'
|