Commit Graph

591 Commits

Author SHA1 Message Date
Ilya Dryomov
bb92c4ff83
Merge pull request #41588 from idryomov/wip-rbd-trash-purge
librbd: don't stop at the first unremovable image when purging 

Reviewed-by: Mykola Golub <mgolub@suse.com>
2021-06-01 21:56:57 +02:00
Ilya Dryomov
16d9a68a3e librbd: don't stop at the first unremovable image when purging
As there is no inherent ordering, there may be multiple removable
images past the unremovable image.  On top of that, removing a clone
may make its parent removable so perform an additional pass if any
image gets removed.

Fixes: https://tracker.ceph.com/issues/51021
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
2021-05-31 11:44:47 +02:00
Prasanna Kumar Kalever
e2aa4128f1 qa/workunits/rbd: use rbd cli for device attach/detach commands
Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
2021-05-26 10:27:09 +05:30
Ilya Dryomov
338920fcf6
Merge pull request #41070 from sunnyku/wip-rbd-50522
rbd: fix default pool handling for nbd map/unmap

Reviewed-by: Mykola Golub <mgolub@suse.com>
Reviewed-by: Ilya Dryomov <idryomov@gmail.com>
2021-05-20 16:41:22 +02:00
Sunny Kumar
b19905272a qa/workunits/rbd-nbd: add new test for map/unmap
This patch includes twe new test cases:
 a. map/unmap test with only image name and
 b. map/unmap test after changing default pool which expects the image
 to come from new default pool.

Signed-off-by: Sunny Kumar <sunkumar@redhat.com>
2021-05-18 16:23:10 +01:00
Sunny Kumar
4f6370b884 qa/workunits/rbd: use rbd device wrapper where appropriate
Use `rbd device` wrapper call instead of making a direct call to rbd-nbd.

Signed-off-by: Sunny Kumar <sunkumar@redhat.com>
2021-05-14 12:38:25 +01:00
Ilya Dryomov
602db5e386 qa/workunits/rbd: disable qemu-iotest test 055 globally
It doesn't work on Focal and already disabled on CentOS 7 and 8.  More
importantly, it doesn't actually test rbd -- it always tests "file", no
matter which protocol is specified in IMGPROTO.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
2021-05-02 23:38:56 +02:00
Ilya Dryomov
2de2146c30 qa/workunits/rbd: use bionic version of qemu-iotests for focal
Currently Focal ends up with v2.2.0-rc3, which results in "WARNING:
Image format was not specified for ..." for all tests and all tests
fail.

Fixes: https://tracker.ceph.com/issues/50605
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
2021-05-02 23:38:43 +02:00
Jason Dillaman
bc0b9f52ad librbd: permit disabling QCOW migration format support
Downstream Red Hat products do not support the older QCOW format. This
will allow the support for the legacy QCOW format to be disabled for the
new RBD import-only migration support.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2021-02-23 07:19:43 -05:00
Mykola Golub
f737c2855a qa/workunits/rbd: make luks-encryption test work on vstart cluster
When running as non-root, it might not find the `rbd` binary.

Signed-off-by: Mykola Golub <mgolub@suse.com>
2021-02-15 15:03:00 +00:00
Jason Dillaman
f079116e87 qa/workunits/rbd: show snapshot deltas during stress test failure
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2021-02-08 10:13:35 -05:00
Jason Dillaman
094bfeaf8e qa/suites/rbd: add snapshot-based mirroring stress test
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2021-02-08 09:23:35 -05:00
Jason Dillaman
8643b046fb test/rbd-mirror: fix broken ceph_test_rbd_mirror_random_write
It appears that commit 6eb8f30a23 broke the test utility and
its failure was masked by the test case that expected a failure
due to a timeout force-killing the app.

Fixes: https://tracker.ceph.com/issues/49117
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2021-02-02 23:34:18 -05:00
Or Ozeri
2f1eb8eba0 test/librbd: fix luks encryption cli test on unsupported runs
This commit changes the luks encryption cli test to return success instead of failure when not supported.

Signed-off-by: Or Ozeri <oro@il.ibm.com>
2021-01-26 18:54:05 +02:00
Or Ozeri
4f438f0dc3 test/librbd: add luks encryption cli test
This commit adds a cli test for rbd encryption verifying LUKS compatbility with cryptsetup

