]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
2 months agoqa/workunits/rbd: add new tests and improve existing
John Agombar [Thu, 13 Feb 2025 17:20:01 +0000 (17:20 +0000)]
qa/workunits/rbd: add new tests and improve existing

Change admin socket mirror group status checks to query status on normal CLI too
Disable test_stopped_daemon test whichhas intermittent failures.
Remove sleep 5 which is no longer needed in RBD mirror group tests
Fix test_image_replay_state() helper function to work without SHOW_CLI_CMD env variable set

Signed-off-by: John Agombar <agombar@uk.ibm.com>
2 months agorbd-mirror: align GroupReplayer register admin_socket_hook with ImageReplayer
Prasanna Kumar Kalever [Tue, 25 Feb 2025 11:46:15 +0000 (17:16 +0530)]
rbd-mirror: align GroupReplayer register admin_socket_hook with ImageReplayer

This will fix the following failing tests with asok issues:

rbd_mirror_group_simple.sh:
+ testlog 'TEST:test_multiple_user_snapshot_time scenario:1 parameters:'

rbd_mirror_group_group.sh:
+ testlog "TEST: add a large image to group and test replay"

Also this fix replace the set_finished(), which was removed in the previous
commit, which will cause a regression in the GroupReplayer destroy code path.

Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
2 months agorbd-mirror: fixes multiple issues in the group replayer
N Balachandran [Fri, 21 Feb 2025 06:17:19 +0000 (11:47 +0530)]
rbd-mirror: fixes multiple issues in the group replayer

The commit includes the following:
- Fixed crashes in the start/stop in GroupReplayer
- Fixed crashes in the shut_down sequence in group_replayer::Replayer
- ImageMap will now send release_group notifications for non-empty
  groups.
- InstanceReplayer no longer checks if the GroupReplayer needs to be
  restarted. The GroupReplayer will stop itself if it determines that it
  needs to be restarted.

Signed-off-by: N Balachandran <nithya.balachandran@ibm.com>
2 months agolibrbd: remove mirror APIs that change mirror group membership
Ramana Raja [Tue, 4 Feb 2025 00:55:08 +0000 (19:55 -0500)]
librbd: remove mirror APIs that change mirror group membership

Remove mirror APIs, group_image_add() and group_image_remove() that
are never called as we don't allow adding/removing images to/from a
mirrored group.

Signed-off-by: Ramana Raja <rraja@redhat.com>
2 months agolibrbd: disallow add/remove image to/from mirror enabled group
Ramana Raja [Sun, 2 Feb 2025 17:28:52 +0000 (12:28 -0500)]
librbd: disallow add/remove image to/from mirror enabled group

Do not allow adding/removing images to/from a group that is configured
for mirroring.

Signed-off-by: Ramana Raja <rraja@redhat.com>
2 months agorbd-mirror: fix crashes in unittest_rbd_mirror
Vinay Bhaskar Varada [Wed, 19 Feb 2025 08:24:15 +0000 (13:54 +0530)]
rbd-mirror: fix crashes in unittest_rbd_mirror

Signed-off-by: Vinay Bhaskar Varada <vvarada@redhat.com>
2 months agorbd-mirror: do not move the images to trash while the disabling is in progress
Prasanna Kumar Kalever [Tue, 18 Feb 2025 07:42:58 +0000 (13:12 +0530)]
rbd-mirror: do not move the images to trash while the disabling is in progress

Images cannot be moved to trash if the state is disabling because its a
transient state where some of the images might have got the oportunity to
disable and some of them part of the group might still be enabled
waiting for the oportunity while a group disable is in progress.

So we wait until the state DISABLING moves to next state, and see if there are
any stale image to move into a trash queue later.

Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
2 months agorbd-mirror: bootstrap wait for previous disabling group to cleanup
Prasanna Kumar Kalever [Mon, 17 Feb 2025 10:32:06 +0000 (16:02 +0530)]
rbd-mirror: bootstrap wait for previous disabling group to cleanup

Was seeing a case where the following operations are done:
1. daemon is stopped on secondary
2. then mirroring on the group is disabled
3. added/removed image[s] to/from the group
4. enabled group back for mirroring
5. Mirroring daemon is brought back to life

From the handling:
1. Two GroupReplayer's are started by the InstanceReplayer, one for old group
   and one for new group (not surprisingly both deal with the same pool images)
2. The GroupReplayer for old group instance enters into
   group_replayer::BootstrapRequest, notices remote_group_id is not found, and
   starts cleaning-up the group, """tries to remove local group and all the
   images. Finally returns to GroupReplayer, stop the GroupReplayer setting
   the state as stopped with description group removed and finally unregister
   admin socket hook."""
3. On the other hand the GroupReplayer for new group instance runs in concurrent
   to the old one, figures out local group_id by name exists and """tries to
   remove local group and all the images. Finally returns to GroupReplayer,
   stop the GroupReplayer setting the state as stopped with description group
   removed and finally unregister admin socket hook."""

You can see 2 and 3 are ending up in the same situation because of the
concurrent behaviour. i.e one has to add the group with a name and create
images in the pool. Where as the other has to remove the group with same name
from the same pool.

Thanks to Ilya for the suggestion here, according to the suggestion the
fix is simple. The way this is handled for standalone images is that the
second replayer (i.e. (3)) sees that the image is in MIRROR_IMAGE_STATE_DISABLING
state and backs off (i.e.second group waits and retries later).

