mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2025-09-15 13:50:11 +03:00
CI: run ztest on compressed zpool
When running ztest under the CI a common failure mode is for the underlying filesystem to run out of available free space. Since the storage associated with a GitHub-hosted running is fixed, we instead create a pool and use a compressed ZFS dataset to store the ztest vdev files. This significantly increases the available capacity since the data written by ztest is highly compressible. A compression ratio of over 40:1 is conservatively achieved using the default lz4 compression. Autotrimming is enabled to ensure freed blocks are discarded from the backing cipool vdev file. Reviewed-by: Tino Reichardt <milky-zfs@mcmilk.de> Reviewed-by: George Melikov <mail@gmelikov.ru> Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Closes #17501
This commit is contained in:
parent
6c1130a730
commit
f7698f47e8
24
.github/workflows/zloop.yml
vendored
24
.github/workflows/zloop.yml
vendored
@ -12,7 +12,8 @@ jobs:
|
|||||||
zloop:
|
zloop:
|
||||||
runs-on: ubuntu-24.04
|
runs-on: ubuntu-24.04
|
||||||
env:
|
env:
|
||||||
TEST_DIR: /var/tmp/zloop
|
WORK_DIR: /mnt/zloop
|
||||||
|
CORE_DIR: /mnt/zloop/cores
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
@ -40,38 +41,37 @@ jobs:
|
|||||||
sudo modprobe zfs
|
sudo modprobe zfs
|
||||||
- name: Tests
|
- name: Tests
|
||||||
run: |
|
run: |
|
||||||
sudo mkdir -p $TEST_DIR
|
sudo truncate -s 256G /mnt/vdev
|
||||||
# run for 10 minutes or at most 6 iterations for a maximum runner
|
sudo zpool create cipool -m $WORK_DIR -O compression=on -o autotrim=on /mnt/vdev
|
||||||
# time of 60 minutes.
|
sudo /usr/share/zfs/zloop.sh -t 600 -I 6 -l -m 1 -c $CORE_DIR -f $WORK_DIR -- -T 120 -P 60
|
||||||
sudo /usr/share/zfs/zloop.sh -t 600 -I 6 -l -m 1 -- -T 120 -P 60
|
|
||||||
- name: Prepare artifacts
|
- name: Prepare artifacts
|
||||||
if: failure()
|
if: failure()
|
||||||
run: |
|
run: |
|
||||||
sudo chmod +r -R $TEST_DIR/
|
sudo chmod +r -R $WORK_DIR/
|
||||||
- name: Ztest log
|
- name: Ztest log
|
||||||
if: failure()
|
if: failure()
|
||||||
run: |
|
run: |
|
||||||
grep -B10 -A1000 'ASSERT' $TEST_DIR/*/ztest.out || tail -n 1000 $TEST_DIR/*/ztest.out
|
grep -B10 -A1000 'ASSERT' $CORE_DIR/*/ztest.out || tail -n 1000 $CORE_DIR/*/ztest.out
|
||||||
- name: Gdb log
|
- name: Gdb log
|
||||||
if: failure()
|
if: failure()
|
||||||
run: |
|
run: |
|
||||||
sed -n '/Backtraces (full)/q;p' $TEST_DIR/*/ztest.gdb
|
sed -n '/Backtraces (full)/q;p' $CORE_DIR/*/ztest.gdb
|
||||||
- name: Zdb log
|
- name: Zdb log
|
||||||
if: failure()
|
if: failure()
|
||||||
run: |
|
run: |
|
||||||
cat $TEST_DIR/*/ztest.zdb
|
cat $CORE_DIR/*/ztest.zdb
|
||||||
- uses: actions/upload-artifact@v4
|
- uses: actions/upload-artifact@v4
|
||||||
if: failure()
|
if: failure()
|
||||||
with:
|
with:
|
||||||
name: Logs
|
name: Logs
|
||||||
path: |
|
path: |
|
||||||
/var/tmp/zloop/*/
|
/mnt/zloop/*/
|
||||||
!/var/tmp/zloop/*/vdev/
|
!/mnt/zloop/cores/*/vdev/
|
||||||
if-no-files-found: ignore
|
if-no-files-found: ignore
|
||||||
- uses: actions/upload-artifact@v4
|
- uses: actions/upload-artifact@v4
|
||||||
if: failure()
|
if: failure()
|
||||||
with:
|
with:
|
||||||
name: Pool files
|
name: Pool files
|
||||||
path: |
|
path: |
|
||||||
/var/tmp/zloop/*/vdev/
|
/mnt/zloop/cores/*/vdev/
|
||||||
if-no-files-found: ignore
|
if-no-files-found: ignore
|
||||||
|
Loading…
Reference in New Issue
Block a user