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>
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>
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>
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>
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>
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>
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>
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>