diff --git a/devstack-vm-gate-wrap.sh b/devstack-vm-gate-wrap.sh index a56200f7..5ef08f12 100755 --- a/devstack-vm-gate-wrap.sh +++ b/devstack-vm-gate-wrap.sh @@ -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} @@ -148,6 +151,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 } diff --git a/devstack-vm-gate.sh b/devstack-vm-gate.sh index b03ab7a8..f7732ba9 100755 --- a/devstack-vm-gate.sh +++ b/devstack-vm-gate.sh @@ -59,9 +59,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 <>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 diff --git a/devstack-vm-update-image.py b/devstack-vm-update-image.py index ad4134e4..fde14c1e 100755 --- a/devstack-vm-update-image.py +++ b/devstack-vm-update-image.py @@ -208,7 +208,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') @@ -223,7 +223,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')