1
0
Fork 0

Put etcd into tmpfs for tests

fsync-feedback
Vitaliy Filippov 2023-09-03 02:12:50 +03:00
parent b7d398be5b
commit 51081c9b45
2 changed files with 5 additions and 2 deletions

View File

@ -27,6 +27,7 @@ ETCD_COUNT=${ETCD_COUNT:-1}
if [ "$KEEP_DATA" = "" ]; then
rm -rf ./testdata
rm -rf /run/user/$(id -u)/testdata_etcd*
mkdir -p ./testdata
fi
@ -41,7 +42,9 @@ ETCDCTL="${ETCD}ctl --endpoints=$ETCD_URL --dial-timeout=5s --command-timeout=10
start_etcd()
{
local i=$1
ionice -c2 -n0 $ETCD -name etcd$i --data-dir ./testdata/etcd$i \
local t=/run/user/$(id -u)
findmnt $t >/dev/null || (sudo mkdir -p $t && sudo mount -t tmpfs tmpfs $t)
ionice -c2 -n0 $ETCD -name etcd$i --data-dir /run/user/$(id -u)/testdata_etcd$i \
--advertise-client-urls http://$ETCD_IP:$((ETCD_PORT+2*i-2)) --listen-client-urls http://$ETCD_IP:$((ETCD_PORT+2*i-2)) \
--initial-advertise-peer-urls http://$ETCD_IP:$((ETCD_PORT+2*i-1)) --listen-peer-urls http://$ETCD_IP:$((ETCD_PORT+2*i-1)) \
--initial-cluster-token vitastor-tests-etcd --initial-cluster-state new \

View File

@ -10,7 +10,7 @@ check_qemu
LD_PRELOAD="build/src/libfio_vitastor.so" \
fio -thread -name=test -ioengine=build/src/libfio_vitastor.so -bs=68k -direct=1 -numjobs=16 -iodepth=4 \
-rw=randwrite -etcd=$ETCD_URL -pool=1 -inode=1 -size=128M -runtime=10
-rw=randwrite -etcd=$ETCD_URL -pool=1 -inode=1 -size=128M -runtime=10 -osd_trace=1
# A lot of parallel syncs was crashing the primary OSD at some point