OPTION(rbd_mirror_journal_max_fetch_bytes, OPT_U32, 32768) // maximum bytes to read from each journal data object per fetch
OPTION(rbd_mirror_sync_point_update_age, OPT_DOUBLE, 30) // number of seconds between each update of the image sync point object number
OPTION(rbd_mirror_concurrent_image_syncs, OPT_U32, 5) // maximum number of image syncs in parallel
+OPTION(rbd_mirror_pool_replayers_refresh_interval, OPT_INT, 30) // interval to refresh peers in rbd-mirror daemon
+OPTION(rbd_mirror_delete_retry_interval, OPT_DOUBLE, 30) // interval to check and retry the failed requests in deleter
+OPTION(rbd_mirror_image_directory_refresh_interval, OPT_INT, 30) // interval to refresh images in pool watcher
+OPTION(rbd_mirror_image_state_check_interval, OPT_INT, 30) // interval to get images from pool watcher and set sources in replayer
OPTION(nss_db_path, OPT_STR, "") // path to nss db
m_failed_timer_lock(timer_lock),
m_asok_hook(new ImageDeleterAdminSocketHook(g_ceph_context, this))
{
+ set_failed_timer_interval(g_ceph_context->_conf->rbd_mirror_delete_retry_interval);
m_image_deleter_thread.create("image_deleter");
}
ImageDeleterThread m_image_deleter_thread;
std::deque<std::unique_ptr<DeleteInfo>> m_failed_queue;
- // TODO: make interval value configurable
- double m_failed_interval = 30;
+ double m_failed_interval;
SafeTimer *m_failed_timer;
Mutex *m_failed_timer_lock;
#define dout_prefix *_dout << "rbd::mirror::Mirror: " << this << " " \
<< __func__ << ": "
-using std::chrono::seconds;
using std::list;
using std::map;
using std::set;
if (!m_manual_stop) {
update_replayers(m_local_cluster_watcher->get_pool_peers());
}
- // TODO: make interval configurable
- m_cond.WaitInterval(g_ceph_context, m_lock, seconds(30));
+ m_cond.WaitInterval(g_ceph_context, m_lock,
+ utime_t(m_cct->_conf->rbd_mirror_pool_replayers_refresh_interval, 0));
}
// stop all replayers in parallel
// Bootstrap existing mirroring images
init_local_mirroring_images();
- // TODO: make interval configurable
- m_pool_watcher.reset(new PoolWatcher(m_remote_io_ctx, 30, m_lock, m_cond));
+ m_pool_watcher.reset(new PoolWatcher(m_remote_io_ctx,
+ g_ceph_context->_conf->rbd_mirror_image_directory_refresh_interval,
+ m_lock, m_cond));
m_pool_watcher->refresh_images();
m_replayer_thread.create("replayer");
if (m_blacklisted) {
break;
}
- m_cond.WaitInterval(g_ceph_context, m_lock, seconds(30));
+ m_cond.WaitInterval(g_ceph_context, m_lock,
+ utime_t(g_ceph_context->_conf->rbd_mirror_image_state_check_interval, 0));
}
ImageIds empty_sources;