If the second replayer backs off with ERESTART, the first replayer should
eventually clean up the old group which would allow the second replayer to
proceed with creating a new group.

fixes: issue#27

Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
2 months agorbd_mirror: cleanup group status keys in the rbd_mirroring object
Prasanna Kumar Kalever [Fri, 14 Feb 2025 10:51:10 +0000 (16:21 +0530)]
rbd_mirror: cleanup group status keys in the rbd_mirroring object

Keys & Values for "gremote_status_global_*" and "gstatus_global_*" are
getting readded in the rbd_mirroring object after they were removed at
group disable time as part of group_status_set(), as it doesn't defend
for disabled groups today.

Also librbd::cls_client::mirror_group_status_remove_down() was added in
the code but not levearaged, hence added code for unhappy path cleanup
as part of MirrorStatusWatcher::init() like it is calls
librbd::cls_client::mirror_image_status_remove_down() today.

fixes: issue#16

Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
2 months agoqa/workunits/rbd: enable more tests that pass with latest changes
John Agombar [Wed, 12 Feb 2025 15:41:30 +0000 (15:41 +0000)]
qa/workunits/rbd: enable more tests that pass with latest changes

Also,
- Support image multiplier to allow tests to run with more images
- Change cli to allow image multiplier to be specified

Signed-off-by: John Agombar <agombar@uk.ibm.com>
2 months agolibrbd: fixed a crash in GroupUnlinkPeerRequest
N Balachandran [Thu, 13 Feb 2025 04:58:18 +0000 (10:28 +0530)]
librbd: fixed a crash in GroupUnlinkPeerRequest

Fixed a crash caused by using the wong ceph context when using the
python bindings to create mirror group snaps .

Signed-off-by: N Balachandran <nithya.balachandran@ibm.com>
2 months agorbd_mirror: fix resync failure
Prasanna Kumar Kalever [Wed, 12 Feb 2025 14:24:44 +0000 (19:54 +0530)]
rbd_mirror: fix resync failure

Steps to reproduce:
$ rbd --cluster site-b mirror group promote test_pool/test_group --force
$ rbd --cluster site-a mirror group demote test_pool/test_group
$ rbd --cluster site-a mirror group resync test_pool/test_group

$ rbd --cluster site-b mirror group status test_pool/test_group

The group snapshots are are not re-syncing. And the group status shows image
snap as syncing always.

fixes: issue#11

Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
2 months agolibrbd/deep_copy: rename .group snapshot according with local information
Prasanna Kumar Kalever [Wed, 12 Feb 2025 06:18:08 +0000 (11:48 +0530)]
librbd/deep_copy: rename .group snapshot according with local information

.group snapshots are image snapshots part of user group snapshots

Today these snapshots follow naming:
".group." + primary_pool_id + "_" + primary_group_id + "_" + group_snap_id

[Note: group_snap_id is same on primary on secondary]

With this change the above naming will change as:
".group." + local_pool_id + "_" + local_group_id + "_" + group_snap_id

i.e pool_id and group_id differ on primary and seondary and hence names differ.

Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
2 months agorbd_mirror: update local {group_pool, group_pool} in ImageSnapshotNamespaceGroup
Prasanna Kumar Kalever [Tue, 11 Feb 2025 17:55:54 +0000 (23:25 +0530)]
rbd_mirror: update local {group_pool, group_pool} in ImageSnapshotNamespaceGroup

* Fix user group snapshot not moving to complete when the pool_id differ on
  remote and locally.
* The Image snapshot namespace ImageSnapshotNamespaceGroup is copied
  from remote src directly to dst locally and {group_pool, group_pool}
  still hold remote details. This fix updates the namespace in the
  image snapshot.

fixes: issue#6

Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
2 months agolibrbd: fix group snapshot unlink
N Balachandran [Mon, 10 Feb 2025 15:10:07 +0000 (20:40 +0530)]
librbd: fix group snapshot unlink

Changes to the group mirror snapshot unlink:
- Fixes the group mirror snapshot unlink to behave like the
  image mirror unlink.
- Renames UnlinkGroupPeerRequest to GroupUnlinkPeerRequest
  and moves it into librbd/mirror/snapshot.
- Modifies prepare_group_images() to return the mirror_peer_uuids
  which are then passed as an argument to GroupUnlinkPeerRequest.

Signed-off-by: N Balachandran <nithya.balachandran@ibm.com>
2 months agoqa/workunits/rbd: improvements to smoke tests
John Agombar [Thu, 6 Feb 2025 12:03:36 +0000 (12:03 +0000)]
qa/workunits/rbd: improvements to smoke tests

- Remove dynamic group behaviour in rbd_mirror_group.sh tests
- Add test for group enable/disable after force promote
- Test new fields in group info cmd

Signed-off-by: John Agombar <agombar@uk.ibm.com>
2 months agorbd-mirror: add peer_uuids for non-primary demoted group snapshot
Prasanna Kumar Kalever [Mon, 10 Feb 2025 14:16:47 +0000 (19:46 +0530)]
rbd-mirror: add peer_uuids for non-primary demoted group snapshot

GroupReplayer should add peer uuid for group snapshot if it is a
non-primary demoted snapshot, other wise this snapshot will be
unconditionally unlinked further, as doesn't have a peer uuid leading to
split-brain scenarios.

Credits to N Balachandran <nithya.balachandran@ibm.com> for the find.

Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
2 months agolibrbd: fix remove_interim_snapshots()
N Balachandran [Fri, 7 Feb 2025 04:41:21 +0000 (10:11 +0530)]
librbd: fix remove_interim_snapshots()

