various small changes to test openvz driver

Change-Id: Ia98d2e3706da6b89724612eec51ac20ba730b1e2
This commit is contained in:
Devananda van der Veen
2012-07-25 00:31:14 +00:00
parent c4cc52393d
commit 8f42515af5
3 changed files with 24 additions and 2 deletions

View File

@@ -24,6 +24,9 @@ PROJECTS="openstack-dev/devstack openstack/nova openstack/glance openstack/keyst
# Set to 1 to run the Tempest test suite
export DEVSTACK_GATE_TEMPEST=${DEVSTACK_GATE_TEMPEST:-0}
# Set the virtualization driver to: libvirt, openvz
export DEVSTACK_GATE_VIRT_DRIVER=${DEVSTACK_GATE_VIRT_DRIVER:-libvirt}
# See switch below for this -- it gets set to 1 when tempest
# is the project being gated.
export DEVSTACK_GATE_TEMPEST_FULL=${DEVSTACK_GATE_TEMPEST_FULL:-0}
@@ -142,6 +145,11 @@ function setup_host {
sudo chown root:root $TEMPFILE
sudo mv $TEMPFILE /etc/sudoers.d/50_stack_sh
# If we will be testing OpenVZ, make sure stack is a member of the vz group
if [ "$DEVSTACK_GATE_VIRT_DRIVER" == "openvz" ]; then
sudo usermod -a -G vz stack
fi
# Disable detailed logging as we return to the main script
set +o xtrace
}

View File

@@ -55,9 +55,23 @@ SYSLOG=True
SCREEN_LOGDIR=$DEST/screen-logs
FIXED_RANGE=10.1.0.0/24
FIXED_NETWORK_SIZE=256
VIRT_DRIVER=$DEVSTACK_GATE_VIRT_DRIVER
export OS_NO_CACHE=True
EOF
if [ "$DEVSTACK_GATE_VIRT_DRIVER" == "openvz" ]; then
cat <<\EOF >>localrc
SKIP_EXERCISES=${SKIP_EXERCISES},volumes
DEFAULT_INSTANCE_TYPE=m1.small
DEFAULT_INSTANCE_USER=root
EOF
cat <<EOF >>exerciserc
DEFAULT_INSTANCE_TYPE=m1.small
DEFAULT_INSTANCE_USER=root
EOF
fi
if [ "$DEVSTACK_GATE_TEMPEST" -eq "1" ]; then
# We need to disable ratelimiting when running
# Tempest tests since so many requests are executed

View File

@@ -203,7 +203,7 @@ def configure_server(server, branches):
'ls ~/cache/files/%s' % fname)
except:
client.ssh('download image %s' % fname,
'wget -c %s -O ~/cache/files/%s' % (url, fname))
'wget -nv -c %s -O ~/cache/files/%s' % (url, fname))
client.ssh('clear workspace', 'rm -rf ~/workspace-cache')
client.ssh('make workspace', 'mkdir -p ~/workspace-cache')
@@ -218,7 +218,7 @@ def configure_server(server, branches):
bn = os.path.basename(script)
client.scp(script, '/tmp/%s' % bn)
client.ssh('run custom script %s' % bn,
'chmod +x /tmp/%s && /tmp/%s' % (bn, bn))
'chmod +x /tmp/%s && sudo /tmp/%s' % (bn, bn))
client.ssh('sync', 'sync && sleep 5')