Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI: remove sleep on graceful upgrade #4785

Merged
merged 8 commits into from
Apr 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions .github/scripts/command/acl.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,14 @@ test_modify_acl_config()
./juicefs mount -d $META_URL /tmp/jfs
touch /tmp/jfs/test
setfacl -m u:root:rw /tmp/jfs/test && echo "setfacl should failed" && exit 1
./juicefs config $META_URL --enable-acl
./juicefs config $META_URL --enable-acl=true
./juicefs mount -d $META_URL /tmp/jfs
setfacl -m u:root:rw /tmp/jfs/test
./juicefs config $META_URL --enable-acl
umount_jfs /tmp/jfs $META_URL
./juicefs mount -d $META_URL /tmp/jfs
setfacl -m u:root:rw /tmp/jfs/test
./juicefs config $META_URL --enable-acl False
./juicefs config $META_URL --enable-acl=false && echo "should not disable acl" && exit 1 || true
./juicefs config $META_URL | grep EnableACL | grep "true" || (echo "EnableACL should be true" && exit 1)
}

Expand Down
4 changes: 2 additions & 2 deletions .github/scripts/command/cache.sh
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@ check_cache_distribute() {
size=${sizes["$dir"]}
weight=${weights["$dir"]}
avg_size=$((total_size * weight / total_weight))
min_size=$((avg_size * 7 / 10))
max_size=$((avg_size * 13 / 10))
min_size=$((avg_size * 5 / 10))
max_size=$((avg_size * 20 / 10))

if [[ $size -lt $min_size || $size -gt $max_size ]]; then
echo "$dir is not evenly distributed, size: $size, weight: $weight, ave_size: $avg_size, min_size: $min_size, max_size: $max_size"
Expand Down
13 changes: 0 additions & 13 deletions .github/scripts/command/graceful_upgrade.sh
Original file line number Diff line number Diff line change
Expand Up @@ -69,17 +69,14 @@ test_update_non_fuse_option(){
JFS_RSA_PASSPHRASE=12345678 ./juicefs format $META_URL myjfs --encrypt-rsa-key my-priv-key.pem
JFS_RSA_PASSPHRASE=12345678 ./juicefs mount -d $META_URL /tmp/jfs
echo abc | tee /tmp/jfs/test
sleep 1s
JFS_RSA_PASSPHRASE=12345678 ./juicefs mount -d $META_URL /tmp/jfs --read-only
echo abc | tee /tmp/jfs/test && (echo "should not write read-only file system" && exit 1) || true
sleep 1s
JFS_RSA_PASSPHRASE=12345678 ./juicefs mount -d $META_URL /tmp/jfs
echo abc | tee /tmp/jfs/test
ps -ef | grep juicefs | grep mount | grep -v grep || true
count=$(ps -ef | grep juicefs | grep mount | grep -v grep | wc -l)
[[ $count -ne 2 ]] && echo "mount process count should be 2, count=$count" && exit 1 || true
umount /tmp/jfs
sleep 1s
ps -ef | grep juicefs | grep mount | grep -v grep || true
count=$(ps -ef | grep juicefs | grep mount | grep -v grep | wc -l)
[[ $count -ne 0 ]] && echo "mount process count should be 0, count=$count" && exit 1 || true
Expand All @@ -90,14 +87,12 @@ test_update_on_failure(){
JFS_RSA_PASSPHRASE=12345678 ./juicefs format $META_URL myjfs --encrypt-rsa-key my-priv-key.pem
JFS_RSA_PASSPHRASE=12345678 ./juicefs mount -d $META_URL /tmp/jfs
echo abc | tee /tmp/jfs/test
sleep 1s
JFS_RSA_PASSPHRASE=abc123xx ./juicefs mount -d $META_URL /tmp/jfs || true
echo abc | tee /tmp/jfs/test
ps -ef | grep juicefs | grep mount | grep -v grep || true
count=$(ps -ef | grep juicefs | grep mount | grep -v grep | wc -l)
[[ $count -ne 2 ]] && echo "mount process count should be 2, count=$count" && exit 1 || true
umount /tmp/jfs
sleep 1s
ps -ef | grep juicefs | grep mount | grep -v grep || true
count=$(ps -ef | grep juicefs | grep mount | grep -v grep | wc -l)
[[ $count -ne 0 ]] && echo "mount process count should be 0, count=$count" && exit 1 || true
Expand All @@ -107,7 +102,6 @@ test_update_on_fio(){
prepare_test
./juicefs format $META_URL myjfs
./juicefs mount -d $META_URL /tmp/jfs --buffer-size 300
sleep 1s
fio -name=fio -filename=/tmp/jfs/testfile -direct=1 -iodepth 16 -ioengine=libaio \
-rw=randwrite -bs=4k -size=100M -numjobs=4 -runtime=30 -group_reporting >fio.log 2>&1 &
fio_pid=$!
Expand All @@ -117,7 +111,6 @@ test_update_on_fio(){
./juicefs mount -d $META_URL /tmp/jfs --buffer-size $((i+300))
wait_command_success "ps -ef | grep juicefs | grep mount | grep \"buffer-size $((i+300))\" | wc -l" 2
echo abc | tee /tmp/jfs/test
sleep 3s
done
kill -9 $fio_pid > /dev/null 2>&1 || true
# umount_jfs /tmp/jfs $META_URL
Expand All @@ -132,10 +125,8 @@ test_update_fuse_option(){
./juicefs mount -d $META_URL /tmp/jfs --enable-xattr
setfattr -n user.test -v "juicedata" /tmp/jfs
getfattr -n user.test /tmp/jfs | grep juicedata
sleep 1s
./juicefs mount -d $META_URL /tmp/jfs
getfattr -n user.test /tmp/jfs && exit 1 || true
sleep 1s
./juicefs mount -d $META_URL /tmp/jfs --enable-xattr
getfattr -n user.test /tmp/jfs | grep juicedata
count=$(ps -ef | grep juicefs | grep mount | grep -v grep | wc -l)
Expand All @@ -145,7 +136,6 @@ test_update_fuse_option(){
count=$(ps -ef | grep juicefs | grep mount | grep -v grep | wc -l)
[[ $count -ne 2 ]] && echo "mount process count should be 2, count=$count" && exit 1 || true
umount /tmp/jfs
sleep 1s
ps -ef | grep juicefs | grep mount | grep -v grep || true
count=$(ps -ef | grep juicefs | grep mount | grep -v grep | wc -l)
[[ $count -ne 0 ]] && echo "mount process count should be 0, count=$count" && exit 1 || true
Expand All @@ -164,12 +154,10 @@ test_update_from_old_version(){
grep "hello" /tmp/jfs/test
echo world | tee /tmp/jfs/test
./juicefs umount /tmp/jfs
sleep 1s
ps -ef | grep juicefs | grep mount | grep -v grep || true
count=$(ps -ef | grep juicefs | grep mount | grep -v grep | wc -l)
[[ $count -ne 1 ]] && echo "mount process count should be 1" && exit 1 || true
./juicefs umount /tmp/jfs
sleep 1s
ps -ef | grep juicefs | grep mount | grep -v grep || true
count=$(ps -ef | grep juicefs | grep mount | grep -v grep | wc -l)
[[ $count -ne 0 ]] && echo "mount process count should be 0" && exit 1 || true
Expand All @@ -191,7 +179,6 @@ test_update_on_fstab(){
mount /tmp/jfs
wait_command_success "ps -ef | grep juicefs | grep /tmp/jfs | grep -v grep | wc -l" 2
# cat /tmp/jfs/.config
sleep 3s
done
}

Expand Down
Loading