Fixed remove_interim_snapshots() to remove the image
snaps.

Signed-off-by: N Balachandran <nithya.balachandran@ibm.com>
2 months agorbd: rbd group info now displays mirroring info
N Balachandran [Thu, 6 Feb 2025 14:33:02 +0000 (20:03 +0530)]
rbd: rbd group info now displays mirroring info

The "rbd group info" will now display the mirroring mode, global-id
and whether primary for mirror enabled groups.

Signed-off-by: N Balachandran <nithya.balachandran@ibm.com>
2 months agoqa/workunits/rbd: updates to mirror group bash scripts
John Agombar [Thu, 30 Jan 2025 13:04:13 +0000 (13:04 +0000)]
qa/workunits/rbd: updates to mirror group bash scripts

- support cli parameters to specify the test to run
- support cli parameter to specify the number of times to repeat the test
- new tests
- added RBD_MIRROR_NEW_IMPLICIT_BEHAVIOUR env variable in preparation for
  changes to group snapshot behaviour

Signed-off-by: John Agombar <agombar@uk.ibm.com>
2 months agorbd-mirror: improvements to unlink group snapshot
Prasanna Kumar Kalever [Thu, 6 Feb 2025 06:01:48 +0000 (11:31 +0530)]
rbd-mirror: improvements to unlink group snapshot

1. If group snapshot is syncing do not remove mirror peer uuid of last complete
   snapshot [ i.e. currently incomlpete - 1] (on remote)
2. If group snapshot is synced do not remove mirror peer uuid of its
   respective on remote yet.

both will lead to split brain issues.

Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
2 months agorbd-mirror: synchronize image replayer and group replayer
Prasanna Kumar Kalever [Thu, 6 Feb 2025 08:10:01 +0000 (13:40 +0530)]
rbd-mirror: synchronize image replayer and group replayer

Here on, image replayer waits for group_replayer to set remote image snap
end id inorder for image replayer to proceed with the image snapshot copy.

Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
2 months agomgr/rbd_support: create mirror gp snap asynchronously
Ramana Raja [Fri, 24 Jan 2025 20:04:05 +0000 (15:04 -0500)]
mgr/rbd_support: create mirror gp snap asynchronously

... in the mirror group snapshot scheduler.

Signed-off-by: Ramana Raja <rraja@redhat.com>
2 months agolibrbd: add C and Python bindings for async mirror group snapshot create
Ramana Raja [Wed, 22 Jan 2025 17:26:57 +0000 (12:26 -0500)]
librbd: add C and Python bindings for async mirror group snapshot create

Signed-off-by: Ramana Raja <rraja@redhat.com>
2 months agolibrbd/group/UnlinkPeerGroupRequest: convert sync to async calls
Ramana Raja [Sun, 26 Jan 2025 06:30:50 +0000 (01:30 -0500)]
librbd/group/UnlinkPeerGroupRequest: convert sync to async calls

Signed-off-by: Ramana Raja <rraja@redhat.com>
2 months agolibrbd/mirror/snapshot: add async create mirror group snapshot
Ramana Raja [Sun, 12 Jan 2025 21:01:23 +0000 (16:01 -0500)]
librbd/mirror/snapshot: add async create mirror group snapshot

Signed-off-by: Ramana Raja <rraja@redhat.com>
2 months agolibrbd/mirror/snapshot: add async group prepare images
Ramana Raja [Sun, 12 Jan 2025 20:56:20 +0000 (15:56 -0500)]
librbd/mirror/snapshot: add async group prepare images

... state machine class.

Signed-off-by: Ramana Raja <rraja@redhat.com>
2 months agolibrbd: add C and python bindings for async mirror gp snap info
Ramana Raja [Fri, 24 Jan 2025 23:34:06 +0000 (18:34 -0500)]
librbd: add C and python bindings for async mirror gp snap info

Signed-off-by: Ramana Raja <rraja@redhat.com>
2 months agolibrbd: add async state machine for "mirror_group_get_info"
Ramana Raja [Fri, 24 Jan 2025 22:29:51 +0000 (17:29 -0500)]
librbd: add async state machine for "mirror_group_get_info"

Signed-off-by: Ramana Raja <rraja@redhat.com>
2 months agomgr/rbd_support: disallow scheduling mirror snapshots
Ramana Raja [Thu, 12 Dec 2024 21:38:29 +0000 (16:38 -0500)]
mgr/rbd_support: disallow scheduling mirror snapshots

... of images that are part of a group.

Creating a global, pool or namespace level mirror snapshot
schedule shouldn't schedule mirror snapshots of images that
are part of a group and reside in the pool or namespace.

Also disallow directly scheduling mirror image snapshots on
images that are part of a group.

Signed-off-by: Ramana Raja <rraja@redhat.com>
2 months agoqa/workunits/rbd: add basic tests for mirror group snapshot scheduler
Ramana Raja [Tue, 5 Nov 2024 16:12:54 +0000 (11:12 -0500)]
qa/workunits/rbd: add basic tests for mirror group snapshot scheduler

Add tests to check the basic functionality of the
mirror_group_snapshot_schedule module. Check that
- `rbd mirror group snapshot schedule add/rm/status/ls` commands work
- the module can recover from blocklisting of its client and continue
  to process requests

