forked from openzfs/zfs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Dose-701 Schedule zloop run with object store (openzfs#67)
Added a workflow to configure minio as s3 backend and run the zloop test with object storage. The test with object store is controlled by the environment variable `ZTS_OBJECT_STORE`. Zloop continues to run using block based devices if this variable remains unset.
- Loading branch information
1 parent
c683ce2
commit d161175
Showing
2 changed files
with
202 additions
and
56 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
name: zloop-object-store | ||
|
||
on: | ||
push: | ||
pull_request: | ||
|
||
jobs: | ||
zloop: | ||
runs-on: ubuntu-latest | ||
env: | ||
TEST_DIR: /var/tmp/zloop | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
ref: ${{ github.event.pull_request.head.sha }} | ||
- name: Install dependencies | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install --yes -qq build-essential autoconf libtool gdb \ | ||
git alien fakeroot \ | ||
zlib1g-dev uuid-dev libblkid-dev libselinux-dev \ | ||
xfslibs-dev libattr1-dev libacl1-dev libudev-dev libdevmapper-dev \ | ||
libssl-dev libffi-dev libaio-dev libelf-dev libmount-dev \ | ||
libpam0g-dev \ | ||
python-dev python-setuptools python-cffi python-packaging \ | ||
python3 python3-dev python3-setuptools python3-cffi python3-packaging | ||
- name: Autogen.sh | ||
run: | | ||
sh autogen.sh | ||
- name: Configure | ||
run: | | ||
./configure --enable-debug --enable-debuginfo | ||
- name: Make | ||
run: | | ||
make --no-print-directory -s pkg-utils pkg-kmod | ||
- name: Install | ||
run: | | ||
sudo dpkg -i *.deb | ||
# Update order of directories to search for modules, otherwise | ||
# Ubuntu will load kernel-shipped ones. | ||
sudo sed -i.bak 's/updates/extra updates/' /etc/depmod.d/ubuntu.conf | ||
sudo depmod | ||
sudo modprobe zfs | ||
- name: Setup minio | ||
run: | | ||
docker run -d -p 9000:9000 --name minio --network=host \ | ||
-e "MINIO_ACCESS_KEY=minioadmin" \ | ||
-e "MINIO_SECRET_KEY=minioadmin" \ | ||
-v /tmp/data:/data \ | ||
-v /tmp/config:/root/.minio \ | ||
minio/minio server /data | ||
export AWS_EC2_METADATA_DISABLED=true | ||
aws configure set aws_access_key_id minioadmin && aws configure set aws_secret_access_key minioadmin | ||
aws --endpoint-url http://127.0.0.1:9000/ s3 mb s3://testbucket | ||
sudo cp -r $HOME/.aws /root | ||
- name: Tests | ||
run: | | ||
sudo mkdir -p $TEST_DIR | ||
# run for 20 minutes to have a total runner time of 30 minutes | ||
sudo -E /usr/share/zfs/zloop.sh -t 1200 -l -m1 -- -T 120 -P 60 | ||
env: | ||
LD_LIBRARY_PATH: /lib/x86_64-linux-gnu | ||
ZTS_OBJECT_STORE: true | ||
ZTS_BUCKET_NAME: testbucket | ||
ZTS_OBJECT_ENDPOINT: http://127.0.0.1:9000 | ||
ZTS_REGION: us-west-2 | ||
AWS_ACCESS_KEY_ID: minioadmin | ||
AWS_SECRET_ACCESS_KEY: minioadmin | ||
- name: Prepare artifacts | ||
if: failure() | ||
run: | | ||
sudo chmod +r -R $TEST_DIR/ | ||
- uses: actions/upload-artifact@v2 | ||
if: failure() | ||
with: | ||
name: Logs | ||
path: | | ||
/var/tmp/zloop/*/ | ||
!/var/tmp/zloop/*/vdev/ | ||
if-no-files-found: ignore | ||
- uses: actions/upload-artifact@v2 | ||
if: failure() | ||
with: | ||
name: Pool files | ||
path: | | ||
/var/tmp/zloop/*/vdev/ | ||
if-no-files-found: ignore |
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