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
109 lines
4.2 KiB
YAML
109 lines
4.2 KiB
YAML
- hosts: all
|
|
name: Autoconverted job legacy-manila-tempest-dsvm-container-scenario-custom-image
|
|
from old job gate-manila-tempest-dsvm-container-scenario-custom-image-ubuntu-xenial-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 }}'
|
|
|
|
- shell:
|
|
cmd: |
|
|
set -e
|
|
set -x
|
|
cat << 'EOF' >>"/tmp/dg-local.conf"
|
|
[[local|localrc]]
|
|
enable_plugin manila https://opendev.org/openstack/manila
|
|
enable_plugin manila-tempest-plugin https://opendev.org/openstack/manila-tempest-plugin
|
|
|
|
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 DEVSTACK_GATE_POSTGRES=0
|
|
export DEVSTACK_PROJECT_FROM_GIT="python-manilaclient"
|
|
|
|
# Install manila-image-elements project for building custom image
|
|
export PROJECTS="openstack/manila-image-elements $PROJECTS"
|
|
|
|
export ENABLED_SERVICES=tempest
|
|
export MANILA_INSTALL_TEMPEST_PLUGIN_SYSTEMWIDE=False
|
|
export MANILA_ALLOW_NAS_SERVER_PORTS_ON_HOST=True
|
|
|
|
# Keep localrc to be able to set some vars in pre_test_hook
|
|
export KEEP_LOCALRC=1
|
|
export PROJECTS="openstack/manila-tempest-plugin $PROJECTS"
|
|
|
|
function pre_test_hook {
|
|
current_dir=$(pwd)
|
|
|
|
# Go to 'manila-image-elements' dir, build image and get its name
|
|
cd /opt/stack/new/manila-image-elements
|
|
./tools/gate/build-images container_with_custom_image
|
|
image_name=$(cat ./IMAGE_NAME)
|
|
export MANILA_SERVICE_IMAGE_URL="file://$(pwd)/$image_name"
|
|
export MANILA_SERVICE_IMAGE_NAME=$(basename -s .tar.gz $(basename -s .qcow2 $image_name))
|
|
|
|
# Return back to execution dir
|
|
cd $current_dir
|
|
|
|
# 'dhss' - acronym for 'Driver Handles Share Servers',
|
|
# defines mode of a share driver. Boolean-like.
|
|
# 'driver' - codename of a share driver to configure.
|
|
# 'back_end_type' - defines which installation Manila should
|
|
# have - either 'singlebackend' or 'multibackend'.
|
|
source $BASE/new/manila/contrib/ci/pre_test_hook.sh \
|
|
1 \
|
|
container_with_custom_image \
|
|
multibackend
|
|
}
|
|
export -f pre_test_hook
|
|
|
|
function post_test_hook {
|
|
# 'back_end_type' - defines which installation Manila is
|
|
# configured to - either 'singlebackend' or 'multibackend'.
|
|
# 'driver' - codename of a share driver that is configured in
|
|
# Manila. It is used for enabling/disabling tests that are not
|
|
# supported by share driver that is used.
|
|
# 'test_type' - defines which set of test suites should be used,
|
|
# can have 'api' and 'scenario' values.
|
|
# 'postgres_enabled' - set of test suites depends on DB backend
|
|
# in some cases, so it is provided explicitely. Boolean-like.
|
|
source $BASE/new/manila/contrib/ci/post_test_hook.sh \
|
|
multibackend \
|
|
container_with_custom_image \
|
|
scenario \
|
|
0
|
|
}
|
|
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 }}'
|