Signed-off-by: Ramana Raja <rraja@redhat.com>
2 months agotools/rbd: add CLI to call into mirror group snapshot scheduler
Ramana Raja [Wed, 23 Oct 2024 17:20:37 +0000 (13:20 -0400)]
tools/rbd: add CLI to call into mirror group snapshot scheduler

Signed-off-by: Ramana Raja <rraja@redhat.com>
2 months agopybind/mgr/rbd_support: add scheduler for mirror group snapshots
Ramana Raja [Sun, 20 Oct 2024 15:54:55 +0000 (11:54 -0400)]
pybind/mgr/rbd_support: add scheduler for mirror group snapshots

Signed-off-by: Ramana Raja <rraja@redhat.com>
2 months agolibrbd: add API to fetch group name using group ID
Ramana Raja [Fri, 1 Nov 2024 22:02:16 +0000 (18:02 -0400)]
librbd: add API to fetch group name using group ID

Signed-off-by: Ramana Raja <rraja@redhat.com>
2 months agolibrbd: add python and C bindings for group_list2
Ramana Raja [Sun, 20 Oct 2024 23:50:04 +0000 (19:50 -0400)]
librbd: add python and C bindings for group_list2

... that lists IDs and names of groups in a pool.

Signed-off-by: Ramana Raja <rraja@redhat.com>
2 months agopybind/rbd: add interface to create mirror group snapshot
Ramana Raja [Tue, 6 Aug 2024 22:34:59 +0000 (18:34 -0400)]
pybind/rbd: add interface to create mirror group snapshot

... synchronously.

Signed-off-by: Ramana Raja <rraja@redhat.com>
2 months agopybind/rbd: add interfaces to fetch and list mirror group info
Ramana Raja [Tue, 6 Aug 2024 18:20:14 +0000 (14:20 -0400)]
pybind/rbd: add interfaces to fetch and list mirror group info

Signed-off-by: Ramana Raja <rraja@redhat.com>
2 months agolibrbd/api/Mirror: set the boolean field 'primary' in group_info and group_list
Ramana Raja [Tue, 29 Oct 2024 13:51:38 +0000 (09:51 -0400)]
librbd/api/Mirror: set the boolean field 'primary' in group_info and group_list

outputs to identify whether a mirror group is primary or not.

Signed-off-by: Ramana Raja <rraja@redhat.com>
2 months agocleanup: revert some of the unrequired changes
Vinay Bhaskar Varada [Mon, 3 Feb 2025 15:58:35 +0000 (21:28 +0530)]
cleanup: revert some of the unrequired changes

With this changes will be able to build and run librbd unit tests

Note: This changes will be later merged into the subsequent commits.

Signed-off-by: Vinay Bhaskar Varada <vvarada@redhat.com>
Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
2 months agorbd-mirror: more improvements in the group replayer
Prasanna Kumar Kalever [Thu, 30 Jan 2025 11:39:30 +0000 (17:09 +0530)]
rbd-mirror: more improvements in the group replayer

- Arresting the interruptions after shutdown
- Restart GroupReplayer if bootstrap returns remote group id as empty
- Fix a test failure in "regular group snapshots test"

Issue#23

Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
2 months agorbd-mirror: create group snapshots only if remote group snapshot is complete
Prasanna Kumar Kalever [Tue, 28 Jan 2025 06:41:31 +0000 (12:11 +0530)]
rbd-mirror: create group snapshots only if remote group snapshot is complete

Also do not create a regular group snapshot until the next mirror group
snapshot is created. Otherwise we simply have an incomplete regular group
snapshot until the next mirror group snapshot is created.

Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
2 months agocls/rbd: changes needed to align rest with the proposed ones
Prasanna Kumar Kalever [Fri, 22 Nov 2024 19:46:39 +0000 (01:16 +0530)]
cls/rbd: changes needed to align rest with the proposed ones

Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
2 months agocls/rbd: proposed changes
Prasanna Kumar Kalever [Fri, 22 Nov 2024 16:26:20 +0000 (21:56 +0530)]
cls/rbd: proposed changes

Changes proposed by 'N Balachandran'

Signed-off-by: N Balachandran <nibalach@redhat.com>
Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
2 months agorbd-mirror: group replayer work in-progress changes
Prasanna Kumar Kalever [Tue, 22 Oct 2024 07:15:46 +0000 (12:45 +0530)]
rbd-mirror: group replayer work in-progress changes

This commit is a WIP targeting stability of tests failures, it might be diluted
into various existing commits

Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
2 months agoqa/workunits/rbd: mirror group tests improvements
Prasanna Kumar Kalever [Fri, 22 Nov 2024 07:12:19 +0000 (12:42 +0530)]
qa/workunits/rbd: mirror group tests improvements

Signed-off-by: N Balachandran <nibalach@redhat.com>
Signed-off-by: John Agombar <agombar@uk.ibm.com>
Signed-off-by: Adam Lyon-Jones <adamlyon@uk.ibm.com>
Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
2 months agorbd-mirror: move the rename detection logic to snapshot GroupReplayer
Prasanna Kumar Kalever [Tue, 3 Sep 2024 16:03:53 +0000 (21:33 +0530)]
rbd-mirror: move the rename detection logic to snapshot GroupReplayer

Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
2 months agorbd-mirror: use group_header object for resync flagging
Prasanna Kumar Kalever [Tue, 27 Aug 2024 07:03:21 +0000 (12:33 +0530)]
rbd-mirror: use group_header object for resync flagging

