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
Clark Boylan 4 years ago
parent a8181c09a3
commit 674d6d88b4

@ -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