Skip to content

quincy: rbd-mirror: clean up stale pool replayers and callouts better - #57305

Merged
yuriw merged 3 commits into
ceph:quincyfrom
idryomov:wip-65487-quincy
Jul 12, 2024
Merged

yuriw merged 3 commits into
ceph:quincyfrom
idryomov:wip-65487-quincy

Conversation

@idryomov

@idryomov idryomov commented May 7, 2024

Copy link
Copy Markdown
Contributor

idryomov added 2 commits May 7, 2024 10:00
The code in Mirror::update_pool_replayers() responsible for shutting
down and removing stale pool replayers kicks in only in case the peer
is removed, but not if the peer changes.  However, the code responsible
for (re)starting pool replayers in the same method _does_ create and
start a new pool replayer in that case.  As a result, we can end up
with nearly identical pool replayers running at the same time, hogging
OS resources and confusing instance_id tracking logic and mirror status
reporting at the very least.

The root cause is that PeerSpec is matched normally (i.e. based on all
fields) when it comes to m_pool_replayers, and based only on UUID when
it comes to pool_peers.  This was missed in commit 5463e1a
("rbd-mirror: extract optional peer mon_host/key values from MON").

Signed-off-by: Ilya Dryomov <[email protected]>
(cherry picked from commit def93cb)
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 <[email protected]>
(cherry picked from commit b7e7964)
wait_for_replay_complete() doesn't wait for image status to get
updated.  This didn't matter previously because these tests are run on
two different pools and nothing else was following.

Signed-off-by: Ilya Dryomov <[email protected]>
(cherry picked from commit d1d8482)

Conflicts:
	qa/workunits/rbd/rbd_mirror_bootstrap.sh [ commit 3fd8a03
	  ("qa/workunits/rbd: merge journal and snapshot test scripts")
	  not in quincy ]
@idryomov
idryomov force-pushed the wip-65487-quincy branch from 7beadb9 to 952f397 Compare June 3, 2024 09:52
@idryomov

idryomov commented Jun 3, 2024

Copy link
Copy Markdown
Contributor Author

Forgot to adjust for the lack of wait_for_replaying_status_in_pool_dir() helper in quincy.

@yuriw
yuriw merged commit 03b05f6 into ceph:quincy Jul 12, 2024
@idryomov
idryomov deleted the wip-65487-quincy branch July 12, 2024 20:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants