mirror of
https://github.com/ceph/ceph
synced 2025-01-02 17:12:31 +00:00
Merge pull request #28346 from smithfarm/wip-39447-alt
qa/rbd: add cram-based snap diff test Reviewed-by: Jason Dillaman <dillaman@redhat.com> Reviewed-by: Mykola Golub <mgolub@suse.com>
This commit is contained in:
commit
017bc7db97
10
qa/suites/rbd/singleton/all/snap-diff.yaml
Normal file
10
qa/suites/rbd/singleton/all/snap-diff.yaml
Normal file
@ -0,0 +1,10 @@
|
||||
roles:
|
||||
- [mon.a, mgr.x, osd.0, osd.1, client.0]
|
||||
tasks:
|
||||
- install:
|
||||
- ceph:
|
||||
fs: xfs
|
||||
- cram:
|
||||
clients:
|
||||
client.0:
|
||||
- src/test/cli-integration/rbd/snap-diff.t
|
48
src/test/cli-integration/rbd/snap-diff.t
Normal file
48
src/test/cli-integration/rbd/snap-diff.t
Normal file
@ -0,0 +1,48 @@
|
||||
$ ceph osd pool create xrbddiff1 8
|
||||
pool 'xrbddiff1' created
|
||||
$ rbd pool init xrbddiff1
|
||||
$ rbd create --thick-provision --size 1M xrbddiff1/xtestdiff1 --no-progress
|
||||
$ rbd diff xrbddiff1/xtestdiff1 --format json
|
||||
[{"offset":0,"length":1048576,"exists":"true"}]
|
||||
$ rbd rm xrbddiff1/xtestdiff1 --no-progress
|
||||
$ rbd create --size 1M xrbddiff1/xtestdiff1
|
||||
$ rbd diff xrbddiff1/xtestdiff1 --format json
|
||||
[]
|
||||
$ rbd snap create xrbddiff1/xtestdiff1 --snap=allzeroes
|
||||
$ rbd diff xrbddiff1/xtestdiff1 --format json
|
||||
[]
|
||||
$ rbd diff --from-snap=allzeroes xrbddiff1/xtestdiff1 --format json
|
||||
[]
|
||||
$ rbd bench --io-type write --io-size 1M --io-total 1M xrbddiff1/xtestdiff1 > /dev/null 2>&1
|
||||
$ rbd diff xrbddiff1/xtestdiff1 --format json
|
||||
[{"offset":0,"length":1048576,"exists":"true"}]
|
||||
$ rbd diff --from-snap=allzeroes xrbddiff1/xtestdiff1 --format json
|
||||
[{"offset":0,"length":1048576,"exists":"true"}]
|
||||
$ rbd snap create xrbddiff1/xtestdiff1 --snap=snap1
|
||||
$ rbd snap list xrbddiff1/xtestdiff1 --format json | python -mjson.tool | sed 's/,$/, /'
|
||||
[
|
||||
{
|
||||
"id": *, (glob)
|
||||
"name": "allzeroes",
|
||||
"protected": "false",
|
||||
"size": 1048576,
|
||||
"timestamp": * (glob)
|
||||
},
|
||||
{
|
||||
"id": *, (glob)
|
||||
"name": "snap1",
|
||||
"protected": "false",
|
||||
"size": 1048576,
|
||||
"timestamp": * (glob)
|
||||
}
|
||||
]
|
||||
$ rbd diff --from-snap=snap1 xrbddiff1/xtestdiff1 --format json
|
||||
[]
|
||||
$ rbd snap rollback xrbddiff1/xtestdiff1@snap1 --no-progress
|
||||
$ rbd diff --from-snap=snap1 xrbddiff1/xtestdiff1 --format json
|
||||
[]
|
||||
$ rbd snap rollback xrbddiff1/xtestdiff1@allzeroes --no-progress
|
||||
$ rbd diff --from-snap=allzeroes xrbddiff1/xtestdiff1 --format json
|
||||
[{"offset":0,"length":1048576,"exists":"false"}]
|
||||
$ ceph osd pool rm xrbddiff1 xrbddiff1 --yes-i-really-really-mean-it
|
||||
pool 'xrbddiff1' removed
|
Loading…
Reference in New Issue
Block a user