diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 18:45:59 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 18:45:59 +0000 |
commit | 19fcec84d8d7d21e796c7624e521b60d28ee21ed (patch) | |
tree | 42d26aa27d1e3f7c0b8bd3fd14e7d7082f5008dc /src/test/cli-integration/rbd/defaults.t | |
parent | Initial commit. (diff) | |
download | ceph-6d07fdb6bb33b1af39833b850bb6cf8af79fe293.tar.xz ceph-6d07fdb6bb33b1af39833b850bb6cf8af79fe293.zip |
Adding upstream version 16.2.11+ds.upstream/16.2.11+dsupstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/test/cli-integration/rbd/defaults.t')
-rw-r--r-- | src/test/cli-integration/rbd/defaults.t | 310 |
1 files changed, 310 insertions, 0 deletions
diff --git a/src/test/cli-integration/rbd/defaults.t b/src/test/cli-integration/rbd/defaults.t new file mode 100644 index 000000000..fe69997ce --- /dev/null +++ b/src/test/cli-integration/rbd/defaults.t @@ -0,0 +1,310 @@ +Plain create with various options specified via usual cli arguments +=================================================================== + $ rbd create -s 1 test + $ rbd info test --format json | python3 -mjson.tool | sed 's/,$/, /' + { + "block_name_prefix": "rb.0.*", (glob) + "format": 1, + "name": "test", + "object_size": 4194304, + "objects": 1, + "order": 22, + "size": 1048576 + } + $ rbd rm test --no-progress + $ rbd create -s 1 --object-size 1M test + $ rbd info test --format json | python3 -mjson.tool | sed 's/,$/, /' + { + "block_name_prefix": "rb.0.*", (glob) + "format": 1, + "name": "test", + "object_size": 1048576, + "objects": 1, + "order": 20, + "size": 1048576 + } + $ rbd rm test --no-progress + $ rbd create -s 1G --object-size 4K test + $ rbd info test --format json | python3 -mjson.tool | sed 's/,$/, /' + { + "block_name_prefix": "rb.0.*", (glob) + "format": 1, + "name": "test", + "object_size": 4096, + "objects": 262144, + "order": 12, + "size": 1073741824 + } + $ rbd rm test --no-progress + $ rbd create -s 1 test --image-format 2 + $ rbd info test --format json | python3 -mjson.tool | sed 's/,$/, /' + { + "block_name_prefix": "rbd_data.*", (glob) + "features": [ + "layering", + "striping", + "exclusive" + ], + "format": 2, + "name": "test", + "object_size": 4194304, + "objects": 1, + "order": 22, + "size": 1048576 + } + $ rbd rm test --no-progress + $ rbd create -s 1G test --image-format 2 + $ rbd info test --format json | python3 -mjson.tool | sed 's/,$/, /' + { + "block_name_prefix": "rbd_data.*", (glob) + "features": [ + "layering", + "striping", + "exclusive" + ], + "format": 2, + "name": "test", + "object_size": 4194304, + "objects": 256, + "order": 22, + "size": 1073741824 + } + $ rbd rm test --no-progress + $ rbd create -s 1 test --image-format 2 --object-size 1M + $ rbd info test --format json | python3 -mjson.tool | sed 's/,$/, /' + { + "block_name_prefix": "rbd_data.*", (glob) + "features": [ + "layering", + "striping", + "exclusive" + ], + "format": 2, + "name": "test", + "object_size": 1048576, + "objects": 1, + "order": 20, + "size": 1048576 + } + $ rbd rm test --no-progress + $ rbd create -s 1 test --image-format 2 --stripe-unit 1048576 --stripe-count 8 + $ rbd info test --format json | python3 -mjson.tool | sed 's/,$/, /' + { + "block_name_prefix": "rbd_data.*", (glob) + "features": [ + "layering", + "striping", + "exclusive" + ], + "format": 2, + "name": "test", + "object_size": 4194304, + "objects": 1, + "order": 22, + "size": 1048576, + "stripe_count": 8, + "stripe_unit": 1048576 + } + $ rbd rm test --no-progress + $ rbd create -s 1 test --image-format 2 --stripe-unit 1048576B --stripe-count 8 + $ rbd info test --format json | python3 -mjson.tool | sed 's/,$/, /' + { + "block_name_prefix": "rbd_data.*", (glob) + "features": [ + "layering", + "striping", + "exclusive" + ], + "format": 2, + "name": "test", + "object_size": 4194304, + "objects": 1, + "order": 22, + "size": 1048576, + "stripe_count": 8, + "stripe_unit": 1048576 + } + $ rbd rm test --no-progress + $ rbd create -s 1G test --image-format 2 --stripe-unit 4K --stripe-count 8 + $ rbd info test --format json | python3 -mjson.tool | sed 's/,$/, /' + { + "block_name_prefix": "rbd_data.*", (glob) + "features": [ + "layering", + "striping", + "exclusive" + ], + "format": 2, + "name": "test", + "object_size": 4194304, + "objects": 256, + "order": 22, + "size": 1073741824, + "stripe_count": 8, + "stripe_unit": 4096 + } + $ rbd rm test --no-progress + $ rbd create -s 1G test --image-format 2 --stripe-unit 1M --stripe-count 8 + $ rbd info test --format json | python3 -mjson.tool | sed 's/,$/, /' + { + "block_name_prefix": "rbd_data.*", (glob) + "features": [ + "layering", + "striping", + "exclusive" + ], + "format": 2, + "name": "test", + "object_size": 4194304, + "objects": 256, + "order": 22, + "size": 1073741824, + "stripe_count": 8, + "stripe_unit": 1048576 + } + $ rbd rm test --no-progress + +Format 2 Usual arguments with custom rbd_default_* params +========================================================= + $ rbd create -s 1 test --image-format 2 --stripe-unit 1048576 --stripe-count 8 --rbd-default-order 21 + $ rbd info test --format json | python3 -mjson.tool | sed 's/,$/, /' + { + "block_name_prefix": "rbd_data.*", (glob) + "features": [ + "layering", + "striping", + "exclusive" + ], + "format": 2, + "name": "test", + "object_size": 2097152, + "objects": 1, + "order": 21, + "size": 1048576, + "stripe_count": 8, + "stripe_unit": 1048576 + } + $ rbd rm test --no-progress + $ rbd create -s 1 test --image-format 2 --stripe-unit 1048576 --stripe-count 8 --object-size 8M --rbd-default-order 20 + $ rbd info test --format json | python3 -mjson.tool | sed 's/,$/, /' + { + "block_name_prefix": "rbd_data.*", (glob) + "features": [ + "layering", + "striping", + "exclusive" + ], + "format": 2, + "name": "test", + "object_size": 8388608, + "objects": 1, + "order": 23, + "size": 1048576, + "stripe_count": 8, + "stripe_unit": 1048576 + } + $ rbd rm test --no-progress + $ rbd create -s 1 test --image-format 2 --rbd-default-stripe-unit 1048576 --rbd-default-stripe-count 8 + $ rbd info test --format json | python3 -mjson.tool | sed 's/,$/, /' + { + "block_name_prefix": "rbd_data.*", (glob) + "features": [ + "layering", + "striping", + "exclusive" + ], + "format": 2, + "name": "test", + "object_size": 4194304, + "objects": 1, + "order": 22, + "size": 1048576, + "stripe_count": 8, + "stripe_unit": 1048576 + } + $ rbd rm test --no-progress + +Format 1 Usual arguments with custom rbd_default_* params +========================================================= + $ rbd create -s 1 test --rbd-default-order 20 + $ rbd info test --format json | python3 -mjson.tool | sed 's/,$/, /' + { + "block_name_prefix": "rb.0.*", (glob) + "format": 1, + "name": "test", + "object_size": 1048576, + "objects": 1, + "order": 20, + "size": 1048576 + } + $ rbd rm test --no-progress + $ rbd create -s 1 test --rbd-default-format 2 + $ rbd info test --format json | python3 -mjson.tool | sed 's/,$/, /' + { + "block_name_prefix": "rbd_data.*", (glob) + "features": [ + "layering", + "striping", + "exclusive" + ], + "format": 2, + "name": "test", + "object_size": 4194304, + "objects": 1, + "order": 22, + "size": 1048576 + } + $ rbd rm test --no-progress + $ rbd create -s 1 test --rbd-default-format 2 --rbd-default-order 20 + $ rbd info test --format json | python3 -mjson.tool | sed 's/,$/, /' + { + "block_name_prefix": "rbd_data.*", (glob) + "features": [ + "layering", + "striping", + "exclusive" + ], + "format": 2, + "name": "test", + "object_size": 1048576, + "objects": 1, + "order": 20, + "size": 1048576 + } + $ rbd rm test --no-progress + $ rbd create -s 1 test --rbd-default-format 2 --rbd-default-order 20 --rbd-default-features 1 + $ rbd info test --format json | python3 -mjson.tool | sed 's/,$/, /' + { + "block_name_prefix": "rbd_data.*", (glob) + "features": [ + "layering", + "striping", + "exclusive" + ], + "format": 2, + "name": "test", + "object_size": 1048576, + "objects": 1, + "order": 20, + "size": 1048576 + } + $ rbd rm test --no-progress + $ rbd create -s 1 test --rbd-default-format 2 --stripe-unit 1048576 --stripe-count 8 + $ rbd info test --format json | python3 -mjson.tool | sed 's/,$/, /' + { + "block_name_prefix": "rbd_data.*", (glob) + "features": [ + "layering", + "striping", + "exclusive" + ], + "format": 2, + "name": "test", + "object_size": 4194304, + "objects": 1, + "order": 22, + "size": 1048576, + "stripe_count": 8, + "stripe_unit": 1048576 + } + $ rbd rm test --no-progress |