Skip to content

Commit e17ccb1

Browse files
YunhuiChenCopilot
andauthored
ci: clean up stale FUSE mounts between command tests (#7717)
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
1 parent 967371b commit e17ccb1

10 files changed

Lines changed: 28 additions & 8 deletions

File tree

‎.github/scripts/command/crash_consistency.sh‎

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,24 @@ source .github/scripts/start_meta_engine.sh
66
start_meta_engine $META
77
META_URL=$(get_meta_url $META)
88

9+
cleanup(){
10+
local status=$?
11+
local cleanup_status=0
12+
trap - EXIT
13+
set +e
14+
( umount_jfs /jfs "$META_URL" ) || cleanup_status=$?
15+
if is_mounted /jfs; then
16+
echo "<FATAL>: /jfs is still mounted after cleanup"
17+
cleanup_status=1
18+
fi
19+
if [[ $cleanup_status -ne 0 ]]; then
20+
echo "<FATAL>: failed to clean up /jfs (exit $cleanup_status)"
21+
[[ $status -eq 0 ]] && status=$cleanup_status
22+
fi
23+
exit "$status"
24+
}
25+
trap cleanup EXIT
26+
927
MANIFEST=/tmp/jfs_crash_manifest.txt
1028
CACHE_DIR=/var/jfsCache-crash
1129
FILE_COUNT=100000

‎.github/scripts/command/debug.sh‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ check_debug_file(){
3030
}
3131

3232
test_debug_juicefs(){
33+
prepare_test
3334
./juicefs format $META_URL myjfs
3435
./juicefs mount -d $META_URL /jfs
3536
dd if=/dev/urandom of=/jfs/bigfile bs=1M count=128
@@ -39,6 +40,7 @@ test_debug_juicefs(){
3940
}
4041

4142
test_debug_abnormal_juicefs(){
43+
prepare_test
4244
rm -rf debug | true
4345
./juicefs format $META_URL myjfs
4446
./juicefs mount -d $META_URL /jfs

‎.github/workflows/command.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ jobs:
6161
matrix:
6262
# meta: [ 'sqlite3', 'redis', 'tikv']
6363
meta: ${{ fromJson(needs.build-matrix.outputs.meta_matrix) }}
64-
runs-on: ubuntu-latest-4-cores
64+
runs-on: ubuntu-24.04-4-cores
6565
steps:
6666
- name: Remove unused software
6767
shell: bash

‎.github/workflows/compile.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ jobs:
5252
fail-fast: false
5353
matrix:
5454
meta: ${{ fromJson(needs.build-matrix.outputs.meta_matrix) }}
55-
runs-on: ubuntu-latest-4-cores
55+
runs-on: ubuntu-24.04-4-cores
5656

5757
steps:
5858
- name: Checkout

‎.github/workflows/dump_load.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ jobs:
5454
matrix:
5555
meta: ${{ fromJson(needs.build-matrix.outputs.meta_matrix) }}
5656

57-
runs-on: ubuntu-latest-4-cores
57+
runs-on: ubuntu-24.04-4-cores
5858

5959
steps:
6060
- name: Checkout

‎.github/workflows/dump_load_bench.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ jobs:
5252
matrix:
5353
meta: ${{ fromJson(needs.build-matrix.outputs.meta_matrix) }}
5454

55-
runs-on: ubuntu-latest-4-cores
55+
runs-on: ubuntu-24.04-4-cores
5656

5757
steps:
5858
- name: Checkout

‎.github/workflows/gateway.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ jobs:
6969
file_size: '100M'
7070
isolation_level: "repeatable read"
7171

72-
runs-on: ubuntu-latest-4-cores
72+
runs-on: ubuntu-24.04-4-cores
7373

7474
steps:
7575
- name: Checkout

‎.github/workflows/perf-test.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ jobs:
4747
matrix:
4848
meta: ['redis', 'redis-nocache', 'mysql', 'tikv']
4949
cases: ["mdtest_fio"]
50-
runs-on: ubuntu-latest-4-cores
50+
runs-on: ubuntu-24.04-4-cores
5151

5252
steps:
5353
- name: Clean up

‎.github/workflows/random-test.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ jobs:
5656
removeOp: "rm"
5757
zipf: "1.06"
5858

59-
runs-on: ubuntu-latest-4-cores
59+
runs-on: ubuntu-24.04-4-cores
6060
steps:
6161
- uses: actions/checkout@v3
6262

‎.github/workflows/sync.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ concurrency:
5050

5151
jobs:
5252
sync:
53-
runs-on: ubuntu-latest-4-cores
53+
runs-on: ubuntu-24.04-4-cores
5454
strategy:
5555
fail-fast: false
5656
matrix:

0 commit comments

Comments
 (0)