Commit Graph

642 Commits

Author SHA1 Message Date
Prasanna Kumar Kalever
2fa7f90d42 qa/workunits/rbd-nbd: add notrim test
Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
2021-06-30 13:09:24 +05:30
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
Mykola Golub
ef4c3ec399 mgr/rbd_support: fix recursive non-global level schedule listing
For the case when the non-global level does not have a schedule
and a higher level is used as the parent, it wrongly listed
schedules from all branches under the parent, instead of only the
interested one.

Signed-off-by: Mykola Golub <mgolub@suse.com>
2020-03-12 13:40:25 +00:00
Mykola Golub
5c80c497d5 qa/workunits/rbd: wait for schedule status updated
Signed-off-by: Mykola Golub <mgolub@suse.com>
2020-03-12 11:47:53 +00:00
Jason Dillaman
232d48f511 qa/suites/rbd: removed OpenStack tempest test cases
The OpenStack tempests tests do not stay stable and break approximately
every six months. Remove the test suite for now.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2020-03-11 15:36:22 -04:00
Jason Dillaman
80a3f18caf qa/workunits/rbd: wait for nbd map to close after unmap
The unmap action only sends a signal to the kernel to notify the
rbd-nbd daemon to disconnect. Therefore, it's possible that an
unmap followed by an immediate re-map to the same device might
fail since the unmap is still in-progress.

Fixes: https://tracker.ceph.com/issues/44567
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2020-03-11 15:12:58 -04:00
Jason Dillaman
606d866393 qa/suites/rbd: exercise different snapshot-based mirroring image features
Ensure that snapshot-based mirroring is tested in different RBD image
feature combinations.

Fixes: https://tracker.ceph.com/issues/44396
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2020-03-10 19:23:02 -04:00
Mykola Golub
5e15e111d3
Merge pull request #33588 from dillaman/wip-rbd-snapshot-mirror
rbd-mirror: initial end-to-end test and associated bug fixes

Reviewed-by: Mykola Golub <mgolub@suse.com>
2020-03-03 15:19:55 +02:00
Jason Dillaman
d6f4ce2a38 qa: test cases for snapshot-based mirroring
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2020-03-02 10:53:44 -05:00
Mykola Golub
d68d41c366 qa/workunits/rbd: add `mirror snapshot schedule' cli test
Signed-off-by: Mykola Golub <mgolub@suse.com>
2020-02-25 09:52:22 +00:00
Mykola Golub
253733ab89 qa/workunits/rbd: add `trash purge schedule' cli test
Signed-off-by: Mykola Golub <mgolub@suse.com>
2020-02-25 09:52:22 +00:00
Jason Dillaman
41357d242b qa/workunits/rbd: added mgr 'profile rbd' caps to mirror user
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2020-02-12 20:22:30 -05:00
Jason Dillaman
14001eb17e qa/workunits/rbd: additional overrides for CEPH_ARGS
The 'ceph' CLI and 'rbd mirror pool/image status' commandsshould revert
to use the admin user so that it has proper credentials for the cluster.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2020-02-12 20:21:48 -05:00
Mykola Golub
0ec4f8f1b9
Merge pull request #33187 from dillaman/wip-44066
qa/workunits/rbd: override CEPH_ARGS when initializing the site name

Reviewed-by: Mykola Golub <mgolub@suse.com>
2020-02-11 16:27:35 +02:00
Jason Dillaman
57d373fa99 qa/workunits/rbd: override CEPH_ARGS when initializing the site name
The mirroring site name is stored in the MON config which requires
higher privledges than the standard "client.mirror" user.

