Browse Source

Drop dsvm-functional tox env and related files

We no longer run any devstack-gate-based jobs, remove the tox env for it
and the auxillary files.

Change-Id: Ide2fe6ca75370c52180795cc2596be482c862523
changes/44/797044/3
Jens Harbott 7 months ago
committed by Slawek Kaplonski
parent
commit
03876054ad
  1. 1
      .zuul.yaml
  2. 3
      neutron_dynamic_routing/tests/contrib/README
  3. 129
      neutron_dynamic_routing/tests/contrib/gate_hook.sh
  4. 14
      tox.ini

1
.zuul.yaml

@ -3,6 +3,7 @@
parent: neutron-functional
vars:
project_name: neutron-dynamic-routing-functional
tox_envlist: functional
# NOTE(amotoki): neutron-functional sets tox_install_siblings to false.
# This needs to be true so that neutron from its repo is installed into
# tox env.

3
neutron_dynamic_routing/tests/contrib/README

@ -1,3 +0,0 @@
The files in this directory are intended for use by the
infra jobs that run the various functional test
suite in the gate for the neutron-dynamic-routing repo.

129
neutron_dynamic_routing/tests/contrib/gate_hook.sh

@ -1,129 +0,0 @@
#!/usr/bin/env bash
set -xe
PROJECT_NAME=neutron-dynamic-routing
GATE_DEST=$BASE/new
NEUTRON_PATH=$GATE_DEST/neutron
DR_PATH=$GATE_DEST/$PROJECT_NAME
DEVSTACK_PATH=$GATE_DEST/devstack
APPARMOR_PROFILE_PATH=/etc/apparmor.d
QUAGGA_CONFIG_PATH=/tmp/ctn_docker
VENV=${1:-"dsvm-functional"}
# NOTE(kakuma)
# Check apparmor to avoid the following error for docker operation.
# "oci runtime error: apparmor failed to apply profile: no such file or directory"
# This is a temporary solution. This needs to be fixed in a better way.
function check_apparmor_for_docker {
if [[ -d $APPARMOR_PROFILE_PATH ]]
then
if [[ ! -f $APPARMOR_PROFILE_PATH/docker ]]
then
cat << EOF > /tmp/docker
#include <tunables/global>
profile docker-default flags=(attach_disconnected,mediate_deleted) {
#include <abstractions/base>
network,
capability,
file,
umount,
deny @{PROC}/* w, # deny write for all files directly in /proc (not in a subdir)
# deny write to files not in /proc/<number>/** or /proc/sys/**
deny @{PROC}/{[^1-9],[^1-9][^0-9],[^1-9s][^0-9y][^0-9s],[^1-9][^0-9][^0-9][^0-9]*}/** w,
deny @{PROC}/sys/[^k]** w, # deny /proc/sys except /proc/sys/k* (effectively /proc/sys/kernel)
deny @{PROC}/sys/kernel/{?,??,[^s][^h][^m]**} w, # deny everything except shm* in /proc/sys/kernel/
deny @{PROC}/sysrq-trigger rwklx,
deny @{PROC}/mem rwklx,
deny @{PROC}/kmem rwklx,
deny @{PROC}/kcore rwklx,
deny mount,
deny /sys/[^f]*/** wklx,
deny /sys/f[^s]*/** wklx,
deny /sys/fs/[^c]*/** wklx,
deny /sys/fs/c[^g]*/** wklx,
deny /sys/fs/cg[^r]*/** wklx,
deny /sys/firmware/efi/efivars/** rwklx,
deny /sys/kernel/security/** rwklx,
# suppress ptrace denials when using 'docker ps' or using 'ps' inside a container
ptrace (trace,read) peer=docker-default,
}
EOF
chmod 0644 /tmp/docker
sudo chown root:root /tmp/docker
sudo mv /tmp/docker $APPARMOR_PROFILE_PATH/docker
sudo service apparmor restart
sudo service docker restart
fi
fi
}
function configure_docker_test_env {
local docker_pkg
sudo bash -c 'echo "tempest ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers'
sudo apt-get update
sudo apt-get install -y docker-engine || sudo apt-get install -y docker.io
}
function do_devstack_gate {
local gate_retval
set +e
$GATE_DEST/devstack-gate/devstack-vm-gate.sh
gate_retval=$?
if [[ -d $QUAGGA_CONFIG_PATH ]]
then
sudo cp -r $QUAGGA_CONFIG_PATH /opt/stack/logs/bgp_dr_docker
fi
set -e
return $gate_retval
}
if [[ "$VENV" == dsvm-functional* ]]
then
# The following need to be set before sourcing
# configure_for_func_testing.
GATE_STACK_USER=stack
IS_GATE=True
source $DEVSTACK_PATH/functions
source $NEUTRON_PATH/devstack/lib/ovs
source $NEUTRON_PATH/tools/configure_for_func_testing.sh
enable_plugin $PROJECT_NAME https://opendev.org/openstack/$PROJECT_NAME
# Make the workspace owned by the stack user
sudo chown -R $STACK_USER:$STACK_USER $BASE
elif [[ "$VENV" == dsvm-api* ]]
then
export DEVSTACK_LOCAL_CONFIG+=$'\n'"NETWORK_API_EXTENSIONS=all"
$GATE_DEST/devstack-gate/devstack-vm-gate.sh
elif [[ "$VENV" == dsvm-scenario* ]]
then
sudo apt-get update
sudo apt-get install -y --reinstall apparmor
configure_docker_test_env
check_apparmor_for_docker
DEVSTACK_LOCAL_CONFIG+=$'\n'"NETWORK_API_EXTENSIONS=all"
export DEVSTACK_LOCAL_CONFIG+=$'\n'"BGP_SCHEDULER_DRIVER=neutron_dynamic_routing.services.bgp.scheduler.bgp_dragent_scheduler.ChanceScheduler"
do_devstack_gate
else
echo "Unrecognized environment $VENV".
exit 1
fi

14
tox.ini

@ -31,20 +31,6 @@ commands =
stestr run {posargs}
stestr slowest
[testenv:dsvm-functional]
setenv =
OS_TEST_PATH=./neutron_dynamic_routing/tests/functional
OS_SUDO_TESTING=1
OS_ROOTWRAP_CMD=sudo {envdir}/bin/neutron-rootwrap {envdir}/etc/neutron/rootwrap.conf
OS_ROOTWRAP_DAEMON_CMD=sudo {envdir}/bin/neutron-rootwrap-daemon {envdir}/etc/neutron/rootwrap.conf
OS_FAIL_ON_MISSING_DEPS=1
whitelist_externals =
sh
cp
sudo
commands =
stestr run {posargs}
[testenv:releasenotes]
deps = {[testenv:docs]deps}
commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html

Loading…
Cancel
Save