Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save ideepika/4e10d4e74383bc8091a033a837893608 to your computer and use it in GitHub Desktop.
Save ideepika/4e10d4e74383bc8091a033a837893608 to your computer and use it in GitHub Desktop.
todo mirror:
improve rbd mirror stats
add notification queue in CLusterWatcher.cc
make pool replayer async

Mirror.cc: init, run, appropriate handling of mirrors
threading
poolpeers, metacache, adminsock hook, 

init() -> ClusterWatcher []  
refresh pools -> get peers from pool
mirror_mode_get (key omap as result in o/p bl) 
store peer info info in monitor config key store [ prefix+poolid+mirror_id ]
peer_mirror types: primary, orphan, nonprimary, disabled
ServiceDaemon:(which service is handling rbd mirror) pool, namespace, callout add and remove
add the pool, update status, update attribute
mirror::run() -> refresh pool, replayers(pool per and site name) 
update_pool_replayer() -> blocklist, updated site name, error ==> shutdown, inti
PoolReplayer -> actually does replication -> has its own thread, connects to
rados local pool first -> ceph cct for remote and local
pool_poller ->> get_mirror_uuid(async) -> decode with get_finish ->
schedule_task for pool -> mirror_ping
RemotePoolPollerListener -> update meta lcoal and remote
pool replayer thread 
(pool -> namespace -> image)
pool_replayer::run  -> admin_socket (tracks with daemon locally and interact
with it in linux at low level) -> check namespace replayer, blocklisted [
continues to run in refresh interval ] 
namespace_replayer -> ctx, uuid, meta, throttler, thread, handler, serviedaemon

read about thread pool

extras:
objectclass: for ondisk state metadata
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment