-
Notifications
You must be signed in to change notification settings - Fork 87
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CI: Replace opaque test harness for mtr-test
Replace the zenfs-test-harness releated lines with the concrete implementation of the mtr-test test case. Signed-off-by: Dennis Maisenbacher <[email protected]> Co-authored-by: Andreas Hindborg <[email protected]>
- Loading branch information
1 parent
b94e29c
commit 5de0863
Showing
15 changed files
with
373 additions
and
84 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
99 changes: 99 additions & 0 deletions
99
.github/workflows/containerfiles/Dockerfile.percona-server
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
FROM docker.io/ubuntu:22.04 AS builder | ||
|
||
RUN apt-get update \ | ||
&& \ | ||
DEBIAN_FRONTEND=noninteractive \ | ||
DEBCONF_NONINTERACTIVE_SEEN=true \ | ||
apt-get install --yes --quiet=2 \ | ||
build-essential \ | ||
git \ | ||
pkg-config \ | ||
cmake \ | ||
autoconf \ | ||
autoconf-archive \ | ||
automake \ | ||
libtool \ | ||
zlib1g-dev \ | ||
valgrind \ | ||
libssl-dev \ | ||
libncurses-dev \ | ||
libldap2-dev \ | ||
libreadline-dev \ | ||
libcurl4-openssl-dev \ | ||
libgflags-dev \ | ||
bison \ | ||
&& apt-get clean | ||
|
||
ENV WORK_PATH=/percona/work | ||
ENV INSTALL_PATH=/percona/dest | ||
RUN mkdir -p $WORK_PATH | ||
RUN mkdir -p $INSTALL_PATH | ||
|
||
WORKDIR $WORK_PATH | ||
|
||
ARG LIBZBD_GIT_CHECKOUT | ||
RUN git clone --quiet --single-branch --branch master -n --quiet http://github.com/westerndigitalcorporation/libzbd.git \ | ||
&& cd libzbd \ | ||
&& git checkout $LIBZBD_GIT_CHECKOUT | ||
RUN cd libzbd && sh autogen.sh && ./configure --prefix=${INSTALL_PATH} && make install | ||
|
||
COPY percona-server percona-server | ||
RUN PKG_CONFIG_PATH=$INSTALL_PATH/lib/pkgconfig \ | ||
cmake ./percona-server \ | ||
-DUSE_VALGRIND=ON \ | ||
-DCMAKE_C_FLAGS="-mno-avx512f" \ | ||
-DCMAKE_CXX_FLAGS="-mno-avx512f" \ | ||
-DWITH_AUTHENTICATION_KERBEROS=OFF \ | ||
-DWITH_AUTHENTICATION_LDAP=OFF \ | ||
-DWITH_KERBEROS=none \ | ||
-DWITH_ROCKSDB=ON \ | ||
-DROCKSDB_PLUGINS=zenfs \ | ||
-DWITH_ZENFS_UTILITY=ON \ | ||
-DDOWNLOAD_BOOST=1\ | ||
-DWITH_BOOST=$WORK_PATH/boost \ | ||
-DCMAKE_INSTALL_PREFIX=${INSTALL_PATH} \ | ||
&& make -j$(nproc) \ | ||
&& make install | ||
|
||
FROM docker.io/ubuntu:22.04 | ||
RUN apt-get update \ | ||
&& \ | ||
DEBIAN_FRONTEND=noninteractive \ | ||
DEBCONF_NONINTERACTIVE_SEEN=true \ | ||
apt-get install --yes --quiet=2 \ | ||
build-essential \ | ||
zlib1g-dev \ | ||
valgrind \ | ||
libssl3 \ | ||
libssl-dev \ | ||
libncurses6 \ | ||
libncursesw6 \ | ||
libldap2-dev \ | ||
libreadline8 \ | ||
libcurl4 \ | ||
libgflags2.2 \ | ||
libmysqlclient-dev \ | ||
perl \ | ||
python3-dev \ | ||
python3-pip \ | ||
python-is-python3 \ | ||
pkg-config \ | ||
&& apt-get clean | ||
|
||
ENV WORK_PATH=/percona/work | ||
ENV INSTALL_PATH=/percona/dest | ||
RUN mkdir -p $WORK_PATH | ||
RUN mkdir -p $INSTALL_PATH | ||
|
||
WORKDIR $WORK_PATH | ||
|
||
COPY --from=builder $INSTALL_PATH $INSTALL_PATH | ||
# Changeing access permissions of directories in $INSTALL_PATH is needed for the mysql-test-run.pl (see line 2415 and 3053) | ||
RUN find $INSTALL_PATH -type d -exec chmod 777 {} + | ||
RUN adduser --quiet --disabled-password mysql | ||
RUN apt-get update && apt-get install -y --quiet sudo | ||
|
||
ENV PATH="$INSTALL_PATH/bin:$PATH" | ||
ENV LD_LIBRARY_PATH="$INSTALL_PATH/lib" | ||
|
||
RUN export MYSQLCLIENT_CFLAGS=$(pkg-config mysqlclient --cflags); export MYSQLCLIENT_LDFLAGS=$(pkg-config mysqlclient --libs); pip install mysqlclient; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,62 +1,116 @@ | ||
#TODO: make sure to run on 1TB zns drives -> look at disk-select option | ||
on: | ||
workflow_dispatch: | ||
schedule: | ||
- cron: '0 22 * * fri' | ||
name: MTR Tests | ||
jobs: | ||
mtr-tests: | ||
runs-on: self-hosted | ||
runs-on: nvme-zns | ||
timeout-minutes: 1440 | ||
steps: | ||
- name: Clean | ||
run: rm -rf ${GITHUB_WORKSPACE}/* | ||
- name: Checkout build scripts | ||
run: git clone ~/harness.git | ||
- name: Checkout percona-server | ||
uses: actions/checkout@v2 | ||
with: | ||
repository: percona/percona-server | ||
ref: release-8.0.30-22 | ||
path: harness/percona-context/percona-server | ||
submodules: true | ||
- name: Remove default zenfs | ||
run: rm -r harness/percona-context/percona-server/storage/rocksdb/rocksdb_plugins/zenfs | ||
- name: Checkout recent zenfs | ||
uses: actions/checkout@v2 | ||
|
||
- name: Prepare zoned block devices | ||
run: | | ||
for i in $(seq 0 3) | ||
do | ||
DEV="ZBD$i" | ||
if [ ! -b "/dev/${!DEV}" ] | ||
then | ||
echo "/dev/${!DEV} is not available for zenfs-mtr!" | ||
exit 1 | ||
fi | ||
echo deadline > /sys/block/${!DEV}/queue/scheduler | ||
done | ||
- name: Checkout zenfs | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
path: harness/percona-context/percona-server/storage/rocksdb/rocksdb_plugins/zenfs | ||
path: zenfs | ||
|
||
- name: Create build directory | ||
run: | | ||
mkdir -p percona-build-dir | ||
- name: Create result directory | ||
run: | | ||
mkdir -p percona-results | ||
- name: Build docker image | ||
run: | | ||
podman build --cgroup-manager cgroupfs \ | ||
-t percona-debian \ | ||
-f zenfs/.github/workflows/containerfiles/Dockerfile.percona-debian-build \ | ||
--build-arg PERCONA_SERVER_BASE=Percona-Server-8.0.34-26 \ | ||
--build-arg ZENFS_BRANCH=${GITHUB_SHA} \ | ||
--build-arg ZENFS_REPO=https://github.com/${GITHUB_REPOSITORY}.git \ | ||
. | ||
- name: Run MTR RocksDB test | ||
id: mtrTest1 | ||
run: cd harness && st --silent -o logs/makeMtrRocksdb -- disk-select --disk 1TB -- make NO_VAGRANT=1 RUN_ARGS="mtrRocksdbTest" results/zenfs-mtr.xml | ||
run: | | ||
podman run --rm -i --device /dev/$ZBD0 \ | ||
--volume ${GITHUB_WORKSPACE}/zenfs/.github/workflows/mtr:/scripts \ | ||
--workdir /scripts \ | ||
--env DEVICE0="$ZBD0" \ | ||
percona-debian \ | ||
bash wrapper.sh bash mtr-rocksdb-test.sh | ||
continue-on-error: true | ||
- name: Collect MTR RocksDB results | ||
run: cd harness && make NO_VAGRANT=1 upload | ||
if: always() | ||
|
||
- name: Run MTR RocksDB replication test | ||
id: mtrTest2 | ||
run: cd harness && st --silent -o logs/makeMtrRocksdbReplication -- disk-select --disk 1TB --disk 1TB -- make NO_VAGRANT=1 RUN_ARGS="mtrRocksdbReplicationTest" results/zenfs-mtr.xml | ||
run: | | ||
podman run --rm -i --device /dev/$ZBD0 \ | ||
--device /dev/$ZBD1 \ | ||
--volume ${GITHUB_WORKSPACE}/zenfs/.github/workflows/mtr:/scripts \ | ||
--workdir /scripts \ | ||
--env DEVICE0="$ZBD0" \ | ||
--env DEVICE1="$ZBD1" \ | ||
percona-debian \ | ||
bash wrapper.sh bash mtr-rocksdb-replication-test.sh | ||
continue-on-error: true | ||
- name: Collect MTR RocksDB replication results | ||
run: cd harness && make NO_VAGRANT=1 upload | ||
if: always() | ||
|
||
- name: Run MTR RocksDB parallel test | ||
id: mtrTest3 | ||
run: cd harness && st --silent -o logs/makeMtrRocksdbParallel -- disk-select --disk 1TB --disk 1TB --disk 1TB --disk 1TB -- make NO_VAGRANT=1 RUN_ARGS="mtrRocksdbParallelTest" results/zenfs-mtr.xml | ||
run: | | ||
podman run --rm -i --device /dev/$ZBD0 \ | ||
--device /dev/$ZBD1 \ | ||
--device /dev/$ZBD2 \ | ||
--device /dev/$ZBD3 \ | ||
--volume ${GITHUB_WORKSPACE}/zenfs/.github/workflows/mtr:/scripts \ | ||
--workdir /scripts \ | ||
--env DEVICE0="$ZBD0" \ | ||
--env DEVICE1="$ZBD1" \ | ||
--env DEVICE2="$ZBD2" \ | ||
--env DEVICE3="$ZBD3" \ | ||
percona-debian \ | ||
bash wrapper.sh bash mtr-rocksdb-parallel-test.sh | ||
continue-on-error: true | ||
- name: Collect MTR RocksDB parallel results | ||
run: cd harness && make NO_VAGRANT=1 upload | ||
if: always() | ||
|
||
- name: Run MTR RocksDB parallel replication test | ||
id: mtrTest4 | ||
run: cd harness && st --silent -o logs/makeMtrRocksdbParallelReplication -- disk-select --disk 1TB --disk 1TB --disk 1TB --disk 1TB -- make NO_VAGRANT=1 RUN_ARGS="mtrRocksdbParallelReplicationTest" results/zenfs-mtr.xml | ||
run: | | ||
podman run --rm -i --device /dev/$ZBD0 \ | ||
--device /dev/$ZBD1 \ | ||
--device /dev/$ZBD2 \ | ||
--device /dev/$ZBD3 \ | ||
--volume ${GITHUB_WORKSPACE}/zenfs/.github/workflows/mtr:/scripts \ | ||
--workdir /scripts \ | ||
--env DEVICE0="$ZBD0" \ | ||
--env DEVICE1="$ZBD1" \ | ||
--env DEVICE2="$ZBD2" \ | ||
--env DEVICE3="$ZBD3" \ | ||
percona-debian \ | ||
bash wrapper.sh bash mtr-rocksdb-parallel-replication-test.sh | ||
continue-on-error: true | ||
- name: Collect MTR RocksDB parallel replication results | ||
run: cd harness && make NO_VAGRANT=1 upload | ||
if: always() | ||
|
||
- name: Remove images | ||
run: podman image prune --force | ||
if: always() | ||
|
||
- name: Failure check | ||
if: steps.mtrTest1.outcome != 'success' || steps.mtrTest2.outcome != 'success' || steps.mtrTest3.outcome != 'success' || steps.mtrTest4.outcome != 'success' | ||
if: steps.mtrTest1.outcome != 'success' || steps.mtrTest2.outcome != 'success' || steps.mtrTest3.outcome != 'success' || steps.mtrTest4.outcome != 'success' | ||
run: exit 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
rocksdb.check_ignore_unknown_options : WL#0000 Need adapting | ||
rocksdb.drop_table2 : WL#0000 Need adapting | ||
rocksdb.rocksdb_fault_injection : WL#0000 Need adapting | ||
rocksdb.track_and_verify_wals_in_manifest : WL#0000 Need adapting | ||
rocksdb.type_char_index_ver_bump_verify : WL#0000 Need adapting | ||
rocksdb.checkpoint : WL#0000 Need fixing the server | ||
rocksdb.bloomfilter3 : WL#0000 Sporadic failures | ||
rocksdb.bloomfilter_skip : WL#0000 Sporadic failures | ||
rocksdb.rocksdb_read_free_rpl : WL#0000 Sporadic failures | ||
rocksdb.optimize_table : WL#0000 Need adapting | ||
rocksdb.issue896 : WL#0000 Sporadic failures | ||
rocksdb.non_blocking_manual_compaction : WL#0000 Sporadic failures | ||
rocksdb.add_index_inplace: WL#0000 Sporadic failures | ||
rocksdb.partial_index_stress: WL#0000 TODO FIND OUT WHY THIS FAILS | ||
rocksdb.show_table_status: WL#0000 TODO FIND OUT WHY THIS FAILS | ||
rocksdb.rocksdb_icp: WL#0000 TODO FIND OUT WHY THIS FAILS | ||
rocksdb.rocksdb_icp_rev: WL#0000 TODO FIND OUT WHY THIS FAILS |
Oops, something went wrong.