Signed-off-by: Or Ozeri <oro@il.ibm.com>
2021-01-24 09:11:50 +02:00
Jason Dillaman
42f00487b9 qa/workunits/rbd: simplify QCOW migration distro check
If the qemu-img command fails when attempting to use the QCOW (v1) format,
assume that the distro does not have support for the format enabled.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2021-01-14 11:52:05 -05:00
Jason Dillaman
f3c44b083a librbd/migration: compute deltas between QCOW2 snapshots
Utilize the COPIED bit within the cluster offset to quickly determine
if the corresponding cluster block has been copied.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2021-01-14 09:35:35 -05:00
Jason Dillaman
1f4b5aeb0e librbd/migration: add support for reading from QCOW2 snapshots
Tweak the IO read path to now utilize the L1 table associated with
the specified snapshot id. This will cause the IO to properly read
from the specific snapshot.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2021-01-14 09:35:35 -05:00
Jason Dillaman
bd8db295ea librbd/migration: basic QCOW2 format handler
The initial implementation does not support backing files, compression,
snapshots, (deprecated) encryption, external data files, nor L2 subcluster
allocation. The former three features will be added in a future commit.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2021-01-14 09:35:35 -05:00
Jason Dillaman
83aa1a9e73 librbd/migration: basic QCOW v1 format handler
The initial implementation does not support backing files, compression, nor
(deprecated) encryption. The former two features will be added in a future commit.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2021-01-14 09:35:34 -05:00
Jason Dillaman
d22ca3d978 librbd/migration: require snapshot when importing from native source
Since we cannot mark the source image read-only when running in import-only
migration mode, we should require the user to provide a snapshot to ensure
that data cannot change while the migration is running.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2021-01-02 09:26:53 -05:00
Ilya Dryomov
fb03fa3766
Merge pull request #38638 from idryomov/wip-krbd-stable-writes-attr
qa: krbd_stable_pages_required.sh: move to stable_writes attribute

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
2020-12-18 10:30:34 +01:00
Ilya Dryomov
5adfc15b87 qa: krbd_stable_pages_required.sh: move to stable_writes attribute
bdi/stable_pages_required attribute was deprecated in 5.10 and now
always returns 0.  The replacement is queue/stable_writes.  (It is
also writeable, so we can simplify these test cases somewhat in the
future.)

Fixes: https://tracker.ceph.com/issues/48232
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
2020-12-17 13:41:34 +01:00
Jason Dillaman
80fe5a8735 qa/suites/rbd: new basic migration CLI test case
Pending a larger suite of tests for instant-restore image migration,
this test provides a basic sanity check for both the native and
raw image formats -- including basic snapshot tests.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2020-12-03 08:30:52 -05:00
Mykola Golub
9c9b14fab6 qa/workunits/rbd: improve regex for parsing ps output
On some platforms the pid may be indented with spaces.

Signed-off-by: Mykola Golub <mgolub@suse.com>
2020-11-10 17:16:00 +00:00
Mykola Golub
4cda97a822 rbd-nbd: when unmapping or detaching by device try to find process
For `detach` failing to find the process is fatal while unmap
will still try to send disconnect to the device.

Signed-off-by: Mykola Golub <mgolub@suse.com>
2020-11-10 17:15:59 +00:00
Mykola Golub
5e10672e4e
Merge pull request #37884 from dillaman/wip-48032
qa/workunits/rbd: fix permission issue when removing mirror peer

Reviewed-by: Mykola Golub <mgolub@suse.com>
2020-10-29 15:48:35 +02:00
Jason Dillaman
caaba8eabe qa/workunits/rbd: fix permission issue when removing mirror peer
Fixes: https://tracker.ceph.com/issues/48032
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2020-10-28 14:06:57 -04:00
Mykola Golub
3043d80168 rbd-nbd: make unmap/detach wait for rbd-nbd process to terminate
Signed-off-by: Mykola Golub <mgolub@suse.com>
2020-10-13 18:32:50 +01:00
Mykola Golub
7d75c1d6b8 rbd-nbd: introduce new attach and detach commands
The commands allow to restart a daemon without destroying the nbd
device.

Now, if the netlink is used, a dead connection timeout is set on
the nbd device setup, so the device is not immediately released
if the rbd-nbd process terminates without disconnect (unmap).

The attach command just sends terminate signal to the rbd-nbd
process. The detach command starts a new process and connects to
the existing device.

Signed-off-by: Mykola Golub <mgolub@suse.com>
2020-10-07 13:26:07 +01:00
Mykola Golub
b360186eb6 rbd-nbd: don't ignore namespace when unmapping by image spec
Fixes: https://tracker.ceph.com/issues/47665
Signed-off-by: Mykola Golub <mgolub@suse.com>
2020-09-27 17:59:49 +01:00
Ilya Dryomov
6827bbbcfb
Merge pull request #36927 from idryomov/wip-krbd-noudev
krbd: optionally skip waiting for udev events

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
Reviewed-by: Sébastien Han <seb@redhat.com>
2020-09-21 19:39:30 +02:00
Ilya Dryomov
d2884adb15 qa: add test for mapping and unmapping from a network namespace
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
2020-09-21 13:54:08 +02:00
Jason Dillaman
9929eff533
Merge pull request #37086 from trociny/wip-qa-rbd-nbd-unmap
qa/workunits/rbd: yet another attempt to improve rbd-nbd unmap

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
2020-09-14 14:32:30 -04:00
Mykola Golub
dc9ee9ba0b rbd-nbd: return quiesce hook exit code
Signed-off-by: Mykola Golub <mgolub@suse.com>
2020-09-11 14:51:51 +01:00
Mykola Golub
f0c69761c8 qa/workunits/rbd: yet another attempt to improve rbd-nbd unmap
Previously it still could race when unmap_device returned success
because the device was not found in `rbd-nbd list-mapped` (the nbd
device was removed) but the test failed because the process was still
found in the ps table.

