Commit Graph

74 Commits

Author SHA1 Message Date
Ilya Dryomov
b7e79642d5 rbd-mirror: remove callout when destroying pool replayer
If a pool replayer is removed in an error state (e.g. after failing to
connect to the remote cluster), its callout should be removed as well.
Otherwise, the error would persist causing "daemon health: ERROR"
status to be reported even after a new pool replayer is created and
started successfully.

Fixes: https://tracker.ceph.com/issues/65487
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
2024-05-05 21:11:54 +02:00
Ilya Dryomov
166a236237 qa/workunits/rbd: switch rbd-mirror workunits to bash
By making use of here strings in commit ea3a567f7f ("qa/workunits:
make wait_for_status_in_pool_dir() reentrant") we grew a dependency on
bash.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
2024-03-10 18:19:57 +01:00
Ramana Raja
ea3a567f7f qa/workunits: make wait_for_status_in_pool_dir() reentrant
In rbd_mirror_helpers.sh, the `wait_for_status_in_pool_dir()` helper
stored `mirror image status` and `mirror pool status` command outputs
in files that could be shared over successive calls or calls from
multiple threads. Instead store the command outputs in local variables
to make `wait_for_status_in_pool_dir()` reentrant.

Signed-off-by: Ramana Raja <rraja@redhat.com>
2024-02-22 11:44:28 -05:00
Suyashd999
9b773eec4a qa/suites/rbd: Cleanup of MIRROR_IMAGE_MODE
Fixes: https://tracker.ceph.com/issues/63431
Signed-off-by: Suyash Dongre <suyashd999@gmail.com>
2023-11-14 18:28:02 +05:30
Prasanna Kumar Kalever
3fd8a03887 qa/workunits/rbd: merge journal and snapshot test scripts
The idea is to avoid the maintenance of duplicate code in both the journal
and snapshot test scripts.

Usage:
   RBD_MIRROR_MODE=journal rbd_mirror.sh

Use environment variable RBD_MIRROR_MODE to set the mode
Available modes: snapshot | journal

Fixes: https://tracker.ceph.com/issues/54312
Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
2023-11-02 18:11:55 +05:30
Ilya Dryomov
153df2d64b qa: add "failover / failback loop" test for rbd-mirror
For snapshot-based mirroring, check that demote (or other mirror
snapshots) don't pile up.  Nothing in particular to assert on for
journal-based mirroring but the test is still useful.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
2023-09-01 19:05:36 +02:00
Arthur Outhenin-Chalandre
4db66da512
qa/rbd-mirror: add OMAP cleanup checks
This make sure that all images are deleted in the existing qa scripts
and checks if all rbd-mirror metadata in OMAP are correctly deleted.

Signed-off-by: Arthur Outhenin-Chalandre <arthur.outhenin-chalandre@cern.ch>
2021-08-18 18:50:44 +02: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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
Mykola Golub
11e2951243 qa/suites/rbd: allow to test with require-min-compat-client octopus
Signed-off-by: Mykola Golub <mgolub@suse.com>
2019-06-23 10:06:45 +01:00
Mykola Golub
c99e26eff9 qa/workunits/rbd: tweak mirror tests
(after "image mirror disable" started to disable journaling)

Signed-off-by: Mykola Golub <mgolub@suse.com>
2019-06-18 12:08:58 +01:00
Mykola Golub
92ee1c7b8b qa/workunits/rbd: fix compare_images and compare_image_snapshots
Due to pipe, sdiff return code was ignored. Also the compare functions
spent most of time in xxd, which was normally unnecessary.

Signed-off-by: Mykola Golub <mgolub@suse.com>
2019-06-13 08:26:29 +01:00
Jason Dillaman
9d694ba351 qa/workunits/rbd: delete pools before stopping rbd-mirror
This better mimics the behavior of teuthology and tests rbd-mirror
daemon's ability to handle a pool deletion.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2019-02-25 13:31:43 -05:00
Jason Dillaman
3e0094910a qa/workunits: fixed mon address parsing for rbd-mirror
The test extracts the mon addresses from the monmap, but with the
recent v2 format change it extracted an invalid address.

Fixes: http://tracker.ceph.com/issues/38385
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2019-02-19 14:22:34 -05:00
Mykola Golub
b29b4f0c71 qa/workunits/rbd: add trash move/restore mirror test
Signed-off-by: Mykola Golub <mgolub@suse.com>
2018-12-14 16:47:15 +00:00
Mykola Golub
7d2ffd981b rbd: show info about mirror instance in image mirror status output
It is particularly useful when running multiple rbd-mirror instances
in Active-Passive or Active-Active mode.

Signed-off-by: Mykola Golub <mgolub@suse.com>
2018-11-05 22:34:39 +02:00
Jason Dillaman
d04a7679c0 qa/workunits/rbd: exclude rbd-mirror sync-point snaps from comparison
This is a temporary workaround to tracker ticket issue #36185

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2018-09-25 16:08:25 -04:00
Jason Dillaman
27832e2781 qa/workunits/rbd: image compare should print byte offset of any deltas
This will assist in debugging any mirroring issues.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2018-09-25 08:45:08 -04:00
Jason Dillaman
d3a1a831ac qa/workunits/rbd: new test for rbd-mirror peer config-key secrets
Fixes: http://tracker.ceph.com/issues/24688
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2018-09-13 09:58:34 -04:00
Jason Dillaman
2c451a04f9 qa/workunits/rbd: dump long image directory upon rbd-mirror test failure
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2018-05-31 19:17:52 -04:00
Jason Dillaman
917f8a037c qa/workunits/rbd: fixed rbd-mirror snapshot comparison loop
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2018-05-15 16:35:26 -04:00
Jason Dillaman
a6a8c8a2ab qa/workunits/rbd: rbd-mirror admin socket commands should retry
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2018-05-15 16:35:26 -04:00
Jason Dillaman
1bb6d4fd89 qa/workunits/rbd: don't override rbd-mirror logs if running under teuthology
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2018-05-15 16:35:26 -04:00
Jason Dillaman
15a197ed06 qa/workunits/rbd: append rbd-mirror instance number for all-daemon asok command
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2018-05-15 16:35:26 -04:00
Jason Dillaman
de4587012d qa/suites/rbd: rbd-mirror fsx stress test
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2018-04-27 08:34:42 -04:00
Jason Dillaman
2311eff622 qa/suites/rbd: thrash rbd-mirror daemon during tests
Fixes: http://tracker.ceph.com/issues/18753
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2018-04-23 16:02:59 -04:00
Mykola Golub
cb90069604 qa/workunits/rbd: unnecessary sleep after failed remove
Signed-off-by: Mykola Golub <to.my.trociny@gmail.com>
2017-10-30 08:57:29 +02:00
Jason Dillaman
22816ed3f4 qa/workunits/rbd: fixed variable name for resync image id
Fixes: http://tracker.ceph.com/issues/21663
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2017-10-03 13:25:33 -04:00
Jason Dillaman
9aa5dfb8ec rbd-mirror: sync image metadata when transfering remote image
Fixes: http://tracker.ceph.com/issues/21535
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2017-09-28 15:22:08 -04:00
Mykola Golub
9ddb5da337 rbd-mirror: update asok hook name on image rename
Fixes: http://tracker.ceph.com/issues/20860
Signed-off-by: Mykola Golub <mgolub@mirantis.com>
2017-08-29 08:30:20 +02:00
Mykola Golub
c4c7075029 qa/workunits/rbd: test data pool is mirrored correctly
Signed-off-by: Mykola Golub <mgolub@mirantis.com>
2017-08-17 10:07:12 +02:00
Jason Dillaman
c2b451e8cb qa: fix RBD-related POOL_APP_NOT_ENABLED health warnings
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2017-08-03 09:50:41 -04:00