Fixes: https://tracker.ceph.com/issues/44066
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2020-02-10 11:39:24 -05:00
Jason Dillaman
ffa791f540 qa: move existing rbd-mirror functional test to journal-specific test
A new functional test for snapshot-based mirroring will be created and
the other stress-tests should eventually be applied to both snapshot-
and journal-based mirroring.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2020-01-30 10:26:36 -05:00
Jason Dillaman
cefaa78186 qa/workunits/rbd: use more recent qemu-iotests that support EL8
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2020-01-17 08:44:44 -05:00
Ilya Dryomov
b2b7610d1a qa: krbd_exclusive_option.sh: fixup for json.tool ordering change
In Python 3.5 json.tool was changed to produce unsorted output and
--sort-keys option was added to compensate.  This wasn't caught by
4fe245cc2f ("qa: update krbd tests for python3") because it raced
with 50933b863a ("qa: krbd_exclusive_option.sh: update for recent
kernel changes").

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
2020-01-06 15:12:25 +01:00
Jason Dillaman
5116a77f5d qa/workunits/rbd: fixed python interpreter for EL8
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2019-12-23 15:23:49 -05:00
Sage Weil
253a557f10 qa/workunits: python -> python3 throughout
Signed-off-by: Sage Weil <sage@redhat.com>
2019-12-19 12:38:47 -06:00
Kefu Chai
79584862f6 src,qa: install python bindings into lib/cython_modules/lib.3
instead of checking for the WITH_PYTHON* options, just hardwire to lib.3

Signed-off-by: Kefu Chai <kchai@redhat.com>
2019-12-19 11:52:54 +08:00
Sage Weil
3268ec7ac8 Merge PR #32252 into master
* refs/pull/32252/head:
	qa/cephfs/begin: libaio-devel on el8
	qa/tasks: nosetests -> python -m nose
	qa/tasks/rbd_fio: fio 2.21 -> 3.16
	src/test/cli-integration/rbd/snap-diff.t: python -> python
	qa/workunits: use nose 3
	qa/tasks/cbt: install python3 deps
	qa/tasks/ceph_manager.py: do not use python to write a file
	test/pybind/test_rados: execute takes a bytes (not str) payload
	qa/packages/packages: python[3]-ceph is no more
	qa: use python3 for venvs etc
	packaging: remove python3-ipaddres, as it is part of the stdlib in py3
	qa/packages: python-ceph -> python3-ceph
	qa/distros: centos7 -> centos8, rhel7 -> rhel8
	spec: remove _python_buildid in favor of python3_pkgversion macro
	spec: remove python2 packages and conditions
	debian: remove python >= 2.7 requirement
	debian: add mgr python versions
	debian: explicitly set PYTHON2=OFF to prevent picking up python2 interpreter
	debian: update control file to use python3 dependency names
	debian: remove all python2 overrides and declarations
	debian: remove all python2 install files

Reviewed-by: Alfredo Deza <adeza@redhat.com>
2019-12-17 15:23:27 -06:00
Jason Dillaman
6787219e71
Merge pull request #32280 from dillaman/wip-librbd-qos-test
qa/workunit/rbd: fixed QoS throughput unit parsing

Reviewed-by: Mykola Golub <mgolub@suse.com>
2019-12-17 12:30:52 -05:00
Jason Dillaman
7838d3e18e qa/workunit/rbd: fixed QoS throughput unit parsing
The 'rbd bench' command was recently modified to print IEC units
instead of bytes/sec. This broke the handling for QoS throughput
tests since it was incorrectly evaluating the available RBD
throughput. Additionally, the QoS tests should use a "<="
comparison operator since the QoS is the upper-bound limit.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2019-12-17 09:12:43 -05:00
Sage Weil
889446a515 qa/workunits: use nose 3
Ubuntu is /usr/bin/nosetests3, el is /usr/bin/nosetests-3, so do neither.

Signed-off-by: Sage Weil <sage@redhat.com>
2019-12-16 17:02:45 -06:00
Mykola Golub
678b53735b librbd: explicitly specify mode on mirror image enable
- don't use journaling feature to chose the mode;
- provide new API function mirror_image_enable2;
- return back the old behavior to automatically enable/disable
  journaling feature on enabling/disabling image mirroring.

Signed-off-by: Mykola Golub <mgolub@suse.com>
2019-12-16 08:24:30 +00:00
Jason Dillaman
f6c18468ce
Merge pull request #30548 from trociny/wip-41557
rbd-mirror: snapshot mirror mode

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
2019-12-10 16:41:28 -05:00
Mykola Golub
c9c8852f6e librbd: snapshot mirror mode
Enabling mirroring for an image that does not support journaling
assumes snapshot based mirroring, which is supported only when the
pool is in the "image" mirror mode.

Also for the pool in the "image" mirror mode disabling/enabling
journaling feature for a mirroring image will switch
snapshot/journal mirror mode.

Signed-off-by: Mykola Golub <mgolub@suse.com>
2019-12-10 15:45:30 +00:00
Ilya Dryomov
0bc226f6e1
Merge pull request #32088 from idryomov/wip-krbd-exclusive-lock-fixups
qa: krbd_exclusive_option.sh: update for recent kernel changes

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
2019-12-09 22:59:13 +01:00
Ilya Dryomov
3aae140353 qa: kernel.sh: unlock before rolling back
"rbd snap rollback" expects an unlocked image, but we may get there
locked if object map is enabled (or if lock_on_read is specified in
rbd_default_map_options).

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
2019-12-09 17:29:13 +01:00
Ilya Dryomov
50933b863a qa: krbd_exclusive_option.sh: update for recent kernel changes
Since 5.3:
- a plain "rbd map" acquires the lock, so it's not different from
  "rbd map -o exclusive" in this regard
- if the lock is held by the exclusive peer, I/O is failed right away
  instead of blocking
- lock_timeout option is respected only by "rbd map" and not by I/O

Since 5.5:
- if the mapping is read-only, the lock isn't acquired

Added blacklisting test case, dropped lock_timeout test case.

Fixes: https://tracker.ceph.com/issues/43127
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
2019-12-09 17:29:13 +01:00
Jason Dillaman
b27820cc73 rbd: incorporate rbd-mirror daemon status in mirror pool status
This will ensure that the Ceph dashbord's block mirroring page and
the CLI's 'mirror pool status' have matching health indications.

Fixes: https://tracker.ceph.com/issues/42748
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2019-12-04 08:14:06 -05:00
Ilya Dryomov
4fe245cc2f qa: update krbd tests for python3
There is no /usr/bin/python symlink in CentOS 8 even if python2 is
installed.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
2019-12-02 21:13:19 +01:00
Ilya Dryomov
6fb544045e qa: kernel.sh: update for read-only changes
Snapshot existence validation code was removed from krbd.  It was racy
and relied on having watch established for snapshots.

Fixes: https://tracker.ceph.com/issues/42916
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
2019-11-20 21:32:45 +01:00
Jason Dillaman
4a6c1ec14b
Merge pull request #31260 from trociny/wip-42405
rbd-mirror: removing non-primary trash snapshot

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
2019-11-08 07:35:41 -05:00
Mykola Golub
1dc0db74d4
Merge pull request #30912 from dillaman/wip-42265
mgr: add 'rbd' profiles to support 'rbd_support' module commands

Reviewed-by: Mykola Golub <mgolub@suse.com>
Reviewed-by: Sage Weil <sage@redhat.com>
2019-11-01 13:41:28 +02:00
Mykola Golub
473695e3bc qa/workunits/rbd: test mirrored snap trash removal
Signed-off-by: Mykola Golub <mgolub@suse.com>
2019-10-31 15:58:18 +02:00
Jason Dillaman
f4d99f796a
Merge pull request #31161 from trociny/wip-42488
rbd-mirror: mirrored clone should be same format 

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
2019-10-30 12:07:30 -04:00
Jason Dillaman
7cccdef25e qa/workunits/rbd: add permission tests for mgr profile
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2019-10-29 08:35:03 -04:00
Ilya Dryomov
b7a0e2adcb qa: add script to stress udev_enumerate_scan_devices()
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
2019-10-25 22:05:38 +02:00
Mykola Golub
dea3d1b738 rbd-mirror: mirrored clone should be same format
Fixes: https://tracker.ceph.com/issues/42488
Signed-off-by: Mykola Golub <mgolub@suse.com>
2019-10-25 17:50:54 +03:00
Ilya Dryomov
898c113f93 qa: add script to test udev event reaping
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
2019-10-18 21:56:30 +02:00
Jason Dillaman
eaec1786ee qa/workunits/rbd: tweak mirror test case to handle peer status
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2019-10-08 11:17:15 -04:00
Jason Dillaman
547ebccaf9 librbd: v1 clones are restricted to the same namespace
Therefore the v1 parent spec should not attempt to populate the
namespace.

Fixes: https://tracker.ceph.com/issues/41938
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2019-10-04 13:27:50 -04:00
Jason Dillaman
85f98c01c0 qa/suites/rbd: test case for rbd-mirror bootstrap
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2019-09-20 08:09:21 -04:00
Ilya Dryomov
d63570c5a5
Merge pull request #30363 from idryomov/wip-krbd-huge-osdmap
qa: add script to test how libceph handles huge osdmaps

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
2019-09-13 22:35:57 +02:00
Ilya Dryomov
81becbdc68 qa: add script to test how libceph handles huge osdmaps
That code will also handle moderately-sized osdmaps when the memory is
fragmented.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
2019-09-13 19:21:54 +02:00
Mykola Golub
4b0fcc8cfb qa/workunits/rbd: add rbd-mirror namespace tests
Signed-off-by: Mykola Golub <mgolub@suse.com>
2019-09-05 13:57:47 +01:00
Mykola Golub
de66e0b89c qa/workunits/rbd: add 'remove mirroring pool' test
Signed-off-by: Mykola Golub <mgolub@suse.com>
2019-08-27 16:42:51 +01:00
Mykola Golub
0866a2456b qa/workunits/rbd: stress test rbd mirror pool status --verbose
Fixes: https://tracker.ceph.com/issues/40923
Signed-off-by: Mykola Golub <mgolub@suse.com>
2019-08-16 12:50:42 +01:00
Jason Dillaman
7adb17f831 pybind/mgr/rbd_support: use image ids to detect duplicate tasks
This helps to to avoid the case where new tasks were not being scheduled
when an image name was re-used after having a task created under the
same name.

Fixes: https://tracker.ceph.com/issues/41032
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2019-08-06 12:17:46 -04:00