Fixes: https://tracker.ceph.com/issues/47394
Signed-off-by: Mykola Golub <mgolub@suse.com>
2020-09-10 17:13:26 +01:00
Ilya Dryomov
7ccd2c0dce qa: add test for krbd symlinks created by udev
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
2020-09-09 09:21:54 +02:00
Sage Weil
dfd01d7653 blacklist -> blocklist
Signed-off-by: Sage Weil <sage@newdream.net>
Signed-off-by: Neha Ojha <nojha@redhat.com>
2020-08-24 19:53:08 +00:00
Jason Dillaman
dec8292a17 qa/workunits/rbd: retrieve peer uuid when attempting to delete duplicate
Previously, the peer uuid variable was empty which resulted in the failure
to remove the duplicate peer.

Fixes: https://tracker.ceph.com/issues/47007
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2020-08-18 17:18:25 -04:00
Mykola Golub
b0ab564eae qa/workunits/rbd: add rbd-nbd quiesce tests
Signed-off-by: Mykola Golub <mgolub@suse.com>
2020-05-09 16:36:49 +01:00
Jason Dillaman
efb6b656a1
Merge pull request #34787 from trociny/wip-45305
qa/workunits/rbd: fix list-mapped filter in unmap_device

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
2020-05-01 11:23:02 -04:00
Mykola Golub
1ad816ae0c qa/workunits/rbd: fix peer_add helper
We need to temporary disable "exit on error" mode so it does not
abort when `rbd mirror pool peer add` returns "already exists"
error code.

Signed-off-by: Mykola Golub <mgolub@suse.com>
2020-04-28 17:04:43 +01:00
Mykola Golub
d667e385a1 qa/workunits/rbd: fix list-mapped filter in unmap_device
In recent versions `rbd list-mapped` does not print the white space
at the end of the line.

Fixes: https://tracker.ceph.com/issues/45305
Signed-off-by: Mykola Golub <mgolub@suse.com>
2020-04-28 11:45:33 +01:00
Mykola Golub
7eced158a9 qa/workunits/rbd: retry the addition of a mirror pool peer
fb4311f5 has fixed this for setup, but "remove mirroring pool"
test needs fixing too.

Fixes: https://tracker.ceph.com/issues/44938
Signed-off-by: Mykola Golub <mgolub@suse.com>
2020-04-25 08:36:25 +01:00
Jason Dillaman
fb4311f597 qa/workunits/rbd: retry the addition of a mirror pool peer
We might race with the remote rbd-mirror daemon creating a
tx-only peer when adding a new peer. Therefore, delete the
tx-only peer and attempt to re-create it.

Fixes: https://tracker.ceph.com/issues/44938
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2020-04-15 16:27:07 -04:00
Jason Dillaman
e04422f2c6 rbd-mirror: switch to json_spirit formatter for journal image status
The free-form journal replay status description is now JSON-encoded. The
"master"/"mirror" designators have been changed to "primary"/"non_primary"
to better align with RBD terminology.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2020-04-03 15:24:53 -04:00
Jason Dillaman
477570a974 qa/workunits/rbd: use context managers to control Rados lifespan
There is a potential race between the expected exceptions being
thrown and Python shutting down racing with librados background
threads. Ensure that librados is properly shut down prior to
exiting Python.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2020-03-18 12:56:14 -04:00
Jason Dillaman
5cf9cd5d1c
Merge pull request #33900 from dillaman/wip-44459
qa/suites/rbd: removed OpenStack tempest test cases

Reviewed-by: Mykola Golub <mgolub@suse.com>
2020-03-12 19:22:22 -04:00
Jason Dillaman
3116c89fea
Merge pull request #33840 from trociny/wip-schedule-optimize-scan
mgr/rbd_support: don't scan pools that don't have schedules

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
2020-03-12 19:21:28 -04:00
Mykola Golub
421d579ff9
Merge pull request #33898 from dillaman/wip-44567
qa/workunits/rbd: wait for nbd map to close after unmap

Reviewed-by: Mykola Golub <mgolub@suse.com>
2020-03-12 16:52:56 +02:00