Also move the resync checks to snapshot GroupReplayer

Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
2 months agorbd-mirror: rollback to last good snapshot just while force promote
Prasanna Kumar Kalever [Mon, 2 Sep 2024 08:54:35 +0000 (14:24 +0530)]
rbd-mirror: rollback to last good snapshot just while force promote

fix the group membership to match the rollback snapshot

Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
2 months agorbd-mirror: fix the below bugs
Prasanna Kumar Kalever [Fri, 9 Aug 2024 06:33:12 +0000 (12:03 +0530)]
rbd-mirror: fix the below bugs

* fix braces in the imageMap update_images_added & update_images_removed
* do not allow image add from non-primary
* `down+unknown` status shown on querying individual images which are part
  of group enabled for mirroring
* `mirror pool status` shows down+unknown status
* fix imageMap being overwritten when multiple images are enabled for mirroring
* fix misleading error msg when getting status of a non-mirror enabled group

Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
2 months agorbd-mirror: prune snapshots added to the list on image_replayer shutdown
Prasanna Kumar Kalever [Mon, 5 Aug 2024 04:14:38 +0000 (09:44 +0530)]
rbd-mirror: prune snapshots added to the list on image_replayer shutdown

Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
2 months agorbd-mirror: discover primary demote snapshot in group_replayer
Prasanna Kumar Kalever [Thu, 1 Aug 2024 13:41:52 +0000 (19:11 +0530)]
rbd-mirror: discover primary demote snapshot in group_replayer

Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
2 months agorbd-mirror: remove group snaps on primary at snapshot creation
Prasanna Kumar Kalever [Sun, 21 Jul 2024 15:52:12 +0000 (21:22 +0530)]
rbd-mirror: remove group snaps on primary at snapshot creation

Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
2 months agorbd-mirror: Independent GroupReplayer
Prasanna Kumar Kalever [Mon, 5 Aug 2024 06:35:26 +0000 (12:05 +0530)]
rbd-mirror: Independent GroupReplayer

Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
2 months agoqa/workunits/rbd: mirror group functional tests
Mykola Golub [Fri, 12 Mar 2021 11:57:57 +0000 (11:57 +0000)]
qa/workunits/rbd: mirror group functional tests

Also sets the RBD_MIRROR_INSTANCES to 1 to avoid any deviations.

Signed-off-by: Mykola Golub <mgolub@suse.com>
Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
2 months agorbd-mirror: implement group resync functionality
Prasanna Kumar Kalever [Fri, 3 May 2024 08:16:53 +0000 (13:46 +0530)]
rbd-mirror: implement group resync functionality

Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
2 months agorbd-mirror: support mirroring regular non-mirror group snapshots
Prasanna Kumar Kalever [Mon, 22 Apr 2024 11:37:01 +0000 (17:07 +0530)]
rbd-mirror: support mirroring regular non-mirror group snapshots

This commit also enable deep copying `.group` snaps.

$ rbd --cluster site-a snap ls pool1/test_image1 --all --debug-rbd=0
SNAPID  NAME                                                                                       SIZE     PROTECTED  TIMESTAMP                 NAMESPACE
     4  .group.2_10416b8b4567_104d6b8b4567                                                         128 MiB             Mon Apr 22 17:07:57 2024  group (pool1/test_group@group_snap1)
     7  .group.2_10416b8b4567_104f6b8b4567                                                         128 MiB             Mon Apr 22 17:07:59 2024  group (pool1/test_group@group_snap2)
     8  .mirror.primary.72855be4-1ffb-4094-8426-fb1d5f082c21.71b62dad-f515-43cf-91b2-bf1225c5a0fc  128 MiB             Mon Apr 22 17:08:03 2024  mirror (primary peer_uuids:[5f9ea7aa-fa5b-4d2e-a098-3afe006361aa])

$ rbd --cluster site-b snap ls pool1/test_image1 --all --debug-rbd=0
SNAPID  NAME                                                                                           SIZE     PROTECTED  TIMESTAMP                 NAMESPACE
     5  .group.2_10416b8b4567_104d6b8b4567                                                             128 MiB             Mon Apr 22 17:08:07 2024  group
     7  .group.2_10416b8b4567_104f6b8b4567                                                             128 MiB             Mon Apr 22 17:08:08 2024  group
     8  .mirror.non_primary.72855be4-1ffb-4094-8426-fb1d5f082c21.64488da7-3350-4d04-8e4d-90047182e004  128 MiB             Mon Apr 22 17:08:09 2024  mirror (non-primary peer_uuids:[] 6d963873-6679-483b-b05a-8bf2536f4fdf:8 copied)

$ rbd --cluster site-a group snap ls pool1/test_group --debug-rbd=0
NAME                                 STATUS
group_snap1                              ok
group_snap2                              ok
.mirror.2_10416b8b4567_10536b8b4567      ok

$ rbd --cluster site-b group snap ls pool1/test_group --debug-rbd=0
NAME                                 STATUS
.mirror.2_10376b8b4567_1037327b23c6      ok
group_snap1                              ok
group_snap2                              ok
.mirror.2_10416b8b4567_10536b8b4567      ok

Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
2 months agorbd-mirror: support rename with group mirroring
Prasanna Kumar Kalever [Fri, 26 Apr 2024 15:33:28 +0000 (21:03 +0530)]
rbd-mirror: support rename with group mirroring

Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
2 months agorbd-mirror: add undo code, exclusive locking and quiescing
Prasanna Kumar Kalever [Mon, 26 Feb 2024 08:53:28 +0000 (14:23 +0530)]
rbd-mirror: add undo code, exclusive locking and quiescing

