Run test zookeeper on top of tmpfs

We have been running into what appear to be zookeeper performance issues
causing tests to fail. Run the zookeeper on a tmpfs to reduce the impact
of iops to disk.

Other alternatives include using something like eatmydata to make writes
and syncs fast but unsafe.

Change-Id: Iea5e44af6844281c7f2078da57da9f13691e2642
This commit is contained in:
Clark Boylan 2018-10-23 14:48:21 -07:00
parent a8181c09a3
commit 674d6d88b4
1 changed files with 13 additions and 0 deletions

13
tools/test-setup.sh Executable file
View File

@ -0,0 +1,13 @@
#!/bin/bash -xe
# This script will be run by OpenStack CI before unit tests are run,
# it sets up the test system as needed.
# Developers should setup their test systems in a similar way.
# This setup needs to be run as a user that can run sudo.
# Config Zookeeper to run on tmpfs
sudo service zookeeper stop
DATADIR=$(sed -n -e 's/^dataDir=//p' /etc/zookeeper/conf/zoo.cfg)
sudo mount -t tmpfs -o nodev,nosuid,size=500M none $DATADIR
sudo service zookeeper start