diff options
Diffstat (limited to 'qa/workunits/fs')
-rwxr-xr-x | qa/workunits/fs/full/subvolume_clone.sh | 9 | ||||
-rwxr-xr-x | qa/workunits/fs/full/subvolume_rm.sh | 6 | ||||
-rwxr-xr-x | qa/workunits/fs/full/subvolume_snapshot_rm.sh | 8 | ||||
-rwxr-xr-x | qa/workunits/fs/quota/quota.sh | 18 |
4 files changed, 26 insertions, 15 deletions
diff --git a/qa/workunits/fs/full/subvolume_clone.sh b/qa/workunits/fs/full/subvolume_clone.sh index a11131215..d61e07111 100755 --- a/qa/workunits/fs/full/subvolume_clone.sh +++ b/qa/workunits/fs/full/subvolume_clone.sh @@ -7,8 +7,8 @@ set -ex # Hence the subsequent subvolume commands on the clone fails with # 'MetadataMgrException: -2 (section 'GLOBAL' does not exist)' traceback. -# The osd is of the size 1GB. The full-ratios are set so that osd is treated full -# at around 600MB. The subvolume is created and 100MB is written. +# The osd is of the size 2GiB. The full-ratios are set so that osd is treated full +# at around 1.2GB. The subvolume is created and 200MB is written. # The subvolume is snapshotted and cloned ten times. Since the clone delay is set to 15 seconds, # all the clones reach pending state for sure. Among ten clones, only few succeed and rest fails # with ENOSPACE. @@ -47,7 +47,7 @@ echo "After ratios are set" df -h ceph osd df -for i in {1..100};do sudo dd if=/dev/urandom of=$CEPH_MNT$subvol_path_0/1MB_file-$i status=progress bs=1M count=1 conv=fdatasync;done +for i in {1..100};do sudo dd if=/dev/urandom of=$CEPH_MNT$subvol_path_0/2MB_file-$i status=progress bs=1M count=2 conv=fdatasync;done # For debugging echo "After subvolumes are written" @@ -60,6 +60,9 @@ ceph fs subvolume snapshot create cephfs sub_0 snap_0 # Set clone snapshot delay ceph config set mgr mgr/volumes/snapshot_clone_delay 15 +# Disable the snapshot_clone_no_wait config option +ceph config set mgr mgr/volumes/snapshot_clone_no_wait false + # Schedule few clones, some would fail with no space for i in $(eval echo {1..$NUM_CLONES});do ceph fs subvolume snapshot clone cephfs sub_0 snap_0 clone_$i;done diff --git a/qa/workunits/fs/full/subvolume_rm.sh b/qa/workunits/fs/full/subvolume_rm.sh index a464e30f5..2a3bf956d 100755 --- a/qa/workunits/fs/full/subvolume_rm.sh +++ b/qa/workunits/fs/full/subvolume_rm.sh @@ -2,8 +2,8 @@ set -ex # This testcase tests the scenario of the 'ceph fs subvolume rm' mgr command -# when the osd is full. The command used to hang. The osd is of the size 1GB. -# The subvolume is created and 500MB file is written. The full-ratios are +# when the osd is full. The command used to hang. The osd is of the size 2GiB. +# The subvolume is created and 1GB file is written. The full-ratios are # set below 500MB such that the osd is treated as full. Now the subvolume is # is removed. This should be successful with the introduction of FULL # capabilities which the mgr holds. @@ -21,7 +21,7 @@ echo "Before write" df -h ceph osd df -sudo dd if=/dev/urandom of=$CEPH_MNT$subvol_path/500MB_file-1 status=progress bs=1M count=500 +sudo dd if=/dev/urandom of=$CEPH_MNT$subvol_path/1GB_file-1 status=progress bs=1M count=1000 ceph osd set-full-ratio 0.2 ceph osd set-nearfull-ratio 0.16 diff --git a/qa/workunits/fs/full/subvolume_snapshot_rm.sh b/qa/workunits/fs/full/subvolume_snapshot_rm.sh index f6d0add9f..8df89d3c7 100755 --- a/qa/workunits/fs/full/subvolume_snapshot_rm.sh +++ b/qa/workunits/fs/full/subvolume_snapshot_rm.sh @@ -7,8 +7,8 @@ set -ex # snapshot rm of the same snapshot fails with 'MetadataMgrException: -2 (section 'GLOBAL' does not exist)' # traceback. -# The osd is of the size 1GB. The subvolume is created and 800MB file is written. -# Then full-ratios are set below 500MB such that the osd is treated as full. +# The osd is of the size 2GiB. The subvolume is created and 1.6GB file is written. +# Then full-ratios are set below 1GiB such that the osd is treated as full. # The subvolume snapshot is taken which succeeds as no extra space is required # for snapshot. Now, the removal of the snapshot fails with ENOSPACE as it # fails to remove the snapshot metadata set. The snapshot removal fails @@ -31,8 +31,8 @@ echo "Before write" df $CEPH_MNT ceph osd df -# Write 800MB file and set full ratio to around 200MB -ignore_failure sudo dd if=/dev/urandom of=$CEPH_MNT$subvol_path/800MB_file-1 status=progress bs=1M count=800 conv=fdatasync +# Write 1.6GB file and set full ratio to around 400MB +ignore_failure sudo dd if=/dev/urandom of=$CEPH_MNT$subvol_path/1.6GB_file-1 status=progress bs=1M count=1600 conv=fdatasync ceph osd set-full-ratio 0.2 ceph osd set-nearfull-ratio 0.16 diff --git a/qa/workunits/fs/quota/quota.sh b/qa/workunits/fs/quota/quota.sh index 1315be6d8..a2f5c459d 100755 --- a/qa/workunits/fs/quota/quota.sh +++ b/qa/workunits/fs/quota/quota.sh @@ -29,7 +29,7 @@ mkdir quota-test cd quota-test # bytes -setfattr . -n ceph.quota.max_bytes -v 100000000 # 100m +setfattr . -n ceph.quota.max_bytes -v 100M expect_false write_file big 1000 # 1g expect_false write_file second 10 setfattr . -n ceph.quota.max_bytes -v 0 @@ -57,7 +57,7 @@ rm -rf * # mix mkdir bytes bytes/files -setfattr bytes -n ceph.quota.max_bytes -v 10000000 #10m +setfattr bytes -n ceph.quota.max_bytes -v 10M setfattr bytes/files -n ceph.quota.max_files -v 5 dd if=/dev/zero of=bytes/files/1 bs=1M count=4 dd if=/dev/zero of=bytes/files/2 bs=1M count=4 @@ -78,7 +78,7 @@ rm -rf * #mv mkdir files limit truncate files/file -s 10G -setfattr limit -n ceph.quota.max_bytes -v 1000000 #1m +setfattr limit -n ceph.quota.max_bytes -v 1M expect_false mv files limit/ @@ -88,8 +88,8 @@ rm -rf * #limit by ancestor mkdir -p ancestor/p1/p2/parent/p3 -setfattr ancestor -n ceph.quota.max_bytes -v 1000000 -setfattr ancestor/p1/p2/parent -n ceph.quota.max_bytes -v 1000000000 #1g +setfattr ancestor -n ceph.quota.max_bytes -v 1M +setfattr ancestor/p1/p2/parent -n ceph.quota.max_bytes -v 1G expect_false write_file ancestor/p1/p2/parent/p3/file1 900 #900m stat --printf="%n %s\n" ancestor/p1/p2/parent/p3/file1 @@ -104,6 +104,14 @@ expect_false setfattr -n ceph.quota.max_bytes -v -1 . expect_false setfattr -n ceph.quota.max_bytes -v -9223372036854775808 . expect_false setfattr -n ceph.quota.max_bytes -v -9223372036854775809 . +setfattr -n ceph.quota.max_bytes -v 0 . +setfattr -n ceph.quota.max_bytes -v 1Ti . +setfattr -n ceph.quota.max_bytes -v 8388607Ti . +expect_false setfattr -n ceph.quota.max_bytes -v 8388608Ti . +expect_false setfattr -n ceph.quota.max_bytes -v -1Ti . +expect_false setfattr -n ceph.quota.max_bytes -v -8388609Ti . +expect_false setfattr -n ceph.quota.max_bytes -v -8388610Ti . + setfattr -n ceph.quota.max_files -v 0 . setfattr -n ceph.quota.max_files -v 1 . setfattr -n ceph.quota.max_files -v 9223372036854775807 . |