* add essential logic to undo partially succeeded API's like, group promote,
  group demote, group enable, group disable, group image add and
  group image remove
* add exclusive locking and quiescing with-in all the required group API's
* adress code duplication and optimization with in the group API's

Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
2 months agorbd-mirror: address partial group snapshots case
Prasanna Kumar Kalever [Wed, 14 Feb 2024 15:01:21 +0000 (20:31 +0530)]
rbd-mirror: address partial group snapshots case

Make sure group snapshots doesn't get copied to secondary if the group snapshot
is incomplete on primary. On creation time of a group snapshots on primary,
make sure to delete the previous snapshot in case it is incomplete.

Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
2 months agorbd-mirror: request group snapshot creation when creating group image snapshot
Mykola Golub [Thu, 18 Mar 2021 18:38:26 +0000 (18:38 +0000)]
rbd-mirror: request group snapshot creation when creating group image snapshot

It makes the group image replayers to synchronize and to have the
group snapshot created.

Signed-off-by: Mykola Golub <mgolub@suse.com>
Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
2 months agorbd-mirror: unlink group snapshot when pruning non-primary snapshot
Mykola Golub [Fri, 19 Mar 2021 13:09:35 +0000 (13:09 +0000)]
rbd-mirror: unlink group snapshot when pruning non-primary snapshot

Signed-off-by: Mykola Golub <mgolub@suse.com>
Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
2 months agorbd-mirror: initial group replayer implementation
Mykola Golub [Sun, 17 Jan 2021 10:36:02 +0000 (10:36 +0000)]
rbd-mirror: initial group replayer implementation

Signed-off-by: Mykola Golub <mgolub@suse.com>
Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
2 months agorbd-mirror: hook GroupReplayer
Mykola Golub [Tue, 5 Jan 2021 16:18:57 +0000 (16:18 +0000)]
rbd-mirror: hook GroupReplayer

Signed-off-by: Mykola Golub <mgolub@suse.com>
Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
2 months agorbd-mirror: make pool watcher also refresh groups
Mykola Golub [Thu, 21 Jan 2021 09:18:36 +0000 (09:18 +0000)]
rbd-mirror: make pool watcher also refresh groups

Signed-off-by: Mykola Golub <mgolub@suse.com>
Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
2 months agorbd-mirror: introduce generalized mirror entity (type, global_id, size)
Mykola Golub [Wed, 30 Dec 2020 16:37:31 +0000 (16:37 +0000)]
rbd-mirror: introduce generalized mirror entity (type, global_id, size)

where type may be image or group. Make pool watcher and image
mapper use it currently for images. The group support is coming.

Signed-off-by: Mykola Golub <mgolub@suse.com>
Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
2 months agorbd-mirror: remove dead code
Mykola Golub [Fri, 25 Dec 2020 09:28:37 +0000 (09:28 +0000)]
rbd-mirror: remove dead code

Signed-off-by: Mykola Golub <mgolub@suse.com>
Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
2 months agorbd: add 'mirror group' commands
Mykola Golub [Sun, 13 Dec 2020 16:01:15 +0000 (16:01 +0000)]
rbd: add 'mirror group' commands

Signed-off-by: Mykola Golub <mgolub@suse.com>
Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
2 months agolibrbd: link group snapshot when creating non-primary snapshot
Mykola Golub [Fri, 19 Mar 2021 14:37:17 +0000 (14:37 +0000)]
librbd: link group snapshot when creating non-primary snapshot

Signed-off-by: Mykola Golub <mgolub@suse.com>
Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
2 months agolibrbd: unlink group snapshot when removing mirror snapshot
Mykola Golub [Fri, 19 Feb 2021 17:57:06 +0000 (17:57 +0000)]
librbd: unlink group snapshot when removing mirror snapshot

Signed-off-by: Mykola Golub <mgolub@suse.com>
Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
2 months agolibrbd: allow to add image to group on creation
Mykola Golub [Wed, 27 Jan 2021 17:23:52 +0000 (17:23 +0000)]
librbd: allow to add image to group on creation

Signed-off-by: Mykola Golub <mgolub@suse.com>
Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
2 months agolibrbd: add mirror group API
Mykola Golub [Sat, 28 Nov 2020 10:15:26 +0000 (10:15 +0000)]
librbd: add mirror group API

Signed-off-by: Mykola Golub <mgolub@suse.com>
Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
2 months agolibrbd: don't send 'image updated' notifications
Mykola Golub [Fri, 18 Dec 2020 10:15:11 +0000 (10:15 +0000)]
librbd: don't send 'image updated' notifications

when enabling/disabling group mirroring

Signed-off-by: Mykola Golub <mgolub@suse.com>
Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
2 months agolibrbd: introduce 'group updated' mirroring watcher notification
Mykola Golub [Thu, 17 Dec 2020 12:22:57 +0000 (12:22 +0000)]
librbd: introduce 'group updated' mirroring watcher notification

Signed-off-by: Mykola Golub <mgolub@suse.com>
Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
2 months agolibrbd: introduce 'group add/remove image' async requests
Mykola Golub [Wed, 27 Jan 2021 17:19:32 +0000 (17:19 +0000)]
librbd: introduce 'group add/remove image' async requests

Signed-off-by: Mykola Golub <mgolub@suse.com>
Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
2 months agolibrbd/api: assume user namespace for group snapshot
Mykola Golub [Fri, 23 Jul 2021 15:04:48 +0000 (16:04 +0100)]
librbd/api: assume user namespace for group snapshot

