Commit Graph

24 Commits

Author SHA1 Message Date
Jason Dillaman
ecec3217b6 Merge pull request #17134 from PCzhangPC/metaexin
rbd: export/import image-meta when we export/import an image

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
2017-10-16 21:00:08 -04:00
PCzhangPC
2f0b233a31 rbd:export/import image-meta when we export/import an image
when we do exporting/importing an image, we should export or import the image-meta of this image at the same time

Signed-off-by: PCzhangPC <pengcheng.zhang@easystack.cn>
2017-09-29 13:30:01 +08:00
Jason Dillaman
273c84578b qa/workunits/rbd: relax greps to support upgrade formatting change
Fixes: http://tracker.ceph.com/issues/21181
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2017-09-07 08:56:16 -04:00
xie xingguo
1ea448ac75 common/types: make numbers a bit nicer when displaying space usage
Was:
----------------------------------------------------------------------------
GLOBAL:
    SIZE       AVAIL      RAW USED     %RAW USED
    30911M     27050M        3861M         12.49
POOLS:
    NAME                  ID     USED        %USED     MAX AVAIL     OBJECTS
    rbd                   0      101216k      1.10         8913M        1178
    cephfs_data_a         1            0         0         8913M           0
    cephfs_metadata_a     2          892         0         8913M          21
----------------------------------------------------------------------------

Now:
----------------------------------------------------------------------------
GLOBAL:
    SIZE      AVAIL     RAW USED     %RAW USED
    30.2G     26.4G        3.77G         12.50
POOLS:
    NAME                  ID     USED      %USED     MAX AVAIL     OBJECTS
    rbd                   0      99.2M      1.10         8.70G        1180
    cephfs_data_a         1          0         0         8.70G           0
    cephfs_metadata_a     2        892         0         8.70G          21
----------------------------------------------------------------------------

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
2017-08-22 12:33:10 +08:00
Kefu Chai
fea6e3216a qa/workunits/rbd: do not test --export-format unless supported
in 55edd81, test for `--export-format` was added to exercise this
option. but this option is only supported on luminous, so we need to
check if it's avaialble before using it.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2017-06-22 12:19:01 +08:00
Jason Dillaman
a5d0d0ca08 qa/workunits: partial revert of commit 5b486d9
Testing for disk usage and diff extents for a sparsely written
imported RBD image cannot generically be handled across different
OSD object stores and RBD image features.

The only alternatives would include grepping the rbd CLI
debug log for specific invocations of aio_write or mocking
the rbd CLI for unit testing.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2017-04-07 21:06:37 -04:00
Ning Yao
5b486d9628 test: add test for rbd import,import-diff,copy with sparse-size option
Signed-off-by: Ning Yao <yaoning@unitedstack.com>
2017-04-04 03:18:52 +00:00
Dongsheng Yang
4ee764f9e1 qa/workunit/rbd: import_export.sh: add image priorities exporting and importing test cases.
Signed-off-by: Dongsheng Yang <dongsheng.yang@easystack.cn>
2017-02-19 20:42:03 +08:00
Dongsheng Yang
55edd81658 qa/workunit/rbd: add test case for --import/export-format in import_export.sh
Signed-off-by: Dongsheng Yang <dongsheng.yang@easystack.cn>
2017-02-19 20:42:03 +08:00
Venky Shankar
3a91d7bd2e qa / workunits: make rbd import/export work with image data pool
Signed-off-by: Venky Shankar <vshankar@redhat.com>
2016-11-20 21:21:50 +05:30
Mykola Golub
3048d3c7ce qa/workunits/rbd: respect RBD_CREATE_ARGS environment variable
Fixes: http://tracker.ceph.com/issues/16289
Signed-off-by: Mykola Golub <mgolub@mirantis.com>
2016-06-15 08:53:13 +03:00
Jason Dillaman
089673a59c qa/workunits/rbd: import_export should use clean temp space
Fixes: #14237
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2016-01-05 12:50:23 -05:00
Josh Durgin
e7cc6117ad qa: ignore duplicates in rados ls
These can happen with split or with state changes due to reordering
results within the hash range requested. It's easy enough to filter
them out at this stage.

Backport: giant, firefly
Signed-off-by: Josh Durgin <jdurgin@redhat.com>
2015-01-14 15:02:38 -08:00
Josh Durgin
e94d3c11ed qa: allow small allocation diffs for exported rbds
The local filesytem may behave slightly differently. This isn't
foolproof, but seems to be reliable enough on rhel7 rootfs, where
exact comparison was failing.

Fixes: #10002
Signed-off-by: Josh Durgin <jdurgin@redhat.com>
2014-11-11 18:16:04 -08:00
Sage Weil
5558afa03d qa/workunits/rbd/import_export.sh: be case insensitive
Stop tripping over this change (from dumpling).

Signed-off-by: Sage Weil <sage@redhat.com>
2014-10-15 12:26:00 -07:00
Sage Weil
a80e66f932 qa/workunit/rbd/import_export.sh: skip list-objects tests with tiering
Listing objects isn't reliable with cache pools; skip that part of the
test if we see that rbd has tiering enabled.

Signed-off-by: Sage Weil <sage@inktank.com>
2014-04-21 16:47:10 -07:00
Josh Durgin
10335883a9 qa: fix rbd cli tests checking size
b43bc1a0b0 changed the kilo prefix
from K to k in a few places.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
2013-10-03 15:16:59 -07:00
Sage Weil
cbff720ff5 rbd: prevent import of a dir
Fixes: #2865
Signed-off-by: Sage Weil <sage@inktank.com>
2013-05-21 12:16:24 -07:00
Dan Mick
6325a4800d import_export.sh: sparse import export
Add tests for:
   - sparse import makes expected sparse images
   - sparse export makes expected sparse files
   - sparse import from stdin also creates sparse images
   - import from partially-sparse file leads to partially-sparse image
   - import from stdin with zeros leads to sparse
   - export from zeros-image to file leads to sparse file

Signed-off-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
2012-12-21 17:03:38 -08:00
Dan Mick
c99d9c3ae7 rbd: fix import from stdin, add test
Make import work; do I/O in image native block size.
Note: creating sparse images is not currently attempted; could
scan for runs of zeros and write discontiguous chunks to image.

Fixes: #3503
Signed-off-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
2012-11-27 17:29:23 -08:00
Dan Mick
a738f44bc4 rbd: allow export to stdout, add tests
Fixes: #3502
Signed-off-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
2012-11-27 17:29:16 -08:00
Josh Durgin
9071764a6b qa: remove rbd image when done
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
2012-07-30 11:19:53 -07:00
Josh Durgin
3d7925b1ae workunits/rbd: allow creating images in different formats
This will allow adding more arguments for testing combinations
of features in the future.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
2012-06-09 17:24:50 -07:00
Sage Weil
6725e748e9 qa: simple rbd import/export test
Fixes: #1211
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-06-21 20:31:00 -07:00