when the snapshot is specified by name only

Signed-off-by: Mykola Golub <mgolub@suse.com>
Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
2 months agocls/rbd: add method to unlink image snapshot from group snapshot
Mykola Golub [Thu, 18 Feb 2021 12:41:53 +0000 (12:41 +0000)]
cls/rbd: add method to unlink image snapshot from group snapshot

When no image snapshots are left the group snapshot will be
automatically removed.

Signed-off-by: Mykola Golub <mgolub@suse.com>
Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
2 months agocls/rbd: make possible mirror_image_list filter out group images
Mykola Golub [Tue, 19 Jan 2021 13:48:07 +0000 (13:48 +0000)]
cls/rbd: make possible mirror_image_list filter out group images

Signed-off-by: Mykola Golub <mgolub@suse.com>
Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
2 months agocls/rbd: add async versions of some group functions
Mykola Golub [Fri, 15 Jan 2021 16:23:37 +0000 (16:23 +0000)]
cls/rbd: add async versions of some group functions

Signed-off-by: Mykola Golub <mgolub@suse.com>
Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
2 months agocls/rbd: add group_spec and group_snap_id to mirror snapshot
Mykola Golub [Mon, 7 Dec 2020 10:40:40 +0000 (10:40 +0000)]
cls/rbd: add group_spec and group_snap_id to mirror snapshot

which are going to be used when creating a group mirror snapshot.

Signed-off-by: Mykola Golub <mgolub@suse.com>
Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
2 months agocls/rbd: add mirror group types and methods
Mykola Golub [Sat, 28 Nov 2020 10:14:27 +0000 (10:14 +0000)]
cls/rbd: add mirror group types and methods

Signed-off-by: Mykola Golub <mgolub@suse.com>
Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
2 months agocls/rbd: add group snapshot namespace
Mykola Golub [Sun, 6 Dec 2020 13:12:39 +0000 (13:12 +0000)]
cls/rbd: add group snapshot namespace

Signed-off-by: Mykola Golub <mgolub@suse.com>
Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
2 months agocls/rbd: rename GroupSnapshotNamespace to GroupImageSnapshotNamespace
Mykola Golub [Wed, 23 Jun 2021 16:56:20 +0000 (17:56 +0100)]
cls/rbd: rename GroupSnapshotNamespace to GroupImageSnapshotNamespace

Signed-off-by: Mykola Golub <mgolub@suse.com>
Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
2 months agoMerge pull request #62936 from cbodley/wip-doc-rgw-getobjattrs
Casey Bodley [Thu, 24 Apr 2025 15:35:48 +0000 (11:35 -0400)]
Merge pull request #62936 from cbodley/wip-doc-rgw-getobjattrs

doc/rgw: release note for GetObjectAttributes

Reviewed-by: Adam C. Emerson <aemerson@redhat.com>
Reviewed-by: Anthony D'Atri <anthony.datri@gmail.com>
2 months agoMerge pull request #62845 from rhcs-dashboard/fix-path
Pedro Gonzalez Gomez [Thu, 24 Apr 2025 15:26:18 +0000 (17:26 +0200)]
Merge pull request #62845 from rhcs-dashboard/fix-path

mgr/dashboard: fix smb edit resources

Reviewed-by: Afreen Misbah <afreen@ibm.com>
2 months agoMerge pull request #62715 from cbodley/wip-qa-rgw-no-gc
Casey Bodley [Thu, 24 Apr 2025 14:59:33 +0000 (10:59 -0400)]
Merge pull request #62715 from cbodley/wip-qa-rgw-no-gc

qa/rgw: run verify tests with garbage collection disabled

Reviewed-by: Jane Zhu <jzhu116@bloomberg.net>
2 months agoMerge pull request #62921 from idryomov/wip-71026
Ilya Dryomov [Thu, 24 Apr 2025 14:36:46 +0000 (16:36 +0200)]
Merge pull request #62921 from idryomov/wip-71026

librbd: disallow "rbd trash mv" if image is in a group

Reviewed-by: Ramana Raja <rraja@redhat.com>
2 months agoMerge pull request #62941 from MaxKellermann/mds_Locker__abort
Max Kellermann [Thu, 24 Apr 2025 09:12:12 +0000 (11:12 +0200)]
Merge pull request #62941 from MaxKellermann/mds_Locker__abort

mds/Locker: use ceph_abort_msg() instead of ceph_assert()

Reviewed-by: Venky Shankar <vshankar@redhat.com>
2 months agoMerge pull request #59248 from kamoltat/wip-ksirivad-improve-netsplit-warning
Radoslaw Zarzynski [Thu, 24 Apr 2025 06:17:51 +0000 (08:17 +0200)]
Merge pull request #59248 from kamoltat/wip-ksirivad-improve-netsplit-warning

HealthMonitor: Add topology-aware netsplit detection and warning

Reviewed-by: Anthony D'Atri <anthony.datri@gmail.com>
Reviewed-by: Samuel Just <sjust@redhat.com>
2 months agomds/Locker: use ceph_abort_msg() instead of ceph_assert() 62941/head
Max Kellermann [Thu, 24 Apr 2025 05:17:48 +0000 (07:17 +0200)]
mds/Locker: use ceph_abort_msg() instead of ceph_assert()

This ceph_assert() always fails, but depending on the configuration
value `ceph_assert_supresssions`, execution may continue, but the
`dir` variable is left uninitialized.  This leads to a compiler
warning:

 /home/jenkins-build/build/workspace/ceph-api/src/mds/Locker.cc:451:22: error: variable 'dir' is used uninitialized whenever 'if' condition is false [-Werror,-Wsometimes-uninitialized]

clang then suggests to nullptr-initialize the variable:

 /home/jenkins-build/build/workspace/ceph-api/src/mds/Locker.cc:447:11: note: initialize the variable 'dir' to silence this warning
   447 |         CDir *dir;
       |                  ^
       |                   = nullptr

This, however, is a very bad idea because all this does is suppress
the warning; it still crashes the process.

Since there's no recovery from this problem, let's switch to
ceph_abort_msg() which is [[noreturn]] and the compiler can deduce
that `dir` is always initialized when it's used.

Signed-off-by: Max Kellermann <max.kellermann@ionos.com>
2 months agoMerge pull request #62693 from ronen-fr/wip-rf-iocnt
Ronen Friedman [Thu, 24 Apr 2025 05:17:33 +0000 (08:17 +0300)]
Merge pull request #62693 from ronen-fr/wip-rf-iocnt

osd/scrub: performance counters for I/O performed by the scrubber

Reviewed-by: Alex Ainscow <aainscow@uk.ibm.com>
Reviewed-by: Bill Scales <bill_scales@uk.ibm.com>
Reviewed-by: Samuel Just <sjust@redhat.com>
Reviewed-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
2 months agoMerge pull request #62898 from nbalacha/wip-nbalacha-70963
Ilya Dryomov [Wed, 23 Apr 2025 22:28:52 +0000 (00:28 +0200)]
Merge pull request #62898 from nbalacha/wip-nbalacha-70963

rbd: display mirror state creating

Reviewed-by: Ramana Raja <rraja@redhat.com>
Reviewed-by: Ilya Dryomov <idryomov@gmail.com>
2 months agoMerge pull request #60899 from clwluvw/curl-einval
Casey Bodley [Wed, 23 Apr 2025 22:28:16 +0000 (18:28 -0400)]
Merge pull request #60899 from clwluvw/curl-einval

rgw: handle EINVAL translation in forward_request

Reviewed-by: Casey Bodley <cbodley@redhat.com>
2 months agoMerge pull request #62888 from clwluvw/neorados-fifotrim
Casey Bodley [Wed, 23 Apr 2025 20:42:08 +0000 (16:42 -0400)]
Merge pull request #62888 from clwluvw/neorados-fifotrim

neorados: relax fifo trim error for ENODATA

Reviewed-by: Adam C. Emerson <aemerson@redhat.com>
2 months agodoc/rgw: release note for GetObjectAttributes 62936/head
Casey Bodley [Wed, 23 Apr 2025 19:06:19 +0000 (15:06 -0400)]
doc/rgw: release note for GetObjectAttributes

Signed-off-by: Casey Bodley <cbodley@redhat.com>
2 months agoMerge pull request #62902 from cbodley/wip-70700-disable
Casey Bodley [Wed, 23 Apr 2025 18:46:59 +0000 (14:46 -0400)]
Merge pull request #62902 from cbodley/wip-70700-disable

cmake/common: temporarily remove decode_start_v_checker tests

Reviewed-by: Dan Mick <dmick@redhat.com>
Reviewed-by: Laura Flores <lflores@redhat.com>
2 months agoMerge pull request #60227 from clwluvw/zonegroup-delbucket
Casey Bodley [Wed, 23 Apr 2025 18:02:16 +0000 (14:02 -0400)]
Merge pull request #60227 from clwluvw/zonegroup-delbucket

rgw: skip empty check on non-owned buckets by zonegroup

Reviewed-by: Casey Bodley <cbodley@redhat.com>
Reviewed-by: Anthony D'Atri <anthony.datri@gmail.com>
2 months agoMerge pull request #62738 from clwluvw/copy-obj-remote-zonegroup
Casey Bodley [Wed, 23 Apr 2025 18:00:56 +0000 (14:00 -0400)]
Merge pull request #62738 from clwluvw/copy-obj-remote-zonegroup

rgw: dont store replication attrs on remote copy obj

Reviewed-by: Casey Bodley <cbodley@redhat.com>
2 months agoosd/scrub: count scrub I/O 62693/head
Ronen Friedman [Tue, 15 Apr 2025 08:34:06 +0000 (03:34 -0500)]
osd/scrub: count scrub I/O

Implement I/O counting in the PGBackend::be_scan_list()
and relevant functions it calls.

Signed-off-by: Ronen Friedman <rfriedma@redhat.com>
2 months agoMerge pull request #62699 from Matan-B/wip-matanb-crimson-ignore-abort-v2
Matan Breizman [Wed, 23 Apr 2025 15:35:28 +0000 (18:35 +0300)]
Merge pull request #62699 from Matan-B/wip-matanb-crimson-ignore-abort-v2

crimson/common/errorator: rework aborts error handlers

Reviewed-by: Yingxin Cheng <yingxin.cheng@intel.com>
2 months agoMerge pull request #62556 from aainscow/ec_pr_and_prereqs
Radoslaw Zarzynski [Wed, 23 Apr 2025 15:19:31 +0000 (17:19 +0200)]
Merge pull request #62556 from aainscow/ec_pr_and_prereqs

osd: Optimised EC

Reviewed-by: Radoslaw Zarzynski <rzarzynski@redhat.com>
Reviewed-by: Laura Flores <lflores@redhat.com>