template <typename I>
void ImageReplayer<I>::prepare_local_image() {
- dout(20) << dendl;
+ dout(10) << dendl;
m_local_image_id = "";
Context *ctx = create_context_callback<
template <typename I>
void ImageReplayer<I>::handle_prepare_local_image(int r) {
- dout(20) << "r=" << r << dendl;
+ dout(10) << "r=" << r << dendl;
if (r == -ENOENT) {
- dout(20) << "local image does not exist" << dendl;
+ dout(10) << "local image does not exist" << dendl;
} else if (r < 0) {
on_start_fail(r, "error preparing local image for replay");
return;
template <typename I>
void ImageReplayer<I>::prepare_remote_image() {
- dout(20) << dendl;
+ dout(10) << dendl;
if (m_peers.empty()) {
// technically nothing to bootstrap, but it handles the status update
bootstrap();
template <typename I>
void ImageReplayer<I>::handle_prepare_remote_image(int r) {
- dout(20) << "r=" << r << dendl;
+ dout(10) << "r=" << r << dendl;
assert(r < 0 ? m_remote_journaler == nullptr : m_remote_journaler != nullptr);
if (r < 0 && !m_local_image_id.empty() &&
m_local_image_tag_owner == librbd::Journal<>::LOCAL_MIRROR_UUID) {
// local image is primary -- fall-through
} else if (r == -ENOENT) {
- dout(20) << "remote image does not exist" << dendl;
+ dout(10) << "remote image does not exist" << dendl;
// TODO need to support multiple remote images
if (m_remote_image.image_id.empty() && !m_local_image_id.empty() &&
template <typename I>
void ImageReplayer<I>::bootstrap() {
- dout(20) << dendl;
+ dout(10) << dendl;
if (!m_local_image_id.empty() &&
m_local_image_tag_owner == librbd::Journal<>::LOCAL_MIRROR_UUID) {
template <typename I>
void ImageReplayer<I>::handle_bootstrap(int r) {
- dout(20) << "r=" << r << dendl;
+ dout(10) << "r=" << r << dendl;
{
Mutex::Locker locker(m_lock);
m_bootstrap_request->put();
template <typename I>
void ImageReplayer<I>::init_remote_journaler() {
- dout(20) << dendl;
+ dout(10) << dendl;
Context *ctx = create_context_callback<
ImageReplayer, &ImageReplayer<I>::handle_init_remote_journaler>(this);
template <typename I>
void ImageReplayer<I>::handle_init_remote_journaler(int r) {
- dout(20) << "r=" << r << dendl;
+ dout(10) << "r=" << r << dendl;
if (r < 0) {
derr << "failed to initialize remote journal: " << cpp_strerror(r) << dendl;
template <typename I>
void ImageReplayer<I>::start_replay() {
- dout(20) << dendl;
+ dout(10) << dendl;
Context *start_ctx = create_context_callback<
ImageReplayer, &ImageReplayer<I>::handle_start_replay>(this);
template <typename I>
void ImageReplayer<I>::handle_start_replay(int r) {
- dout(20) << "r=" << r << dendl;
+ dout(10) << "r=" << r << dendl;
if (r < 0) {
assert(m_local_replay == nullptr);
m_replay_handler = new ReplayHandler<I>(this);
m_remote_journaler->start_live_replay(m_replay_handler, poll_seconds);
- dout(20) << "m_remote_journaler=" << *m_remote_journaler << dendl;
+ dout(10) << "m_remote_journaler=" << *m_remote_journaler << dendl;
}
dout(20) << "start succeeded" << dendl;
template <typename I>
void ImageReplayer<I>::get_remote_tag() {
- dout(20) << "tag_tid: " << m_replay_tag_tid << dendl;
+ dout(15) << "tag_tid: " << m_replay_tag_tid << dendl;
Context *ctx = create_context_callback<
ImageReplayer, &ImageReplayer<I>::handle_get_remote_tag>(this);
template <typename I>
void ImageReplayer<I>::handle_get_remote_tag(int r) {
- dout(20) << "r=" << r << dendl;
+ dout(15) << "r=" << r << dendl;
if (r == 0) {
try {
}
m_replay_tag_valid = true;
- dout(20) << "decoded remote tag " << m_replay_tag_tid << ": "
+ dout(15) << "decoded remote tag " << m_replay_tag_tid << ": "
<< m_replay_tag_data << dendl;
allocate_local_tag();
status.state = *mirror_image_status_state;
}
- dout(20) << "status=" << status << dendl;
+ dout(15) << "status=" << status << dendl;
librados::ObjectWriteOperation op;
librbd::cls_client::mirror_image_status_set(&op, m_global_image_id, status);
template <typename I>
void ImageReplayer<I>::handle_mirror_status_update(int r) {
- dout(20) << "r=" << r << dendl;
+ dout(15) << "r=" << r << dendl;
bool running = false;
bool started = false;
template <typename I>
void ImageReplayer<I>::shut_down(int r) {
- dout(20) << "r=" << r << dendl;
+ dout(10) << "r=" << r << dendl;
bool canceled_delayed_preprocess_task = false;
{
return;
}
- dout(20) << "stop complete" << dendl;
+ dout(10) << "stop complete" << dendl;
ReplayStatusFormatter<I>::destroy(m_replay_status_formatter);
m_replay_status_formatter = nullptr;
void ImageSync<I>::cancel() {
Mutex::Locker locker(m_lock);
- dout(20) << dendl;
+ dout(10) << dendl;
m_canceled = true;
void ImageSync<I>::send_notify_sync_request() {
update_progress("NOTIFY_SYNC_REQUEST");
- dout(20) << dendl;
+ dout(10) << dendl;
Context *ctx = create_context_callback<
ImageSync<I>, &ImageSync<I>::handle_notify_sync_request>(this);
template <typename I>
void ImageSync<I>::handle_notify_sync_request(int r) {
- dout(20) << ": r=" << r << dendl;
+ dout(10) << ": r=" << r << dendl;
if (r < 0) {
BaseRequest::finish(r);
return;
}
- dout(20) << dendl;
+ dout(10) << dendl;
// prune will remove sync points with missing snapshots and
// ensure we have a maximum of one sync point (in case we
template <typename I>
void ImageSync<I>::handle_prune_catch_up_sync_point(int r) {
- dout(20) << ": r=" << r << dendl;
+ dout(10) << ": r=" << r << dendl;
if (r < 0) {
derr << ": failed to prune catch-up sync point: "
return;
}
- dout(20) << dendl;
+ dout(10) << dendl;
Context *ctx = create_context_callback<
ImageSync<I>, &ImageSync<I>::handle_create_sync_point>(this);
template <typename I>
void ImageSync<I>::handle_create_sync_point(int r) {
- dout(20) << ": r=" << r << dendl;
+ dout(10) << ": r=" << r << dendl;
if (r < 0) {
derr << ": failed to create sync point: " << cpp_strerror(r)
return;
}
- dout(20) << dendl;
+ dout(10) << dendl;
Context *ctx = create_context_callback<
ImageSync<I>, &ImageSync<I>::handle_copy_image>(this);
template <typename I>
void ImageSync<I>::handle_copy_image(int r) {
- dout(20) << ": r=" << r << dendl;
+ dout(10) << ": r=" << r << dendl;
{
Mutex::Locker timer_locker(*m_timer_lock);
sync_point->object_number = boost::none;
}
- dout(20) << ": sync_point=" << *sync_point << dendl;
+ dout(10) << ": sync_point=" << *sync_point << dendl;
bufferlist client_data_bl;
librbd::journal::ClientData client_data(*m_client_meta);
template <typename I>
void ImageSync<I>::handle_flush_sync_point(int r) {
- dout(20) << ": r=" << r << dendl;
+ dout(10) << ": r=" << r << dendl;
if (r < 0) {
*m_client_meta = m_client_meta_copy;
template <typename I>
void ImageSync<I>::send_prune_sync_points() {
- dout(20) << dendl;
+ dout(10) << dendl;
update_progress("PRUNE_SYNC_POINTS");
template <typename I>
void ImageSync<I>::handle_prune_sync_points(int r) {
- dout(20) << ": r=" << r << dendl;
+ dout(10) << ": r=" << r << dendl;
if (r < 0) {
derr << ": failed to prune sync point: "
template <typename I>
void InstanceReplayer<I>::init(Context *on_finish) {
- dout(20) << dendl;
+ dout(10) << dendl;
Context *ctx = new FunctionContext(
[this, on_finish] (int r) {
template <typename I>
void InstanceReplayer<I>::shut_down(Context *on_finish) {
- dout(20) << dendl;
+ dout(10) << dendl;
Mutex::Locker locker(m_lock);
template <typename I>
void InstanceReplayer<I>::add_peer(std::string peer_uuid,
librados::IoCtx io_ctx) {
- dout(20) << peer_uuid << dendl;
+ dout(10) << peer_uuid << dendl;
Mutex::Locker locker(m_lock);
auto result = m_peers.insert(Peer(peer_uuid, io_ctx)).second;
template <typename I>
void InstanceReplayer<I>::release_all(Context *on_finish) {
- dout(20) << dendl;
+ dout(10) << dendl;
Mutex::Locker locker(m_lock);
void InstanceReplayer<I>::acquire_image(InstanceWatcher<I> *instance_watcher,
const std::string &global_image_id,
Context *on_finish) {
- dout(20) << "global_image_id=" << global_image_id << dendl;
+ dout(10) << "global_image_id=" << global_image_id << dendl;
Mutex::Locker locker(m_lock);
m_threads, instance_watcher, m_local_rados,
m_local_mirror_uuid, m_local_pool_id, global_image_id);
- dout(20) << global_image_id << ": creating replayer " << image_replayer
+ dout(10) << global_image_id << ": creating replayer " << image_replayer
<< dendl;
it = m_image_replayers.insert(std::make_pair(global_image_id,
template <typename I>
void InstanceReplayer<I>::release_image(const std::string &global_image_id,
Context *on_finish) {
- dout(20) << "global_image_id=" << global_image_id << dendl;
+ dout(10) << "global_image_id=" << global_image_id << dendl;
Mutex::Locker locker(m_lock);
assert(m_on_shut_down == nullptr);
auto it = m_image_replayers.find(global_image_id);
if (it == m_image_replayers.end()) {
- dout(20) << global_image_id << ": not found" << dendl;
+ dout(5) << global_image_id << ": not found" << dendl;
m_threads->work_queue->queue(on_finish, 0);
return;
}
void InstanceReplayer<I>::remove_peer_image(const std::string &global_image_id,
const std::string &peer_mirror_uuid,
Context *on_finish) {
- dout(20) << "global_image_id=" << global_image_id << ", "
+ dout(10) << "global_image_id=" << global_image_id << ", "
<< "peer_mirror_uuid=" << peer_mirror_uuid << dendl;
Mutex::Locker locker(m_lock);
template <typename I>
void InstanceReplayer<I>::print_status(Formatter *f, stringstream *ss) {
- dout(20) << dendl;
+ dout(10) << dendl;
if (!f) {
return;
template <typename I>
void InstanceReplayer<I>::start()
{
- dout(20) << dendl;
+ dout(10) << dendl;
Mutex::Locker locker(m_lock);
template <typename I>
void InstanceReplayer<I>::stop()
{
- dout(20) << dendl;
+ dout(10) << dendl;
Mutex::Locker locker(m_lock);
template <typename I>
void InstanceReplayer<I>::restart()
{
- dout(20) << dendl;
+ dout(10) << dendl;
Mutex::Locker locker(m_lock);
template <typename I>
void InstanceReplayer<I>::flush()
{
- dout(20) << "enter" << dendl;
+ dout(10) << dendl;
Mutex::Locker locker(m_lock);
assert(m_lock.is_locked());
std::string global_image_id = image_replayer->get_global_image_id();
- dout(20) << "global_image_id=" << global_image_id << dendl;
+ dout(10) << "global_image_id=" << global_image_id << dendl;
if (!image_replayer->is_stopped()) {
return;
template <typename I>
void InstanceReplayer<I>::queue_start_image_replayers() {
- dout(20) << dendl;
+ dout(10) << dendl;
Context *ctx = create_context_callback<
InstanceReplayer, &InstanceReplayer<I>::start_image_replayers>(this);
template <typename I>
void InstanceReplayer<I>::start_image_replayers(int r) {
- dout(20) << dendl;
+ dout(10) << dendl;
Mutex::Locker locker(m_lock);
if (m_on_shut_down != nullptr) {
template <typename I>
void InstanceReplayer<I>::stop_image_replayer(ImageReplayer<I> *image_replayer,
Context *on_finish) {
- dout(20) << image_replayer << " global_image_id="
+ dout(10) << image_replayer << " global_image_id="
<< image_replayer->get_global_image_id() << ", on_finish="
<< on_finish << dendl;
image_replayer->stop(ctx, false);
} else {
int after = 1;
- dout(20) << "scheduling image replayer " << image_replayer << " stop after "
+ dout(10) << "scheduling image replayer " << image_replayer << " stop after "
<< after << " sec (task " << ctx << ")" << dendl;
ctx = new FunctionContext(
[this, after, ctx] (int r) {
template <typename I>
void InstanceReplayer<I>::wait_for_ops() {
- dout(20) << dendl;
+ dout(10) << dendl;
Context *ctx = create_context_callback<
InstanceReplayer, &InstanceReplayer<I>::handle_wait_for_ops>(this);
template <typename I>
void InstanceReplayer<I>::handle_wait_for_ops(int r) {
- dout(20) << "r=" << r << dendl;
+ dout(10) << "r=" << r << dendl;
assert(r == 0);
template <typename I>
void InstanceReplayer<I>::stop_image_replayers() {
- dout(20) << dendl;
+ dout(10) << dendl;
assert(m_lock.is_locked());
template <typename I>
void InstanceReplayer<I>::handle_stop_image_replayers(int r) {
- dout(20) << "r=" << r << dendl;
+ dout(10) << "r=" << r << dendl;
assert(r == 0);
return;
}
- dout(20) << m_image_state_check_task << dendl;
+ dout(10) << m_image_state_check_task << dendl;
bool canceled = m_threads->timer->cancel_event(m_image_state_check_task);
assert(canceled);
m_image_state_check_task = nullptr;
int after = g_ceph_context->_conf->get_val<int64_t>(
"rbd_mirror_image_state_check_interval");
- dout(20) << "scheduling image state check after " << after << " sec (task "
+ dout(10) << "scheduling image state check after " << after << " sec (task "
<< m_image_state_check_task << ")" << dendl;
m_threads->timer->add_event_after(after, m_image_state_check_task);
}
}
void finish(int r) override {
- dout(20) << "C_GetInstances: " << this << " " << __func__ << ": r=" << r
+ dout(10) << "C_GetInstances: " << this << " " << __func__ << ": r=" << r
<< dendl;
if (r == 0) {
}
void send() {
- dout(20) << "C_RemoveInstanceRequest: " << this << " " << __func__ << dendl;
+ dout(10) << "C_RemoveInstanceRequest: " << this << " " << __func__ << dendl;
instance_watcher.remove(this);
}
void finish(int r) override {
- dout(20) << "C_RemoveInstanceRequest: " << this << " " << __func__ << ": r="
+ dout(10) << "C_RemoveInstanceRequest: " << this << " " << __func__ << ": r="
<< r << dendl;
assert(r == 0);
: instance_watcher(instance_watcher), instance_id(instance_id),
request_id(request_id), bl(bl), on_finish(on_finish),
send_to_leader(instance_id.empty()) {
- dout(20) << "C_NotifyInstanceRequest: " << this << " " << __func__
+ dout(10) << "C_NotifyInstanceRequest: " << this << " " << __func__
<< ": instance_watcher=" << instance_watcher << ", instance_id="
<< instance_id << ", request_id=" << request_id << dendl;
}
void send() {
- dout(20) << "C_NotifyInstanceRequest: " << this << " " << __func__ << dendl;
+ dout(10) << "C_NotifyInstanceRequest: " << this << " " << __func__ << dendl;
assert(instance_watcher->m_lock.is_locked());
if (canceling) {
- dout(20) << "C_NotifyInstanceRequest: " << this << " " << __func__
+ dout(10) << "C_NotifyInstanceRequest: " << this << " " << __func__
<< ": canceling" << dendl;
instance_watcher->m_work_queue->queue(this, -ECANCELED);
return;
if (send_to_leader) {
if (instance_watcher->m_leader_instance_id.empty()) {
- dout(20) << "C_NotifyInstanceRequest: " << this << " " << __func__
+ dout(10) << "C_NotifyInstanceRequest: " << this << " " << __func__
<< ": suspending" << dendl;
instance_watcher->suspend_notify_request(this);
return;
}
}
- dout(20) << "C_NotifyInstanceRequest: " << this << " " << __func__
+ dout(10) << "C_NotifyInstanceRequest: " << this << " " << __func__
<< ": sending to " << instance_id << dendl;
notifier->notify(bl, &response, this);
}
void cancel() {
- dout(20) << "C_NotifyInstanceRequest: " << this << " " << __func__ << dendl;
+ dout(10) << "C_NotifyInstanceRequest: " << this << " " << __func__ << dendl;
assert(instance_watcher->m_lock.is_locked());
}
void finish(int r) override {
- dout(20) << "C_NotifyInstanceRequest: " << this << " " << __func__ << ": r="
+ dout(10) << "C_NotifyInstanceRequest: " << this << " " << __func__ << ": r="
<< r << dendl;
if (r == 0 || r == -ETIMEDOUT) {
for (auto &it : response.acks) {
auto &bl = it.second;
if (it.second.length() == 0) {
- dout(20) << "C_NotifyInstanceRequest: " << this << " " << __func__
- << ": no payload in ack, ignoring" << dendl;
+ dout(5) << "C_NotifyInstanceRequest: " << this << " " << __func__
+ << ": no payload in ack, ignoring" << dendl;
continue;
}
try {
const std::string &sync_id, Context *on_start)
: instance_watcher(instance_watcher), sync_id(sync_id),
on_start(on_start) {
- dout(20) << "C_SyncRequest: " << this << " " << __func__ << ": sync_id="
+ dout(10) << "C_SyncRequest: " << this << " " << __func__ << ": sync_id="
<< sync_id << dendl;
}
void finish(int r) override {
- dout(20) << "C_SyncRequest: " << this << " " << __func__ << ": r="
+ dout(10) << "C_SyncRequest: " << this << " " << __func__ << ": r="
<< r << dendl;
if (on_start != nullptr) {
template <typename I>
void InstanceWatcher<I>::init(Context *on_finish) {
- dout(20) << "instance_id=" << m_instance_id << dendl;
+ dout(10) << "instance_id=" << m_instance_id << dendl;
Mutex::Locker locker(m_lock);
template <typename I>
void InstanceWatcher<I>::shut_down(Context *on_finish) {
- dout(20) << dendl;
+ dout(10) << dendl;
Mutex::Locker locker(m_lock);
template <typename I>
void InstanceWatcher<I>::remove(Context *on_finish) {
- dout(20) << dendl;
+ dout(10) << dendl;
Mutex::Locker locker(m_lock);
void InstanceWatcher<I>::notify_image_acquire(
const std::string &instance_id, const std::string &global_image_id,
Context *on_notify_ack) {
- dout(20) << "instance_id=" << instance_id << ", global_image_id="
+ dout(10) << "instance_id=" << instance_id << ", global_image_id="
<< global_image_id << dendl;
Mutex::Locker locker(m_lock);
void InstanceWatcher<I>::notify_image_release(
const std::string &instance_id, const std::string &global_image_id,
Context *on_notify_ack) {
- dout(20) << "instance_id=" << instance_id << ", global_image_id="
+ dout(10) << "instance_id=" << instance_id << ", global_image_id="
<< global_image_id << dendl;
Mutex::Locker locker(m_lock);
void InstanceWatcher<I>::notify_peer_image_removed(
const std::string &instance_id, const std::string &global_image_id,
const std::string &peer_mirror_uuid, Context *on_notify_ack) {
- dout(20) << "instance_id=" << instance_id << ", "
+ dout(10) << "instance_id=" << instance_id << ", "
<< "global_image_id=" << global_image_id << ", "
<< "peer_mirror_uuid=" << peer_mirror_uuid << dendl;
template <typename I>
void InstanceWatcher<I>::notify_sync_request(const std::string &sync_id,
Context *on_sync_start) {
- dout(20) << "sync_id=" << sync_id << dendl;
+ dout(10) << "sync_id=" << sync_id << dendl;
Mutex::Locker locker(m_lock);
template <typename I>
bool InstanceWatcher<I>::cancel_sync_request(const std::string &sync_id) {
- dout(20) << "sync_id=" << sync_id << dendl;
+ dout(10) << "sync_id=" << sync_id << dendl;
Mutex::Locker locker(m_lock);
template <typename I>
void InstanceWatcher<I>::notify_sync_start(const std::string &instance_id,
const std::string &sync_id) {
- dout(20) << "sync_id=" << sync_id << dendl;
+ dout(10) << "sync_id=" << sync_id << dendl;
Mutex::Locker locker(m_lock);
auto ctx = new FunctionContext(
[this, sync_id] (int r) {
- dout(20) << "finish: sync_id=" << sync_id << ", r=" << r << dendl;
+ dout(10) << "finish: sync_id=" << sync_id << ", r=" << r << dendl;
Mutex::Locker locker(m_lock);
if (r != -ESTALE && m_image_sync_throttler != nullptr) {
m_image_sync_throttler->finish_op(sync_id);
template <typename I>
void InstanceWatcher<I>::notify_sync_complete(const std::string &sync_id) {
- dout(20) << "sync_id=" << sync_id << dendl;
+ dout(10) << "sync_id=" << sync_id << dendl;
Mutex::Locker locker(m_lock);
template <typename I>
void InstanceWatcher<I>::handle_notify_sync_request(C_SyncRequest *sync_ctx,
int r) {
- dout(20) << "sync_id=" << sync_ctx->sync_id << ", r=" << r << dendl;
+ dout(10) << "sync_id=" << sync_ctx->sync_id << ", r=" << r << dendl;
Context *on_start = nullptr;
{
template <typename I>
void InstanceWatcher<I>::handle_notify_sync_complete(C_SyncRequest *sync_ctx,
int r) {
- dout(20) << "sync_id=" << sync_ctx->sync_id << ", r=" << r << dendl;
+ dout(10) << "sync_id=" << sync_ctx->sync_id << ", r=" << r << dendl;
if (sync_ctx->on_complete != nullptr) {
sync_ctx->on_complete->complete(r);
template <typename I>
void InstanceWatcher<I>::print_sync_status(Formatter *f, stringstream *ss) {
- dout(20) << dendl;
+ dout(10) << dendl;
Mutex::Locker locker(m_lock);
if (m_image_sync_throttler != nullptr) {
template <typename I>
void InstanceWatcher<I>::handle_acquire_leader() {
- dout(20) << dendl;
+ dout(10) << dendl;
Mutex::Locker locker(m_lock);
template <typename I>
void InstanceWatcher<I>::handle_release_leader() {
- dout(20) << dendl;
+ dout(10) << dendl;
Mutex::Locker locker(m_lock);
template <typename I>
void InstanceWatcher<I>::handle_update_leader(
const std::string &leader_instance_id) {
- dout(20) << "leader_instance_id=" << leader_instance_id << dendl;
+ dout(10) << "leader_instance_id=" << leader_instance_id << dendl;
Mutex::Locker locker(m_lock);
template <typename I>
void InstanceWatcher<I>::cancel_notify_requests(
const std::string &instance_id) {
- dout(20) << "instance_id=" << instance_id << dendl;
+ dout(10) << "instance_id=" << instance_id << dendl;
Mutex::Locker locker(m_lock);
void InstanceWatcher<I>::register_instance() {
assert(m_lock.is_locked());
- dout(20) << dendl;
+ dout(10) << dendl;
librados::ObjectWriteOperation op;
librbd::cls_client::mirror_instances_add(&op, m_instance_id);
template <typename I>
void InstanceWatcher<I>::handle_register_instance(int r) {
- dout(20) << "r=" << r << dendl;
+ dout(10) << "r=" << r << dendl;
Context *on_finish = nullptr;
{
template <typename I>
void InstanceWatcher<I>::create_instance_object() {
- dout(20) << dendl;
+ dout(10) << dendl;
assert(m_lock.is_locked());
template <typename I>
void InstanceWatcher<I>::handle_create_instance_object(int r) {
- dout(20) << "r=" << r << dendl;
+ dout(10) << "r=" << r << dendl;
Mutex::Locker locker(m_lock);
template <typename I>
void InstanceWatcher<I>::register_watch() {
- dout(20) << dendl;
+ dout(10) << dendl;
assert(m_lock.is_locked());
template <typename I>
void InstanceWatcher<I>::handle_register_watch(int r) {
- dout(20) << "r=" << r << dendl;
+ dout(10) << "r=" << r << dendl;
Mutex::Locker locker(m_lock);
template <typename I>
void InstanceWatcher<I>::acquire_lock() {
- dout(20) << dendl;
+ dout(10) << dendl;
assert(m_lock.is_locked());
template <typename I>
void InstanceWatcher<I>::handle_acquire_lock(int r) {
- dout(20) << "r=" << r << dendl;
+ dout(10) << "r=" << r << dendl;
Context *on_finish = nullptr;
{
template <typename I>
void InstanceWatcher<I>::release_lock() {
- dout(20) << dendl;
+ dout(10) << dendl;
assert(m_lock.is_locked());
template <typename I>
void InstanceWatcher<I>::handle_release_lock(int r) {
- dout(20) << "r=" << r << dendl;
+ dout(10) << "r=" << r << dendl;
Mutex::Locker locker(m_lock);
template <typename I>
void InstanceWatcher<I>::unregister_watch() {
- dout(20) << dendl;
+ dout(10) << dendl;
assert(m_lock.is_locked());
template <typename I>
void InstanceWatcher<I>::handle_unregister_watch(int r) {
- dout(20) << "r=" << r << dendl;
+ dout(10) << "r=" << r << dendl;
if (r < 0) {
derr << "error unregistering instance watcher for " << m_oid << " object: "
void InstanceWatcher<I>::remove_instance_object() {
assert(m_lock.is_locked());
- dout(20) << dendl;
+ dout(10) << dendl;
librados::ObjectWriteOperation op;
op.remove();
template <typename I>
void InstanceWatcher<I>::handle_remove_instance_object(int r) {
- dout(20) << "r=" << r << dendl;
+ dout(10) << "r=" << r << dendl;
if (m_removing && r == -ENOENT) {
r = 0;
template <typename I>
void InstanceWatcher<I>::unregister_instance() {
- dout(20) << dendl;
+ dout(10) << dendl;
assert(m_lock.is_locked());
template <typename I>
void InstanceWatcher<I>::handle_unregister_instance(int r) {
- dout(20) << "r=" << r << dendl;
+ dout(10) << "r=" << r << dendl;
if (r < 0) {
derr << "error unregistering instance: " << cpp_strerror(r) << dendl;
template <typename I>
void InstanceWatcher<I>::wait_for_notify_ops() {
- dout(20) << dendl;
+ dout(10) << dendl;
assert(m_lock.is_locked());
template <typename I>
void InstanceWatcher<I>::handle_wait_for_notify_ops(int r) {
- dout(20) << "r=" << r << dendl;
+ dout(10) << "r=" << r << dendl;
assert(r == 0);
template <typename I>
void InstanceWatcher<I>::get_instance_locker() {
- dout(20) << dendl;
+ dout(10) << dendl;
assert(m_lock.is_locked());
template <typename I>
void InstanceWatcher<I>::handle_get_instance_locker(int r) {
- dout(20) << "r=" << r << dendl;
+ dout(10) << "r=" << r << dendl;
Mutex::Locker locker(m_lock);
template <typename I>
void InstanceWatcher<I>::break_instance_lock() {
- dout(20) << dendl;
+ dout(10) << dendl;
assert(m_lock.is_locked());
template <typename I>
void InstanceWatcher<I>::handle_break_instance_lock(int r) {
- dout(20) << "r=" << r << dendl;
+ dout(10) << "r=" << r << dendl;
Mutex::Locker locker(m_lock);
template <typename I>
void InstanceWatcher<I>::suspend_notify_request(C_NotifyInstanceRequest *req) {
- dout(20) << req << dendl;
+ dout(10) << req << dendl;
assert(m_lock.is_locked());
template <typename I>
bool InstanceWatcher<I>::unsuspend_notify_request(
C_NotifyInstanceRequest *req) {
- dout(20) << req << dendl;
+ dout(10) << req << dendl;
assert(m_lock.is_locked());
template <typename I>
void InstanceWatcher<I>::unsuspend_notify_requests() {
- dout(20) << dendl;
+ dout(10) << dendl;
assert(m_lock.is_locked());
Context *InstanceWatcher<I>::prepare_request(const std::string &instance_id,
uint64_t request_id,
C_NotifyAck *on_notify_ack) {
- dout(20) << "instance_id=" << instance_id << ", request_id=" << request_id
+ dout(10) << "instance_id=" << instance_id << ", request_id=" << request_id
<< dendl;
Mutex::Locker locker(m_lock);
auto it = m_requests.find(request);
if (it != m_requests.end()) {
- dout(20) << "duplicate for in-progress request" << dendl;
+ dout(10) << "duplicate for in-progress request" << dendl;
delete it->on_notify_ack;
m_requests.erase(it);
} else {
template <typename I>
void InstanceWatcher<I>::complete_request(const std::string &instance_id,
uint64_t request_id, int r) {
- dout(20) << "instance_id=" << instance_id << ", request_id=" << request_id
+ dout(10) << "instance_id=" << instance_id << ", request_id=" << request_id
<< dendl;
C_NotifyAck *on_notify_ack;
template <typename I>
void InstanceWatcher<I>::handle_notify(uint64_t notify_id, uint64_t handle,
uint64_t notifier_id, bufferlist &bl) {
- dout(20) << "notify_id=" << notify_id << ", handle=" << handle << ", "
+ dout(10) << "notify_id=" << notify_id << ", handle=" << handle << ", "
<< "notifier_id=" << notifier_id << dendl;
auto ctx = new C_NotifyAck(this, notify_id, handle);
template <typename I>
void InstanceWatcher<I>::handle_image_acquire(
const std::string &global_image_id, Context *on_finish) {
- dout(20) << "global_image_id=" << global_image_id << dendl;
+ dout(10) << "global_image_id=" << global_image_id << dendl;
auto ctx = new FunctionContext(
[this, global_image_id, on_finish] (int r) {
template <typename I>
void InstanceWatcher<I>::handle_image_release(
const std::string &global_image_id, Context *on_finish) {
- dout(20) << "global_image_id=" << global_image_id << dendl;
+ dout(10) << "global_image_id=" << global_image_id << dendl;
auto ctx = new FunctionContext(
[this, global_image_id, on_finish] (int r) {
void InstanceWatcher<I>::handle_peer_image_removed(
const std::string &global_image_id, const std::string &peer_mirror_uuid,
Context *on_finish) {
- dout(20) << "global_image_id=" << global_image_id << ", "
+ dout(10) << "global_image_id=" << global_image_id << ", "
<< "peer_mirror_uuid=" << peer_mirror_uuid << dendl;
auto ctx = new FunctionContext(
void InstanceWatcher<I>::handle_sync_request(const std::string &instance_id,
const std::string &sync_id,
Context *on_finish) {
- dout(20) << "instance_id=" << instance_id << ", sync_id=" << sync_id << dendl;
+ dout(10) << "instance_id=" << instance_id << ", sync_id=" << sync_id << dendl;
Mutex::Locker locker(m_lock);
if (m_image_sync_throttler == nullptr) {
- dout(20) << "sync request for non-leader" << dendl;
+ dout(10) << "sync request for non-leader" << dendl;
m_work_queue->queue(on_finish, -ESTALE);
return;
}
Context *on_start = create_async_context_callback(
m_work_queue, new FunctionContext(
[this, instance_id, sync_id, on_finish] (int r) {
- dout(20) << "handle_sync_request: finish: instance_id=" << instance_id
+ dout(10) << "handle_sync_request: finish: instance_id=" << instance_id
<< ", sync_id=" << sync_id << ", r=" << r << dendl;
if (r == 0) {
notify_sync_start(instance_id, sync_id);
void InstanceWatcher<I>::handle_sync_start(const std::string &instance_id,
const std::string &sync_id,
Context *on_finish) {
- dout(20) << "instance_id=" << instance_id << ", sync_id=" << sync_id << dendl;
+ dout(10) << "instance_id=" << instance_id << ", sync_id=" << sync_id << dendl;
Mutex::Locker locker(m_lock);
auto it = m_inflight_sync_reqs.find(sync_id);
if (it == m_inflight_sync_reqs.end()) {
- dout(20) << "not found" << dendl;
+ dout(5) << "not found" << dendl;
m_work_queue->queue(on_finish, 0);
return;
}
auto sync_ctx = it->second;
if (sync_ctx->on_complete != nullptr) {
- dout(20) << "duplicate request" << dendl;
+ dout(5) << "duplicate request" << dendl;
m_work_queue->queue(sync_ctx->on_complete, -ESTALE);
}
void InstanceWatcher<I>::handle_payload(const std::string &instance_id,
const ImageAcquirePayload &payload,
C_NotifyAck *on_notify_ack) {
- dout(20) << "image_acquire: instance_id=" << instance_id << ", "
+ dout(10) << "image_acquire: instance_id=" << instance_id << ", "
<< "request_id=" << payload.request_id << dendl;
auto on_finish = prepare_request(instance_id, payload.request_id,
void InstanceWatcher<I>::handle_payload(const std::string &instance_id,
const ImageReleasePayload &payload,
C_NotifyAck *on_notify_ack) {
- dout(20) << "image_release: instance_id=" << instance_id << ", "
+ dout(10) << "image_release: instance_id=" << instance_id << ", "
<< "request_id=" << payload.request_id << dendl;
auto on_finish = prepare_request(instance_id, payload.request_id,
void InstanceWatcher<I>::handle_payload(const std::string &instance_id,
const PeerImageRemovedPayload &payload,
C_NotifyAck *on_notify_ack) {
- dout(20) << "remove_peer_image: instance_id=" << instance_id << ", "
+ dout(10) << "remove_peer_image: instance_id=" << instance_id << ", "
<< "request_id=" << payload.request_id << dendl;
auto on_finish = prepare_request(instance_id, payload.request_id,
void InstanceWatcher<I>::handle_payload(const std::string &instance_id,
const SyncRequestPayload &payload,
C_NotifyAck *on_notify_ack) {
- dout(20) << "sync_request: instance_id=" << instance_id << ", "
+ dout(10) << "sync_request: instance_id=" << instance_id << ", "
<< "request_id=" << payload.request_id << dendl;
auto on_finish = prepare_request(instance_id, payload.request_id,
void InstanceWatcher<I>::handle_payload(const std::string &instance_id,
const SyncStartPayload &payload,
C_NotifyAck *on_notify_ack) {
- dout(20) << "sync_start: instance_id=" << instance_id << ", "
+ dout(10) << "sync_start: instance_id=" << instance_id << ", "
<< "request_id=" << payload.request_id << dendl;
auto on_finish = prepare_request(instance_id, payload.request_id,
void InstanceWatcher<I>::handle_payload(const std::string &instance_id,
const UnknownPayload &payload,
C_NotifyAck *on_notify_ack) {
- dout(20) << "unknown: instance_id=" << instance_id << dendl;
+ dout(5) << "unknown: instance_id=" << instance_id << dendl;
on_notify_ack->complete(0);
}
template <typename I>
void Instances<I>::init(Context *on_finish) {
- dout(20) << dendl;
+ dout(10) << dendl;
Mutex::Locker locker(m_lock);
assert(m_on_finish == nullptr);
template <typename I>
void Instances<I>::shut_down(Context *on_finish) {
- dout(20) << dendl;
+ dout(10) << dendl;
Mutex::Locker locker(m_lock);
assert(m_on_finish == nullptr);
template <typename I>
void Instances<I>::acked(const InstanceIds& instance_ids) {
- dout(20) << "instance_ids=" << instance_ids << dendl;
+ dout(10) << "instance_ids=" << instance_ids << dendl;
Mutex::Locker locker(m_lock);
if (m_on_finish != nullptr) {
- dout(20) << "received on shut down, ignoring" << dendl;
+ dout(5) << "received on shut down, ignoring" << dendl;
return;
}
Mutex::Locker timer_locker(m_threads->timer_lock);
Mutex::Locker locker(m_lock);
if (m_on_finish != nullptr) {
- dout(20) << "handled on shut down, ignoring" << dendl;
+ dout(5) << "handled on shut down, ignoring" << dendl;
return;
}
template <typename I>
void Instances<I>::get_instances() {
- dout(20) << dendl;
+ dout(10) << dendl;
assert(m_lock.is_locked());
template <typename I>
void Instances<I>::handle_get_instances(int r) {
- dout(20) << "r=" << r << dendl;
+ dout(10) << "r=" << r << dendl;
Context *on_finish = nullptr;
{
template <typename I>
void Instances<I>::wait_for_ops() {
- dout(20) << dendl;
+ dout(10) << dendl;
assert(m_lock.is_locked());
template <typename I>
void Instances<I>::handle_wait_for_ops(int r) {
- dout(20) << "r=" << r << dendl;
+ dout(10) << "r=" << r << dendl;
assert(r == 0);
}
assert(!instance_ids.empty());
- dout(20) << "instance_ids=" << instance_ids << dendl;
+ dout(10) << "instance_ids=" << instance_ids << dendl;
Context* ctx = new FunctionContext([this, instance_ids](int r) {
handle_remove_instances(r, instance_ids);
});
Mutex::Locker timer_locker(m_threads->timer_lock);
Mutex::Locker locker(m_lock);
- dout(20) << "r=" << r << ", instance_ids=" << instance_ids << dendl;
+ dout(10) << "r=" << r << ", instance_ids=" << instance_ids << dendl;
assert(r == 0);
// fire removed notification now that instaces have been blacklisted
return;
}
- dout(20) << dendl;
+ dout(10) << dendl;
bool canceled = m_threads->timer->cancel_event(m_timer_task);
assert(canceled);
void Instances<I>::schedule_remove_task(const utime_t& time) {
cancel_remove_task();
if (m_on_finish != nullptr) {
- dout(20) << "received on shut down, ignoring" << dendl;
+ dout(10) << "received on shut down, ignoring" << dendl;
return;
}
return;
}
- dout(20) << dendl;
+ dout(10) << dendl;
// schedule a time to fire when the oldest instance should be removed
m_timer_task = new FunctionContext(
template <typename I>
void LeaderWatcher<I>::init(Context *on_finish) {
- dout(20) << "notifier_id=" << m_notifier_id << dendl;
+ dout(10) << "notifier_id=" << m_notifier_id << dendl;
Mutex::Locker locker(m_lock);
template <typename I>
void LeaderWatcher<I>::create_leader_object() {
- dout(20) << dendl;
+ dout(10) << dendl;
assert(m_lock.is_locked());
template <typename I>
void LeaderWatcher<I>::handle_create_leader_object(int r) {
- dout(20) << "r=" << r << dendl;
+ dout(10) << "r=" << r << dendl;
Context *on_finish = nullptr;
{
template <typename I>
void LeaderWatcher<I>::register_watch() {
- dout(20) << dendl;
+ dout(10) << dendl;
assert(m_lock.is_locked());
template <typename I>
void LeaderWatcher<I>::handle_register_watch(int r) {
- dout(20) << "r=" << r << dendl;
+ dout(10) << "r=" << r << dendl;
Context *on_finish = nullptr;
if (r < 0) {
template <typename I>
void LeaderWatcher<I>::shut_down(Context *on_finish) {
- dout(20) << dendl;
+ dout(10) << dendl;
Mutex::Locker timer_locker(m_threads->timer_lock);
Mutex::Locker locker(m_lock);
template <typename I>
void LeaderWatcher<I>::shut_down_leader_lock() {
- dout(20) << dendl;
+ dout(10) << dendl;
assert(m_lock.is_locked());
template <typename I>
void LeaderWatcher<I>::handle_shut_down_leader_lock(int r) {
- dout(20) << "r=" << r << dendl;
+ dout(10) << "r=" << r << dendl;
Mutex::Locker locker(m_lock);
template <typename I>
void LeaderWatcher<I>::unregister_watch() {
- dout(20) << dendl;
+ dout(10) << dendl;
assert(m_lock.is_locked());
template <typename I>
void LeaderWatcher<I>::handle_unregister_watch(int r) {
- dout(20) << "r=" << r << dendl;
+ dout(10) << "r=" << r << dendl;
if (r < 0) {
derr << "error unregistering leader watcher for " << m_oid << " object: "
template <typename I>
void LeaderWatcher<I>::wait_for_tasks() {
- dout(20) << dendl;
+ dout(10) << dendl;
Mutex::Locker timer_locker(m_threads->timer_lock);
Mutex::Locker locker(m_lock);
template <typename I>
void LeaderWatcher<I>::handle_wait_for_tasks() {
- dout(20) << dendl;
+ dout(10) << dendl;
assert(m_threads->timer_lock.is_locked());
assert(m_lock.is_locked());
assert(m_lock.is_locked());
bool leader = m_leader_lock->is_leader();
- dout(20) << leader << dendl;
+ dout(10) << leader << dendl;
return leader;
}
assert(m_lock.is_locked());
bool releasing = m_leader_lock->is_releasing_leader();
- dout(20) << releasing << dendl;
+ dout(10) << releasing << dendl;
return releasing;
}
template <typename I>
bool LeaderWatcher<I>::get_leader_instance_id(std::string *instance_id) const {
- dout(20) << dendl;
+ dout(10) << dendl;
Mutex::Locker locker(m_lock);
template <typename I>
void LeaderWatcher<I>::release_leader() {
- dout(20) << dendl;
+ dout(10) << dendl;
Mutex::Locker locker(m_lock);
if (!is_leader(m_lock)) {
template <typename I>
void LeaderWatcher<I>::list_instances(std::vector<std::string> *instance_ids) {
- dout(20) << dendl;
+ dout(10) << dendl;
Mutex::Locker locker(m_lock);
return;
}
- dout(20) << m_timer_task << dendl;
+ dout(10) << m_timer_task << dendl;
bool canceled = m_threads->timer->cancel_event(m_timer_task);
assert(canceled);
m_timer_task = nullptr;
int after = delay_factor * m_cct->_conf->get_val<int64_t>(
"rbd_mirror_leader_heartbeat_interval");
- dout(20) << "scheduling " << name << " after " << after << " sec (task "
+ dout(10) << "scheduling " << name << " after " << after << " sec (task "
<< m_timer_task << ")" << dendl;
m_threads->timer->add_event_after(after, m_timer_task);
}
template <typename I>
void LeaderWatcher<I>::execute_timer_task(bool leader,
TimerCallback timer_callback) {
- dout(20) << dendl;
+ dout(10) << dendl;
assert(m_threads->timer_lock.is_locked());
assert(m_lock.is_locked());
template <typename I>
void LeaderWatcher<I>::handle_post_acquire_leader_lock(int r,
Context *on_finish) {
- dout(20) << "r=" << r << dendl;
+ dout(10) << "r=" << r << dendl;
if (r < 0) {
if (r == -EAGAIN) {
- dout(20) << "already locked" << dendl;
+ dout(10) << "already locked" << dendl;
} else {
derr << "error acquiring leader lock: " << cpp_strerror(r) << dendl;
}
template <typename I>
void LeaderWatcher<I>::handle_pre_release_leader_lock(Context *on_finish) {
- dout(20) << dendl;
+ dout(10) << dendl;
Mutex::Locker locker(m_lock);
assert(m_on_finish == nullptr);
template <typename I>
void LeaderWatcher<I>::handle_post_release_leader_lock(int r,
Context *on_finish) {
- dout(20) << "r=" << r << dendl;
+ dout(10) << "r=" << r << dendl;
if (r < 0) {
on_finish->complete(r);
template <typename I>
void LeaderWatcher<I>::break_leader_lock() {
- dout(20) << dendl;
+ dout(10) << dendl;
assert(m_threads->timer_lock.is_locked());
assert(m_lock.is_locked());
template <typename I>
void LeaderWatcher<I>::handle_break_leader_lock(int r) {
- dout(20) << "r=" << r << dendl;
+ dout(10) << "r=" << r << dendl;
Mutex::Locker timer_locker(m_threads->timer_lock);
Mutex::Locker locker(m_lock);
assert(!m_timer_op_tracker.empty());
if (m_leader_lock->is_shutdown()) {
- dout(20) << "canceling due to shutdown" << dendl;
+ dout(10) << "canceling due to shutdown" << dendl;
m_timer_op_tracker.finish_op();
return;
}
template <typename I>
void LeaderWatcher<I>::schedule_get_locker(bool reset_leader,
uint32_t delay_factor) {
- dout(20) << dendl;
+ dout(10) << dendl;
assert(m_threads->timer_lock.is_locked());
assert(m_lock.is_locked());
template <typename I>
void LeaderWatcher<I>::get_locker() {
- dout(20) << dendl;
+ dout(10) << dendl;
assert(m_threads->timer_lock.is_locked());
assert(m_lock.is_locked());
template <typename I>
void LeaderWatcher<I>::handle_get_locker(int r,
librbd::managed_lock::Locker& locker) {
- dout(20) << "r=" << r << dendl;
+ dout(10) << "r=" << r << dendl;
Mutex::Locker timer_locker(m_threads->timer_lock);
Mutex::Locker mutex_locker(m_lock);
assert(!m_timer_op_tracker.empty());
if (m_leader_lock->is_shutdown()) {
- dout(20) << "canceling due to shutdown" << dendl;
+ dout(10) << "canceling due to shutdown" << dendl;
m_timer_op_tracker.finish_op();
return;
}
template <typename I>
void LeaderWatcher<I>::schedule_acquire_leader_lock(uint32_t delay_factor) {
- dout(20) << dendl;
+ dout(10) << dendl;
assert(m_threads->timer_lock.is_locked());
assert(m_lock.is_locked());
assert(!m_timer_op_tracker.empty());
++m_acquire_attempts;
- dout(20) << "acquire_attempts=" << m_acquire_attempts << dendl;
+ dout(10) << "acquire_attempts=" << m_acquire_attempts << dendl;
Context *ctx = create_async_context_callback(
m_work_queue, create_context_callback<
template <typename I>
void LeaderWatcher<I>::handle_acquire_leader_lock(int r) {
- dout(20) << "r=" << r << dendl;
+ dout(10) << "r=" << r << dendl;
Mutex::Locker timer_locker(m_threads->timer_lock);
Mutex::Locker locker(m_lock);
assert(!m_timer_op_tracker.empty());
if (m_leader_lock->is_shutdown()) {
- dout(20) << "canceling due to shutdown" << dendl;
+ dout(10) << "canceling due to shutdown" << dendl;
m_timer_op_tracker.finish_op();
return;
}
if (r < 0) {
if (r == -EAGAIN) {
- dout(20) << "already locked" << dendl;
+ dout(10) << "already locked" << dendl;
} else {
derr << "error acquiring lock: " << cpp_strerror(r) << dendl;
}
template <typename I>
void LeaderWatcher<I>::release_leader_lock() {
- dout(20) << dendl;
+ dout(10) << dendl;
assert(m_lock.is_locked());
template <typename I>
void LeaderWatcher<I>::handle_release_leader_lock(int r) {
- dout(20) << "r=" << r << dendl;
+ dout(10) << "r=" << r << dendl;
Mutex::Locker timer_locker(m_threads->timer_lock);
Mutex::Locker locker(m_lock);
template <typename I>
void LeaderWatcher<I>::init_status_watcher() {
- dout(20) << dendl;
+ dout(10) << dendl;
assert(m_lock.is_locked());
assert(m_status_watcher == nullptr);
template <typename I>
void LeaderWatcher<I>::handle_init_status_watcher(int r) {
- dout(20) << "r=" << r << dendl;
+ dout(10) << "r=" << r << dendl;
Context *on_finish = nullptr;
{
template <typename I>
void LeaderWatcher<I>::shut_down_status_watcher() {
- dout(20) << dendl;
+ dout(10) << dendl;
assert(m_lock.is_locked());
assert(m_status_watcher != nullptr);
template <typename I>
void LeaderWatcher<I>::handle_shut_down_status_watcher(int r) {
- dout(20) << "r=" << r << dendl;
+ dout(10) << "r=" << r << dendl;
Mutex::Locker locker(m_lock);
m_status_watcher->destroy();
template <typename I>
void LeaderWatcher<I>::init_instances() {
- dout(20) << dendl;
+ dout(10) << dendl;
assert(m_lock.is_locked());
assert(m_instances == nullptr);
template <typename I>
void LeaderWatcher<I>::handle_init_instances(int r) {
- dout(20) << "r=" << r << dendl;
+ dout(10) << "r=" << r << dendl;
Context *on_finish = nullptr;
if (r < 0) {
template <typename I>
void LeaderWatcher<I>::shut_down_instances() {
- dout(20) << dendl;
+ dout(10) << dendl;
assert(m_lock.is_locked());
assert(m_instances != nullptr);
template <typename I>
void LeaderWatcher<I>::handle_shut_down_instances(int r) {
- dout(20) << "r=" << r << dendl;
+ dout(10) << "r=" << r << dendl;
assert(r == 0);
Context *on_finish = nullptr;
template <typename I>
void LeaderWatcher<I>::notify_listener() {
- dout(20) << dendl;
+ dout(10) << dendl;
assert(m_lock.is_locked());
template <typename I>
void LeaderWatcher<I>::handle_notify_listener(int r) {
- dout(20) << "r=" << r << dendl;
+ dout(10) << "r=" << r << dendl;
Mutex::Locker locker(m_lock);
template <typename I>
void LeaderWatcher<I>::notify_lock_acquired() {
- dout(20) << dendl;
+ dout(10) << dendl;
assert(m_lock.is_locked());
template <typename I>
void LeaderWatcher<I>::handle_notify_lock_acquired(int r) {
- dout(20) << "r=" << r << dendl;
+ dout(10) << "r=" << r << dendl;
Context *on_finish = nullptr;
{
template <typename I>
void LeaderWatcher<I>::notify_lock_released() {
- dout(20) << dendl;
+ dout(10) << dendl;
assert(m_lock.is_locked());
template <typename I>
void LeaderWatcher<I>::handle_notify_lock_released(int r) {
- dout(20) << "r=" << r << dendl;
+ dout(10) << "r=" << r << dendl;
Context *on_finish = nullptr;
{
template <typename I>
void LeaderWatcher<I>::notify_heartbeat() {
- dout(20) << dendl;
+ dout(10) << dendl;
assert(m_threads->timer_lock.is_locked());
assert(m_lock.is_locked());
template <typename I>
void LeaderWatcher<I>::handle_notify_heartbeat(int r) {
- dout(20) << "r=" << r << dendl;
+ dout(10) << "r=" << r << dendl;
Mutex::Locker timer_locker(m_threads->timer_lock);
Mutex::Locker locker(m_lock);
m_timer_op_tracker.finish_op();
if (m_leader_lock->is_shutdown()) {
- dout(20) << "canceling due to shutdown" << dendl;
+ dout(10) << "canceling due to shutdown" << dendl;
return;
} else if (!is_leader(m_lock)) {
return;
return;
}
- dout(20) << m_heartbeat_response.acks.size() << " acks received, "
+ dout(10) << m_heartbeat_response.acks.size() << " acks received, "
<< m_heartbeat_response.timeouts.size() << " timed out" << dendl;
std::vector<std::string> instance_ids;
template <typename I>
void LeaderWatcher<I>::handle_heartbeat(Context *on_notify_ack) {
- dout(20) << dendl;
+ dout(10) << dendl;
{
Mutex::Locker timer_locker(m_threads->timer_lock);
template <typename I>
void LeaderWatcher<I>::handle_lock_acquired(Context *on_notify_ack) {
- dout(20) << dendl;
+ dout(10) << dendl;
{
Mutex::Locker timer_locker(m_threads->timer_lock);
template <typename I>
void LeaderWatcher<I>::handle_lock_released(Context *on_notify_ack) {
- dout(20) << dendl;
+ dout(10) << dendl;
{
Mutex::Locker timer_locker(m_threads->timer_lock);
template <typename I>
void LeaderWatcher<I>::handle_notify(uint64_t notify_id, uint64_t handle,
uint64_t notifier_id, bufferlist &bl) {
- dout(20) << "notify_id=" << notify_id << ", handle=" << handle << ", "
+ dout(10) << "notify_id=" << notify_id << ", handle=" << handle << ", "
<< "notifier_id=" << notifier_id << dendl;
Context *ctx = new C_NotifyAck(this, notify_id, handle);
if (notifier_id == m_notifier_id) {
- dout(20) << "our own notification, ignoring" << dendl;
+ dout(10) << "our own notification, ignoring" << dendl;
ctx->complete(0);
return;
}
template <typename I>
void LeaderWatcher<I>::handle_payload(const HeartbeatPayload &payload,
Context *on_notify_ack) {
- dout(20) << "heartbeat" << dendl;
+ dout(10) << "heartbeat" << dendl;
handle_heartbeat(on_notify_ack);
}
template <typename I>
void LeaderWatcher<I>::handle_payload(const LockAcquiredPayload &payload,
Context *on_notify_ack) {
- dout(20) << "lock_acquired" << dendl;
+ dout(10) << "lock_acquired" << dendl;
handle_lock_acquired(on_notify_ack);
}
template <typename I>
void LeaderWatcher<I>::handle_payload(const LockReleasedPayload &payload,
Context *on_notify_ack) {
- dout(20) << "lock_released" << dendl;
+ dout(10) << "lock_released" << dendl;
handle_lock_released(on_notify_ack);
}
template <typename I>
void LeaderWatcher<I>::handle_payload(const UnknownPayload &payload,
Context *on_notify_ack) {
- dout(20) << "unknown" << dendl;
+ dout(10) << "unknown" << dendl;
on_notify_ack->complete(0);
}
m_stopping = false;
m_blacklisted = false;
- dout(20) << "replaying for " << m_peer << dendl;
+ dout(10) << "replaying for " << m_peer << dendl;
int r = init_rados(g_ceph_context->_conf->cluster,
g_ceph_context->_conf->name.to_str(),
"local cluster", &m_local_rados, false);
return;
}
- dout(20) << "connected to " << m_peer << dendl;
+ dout(10) << "connected to " << m_peer << dendl;
m_instance_replayer.reset(InstanceReplayer<>::create(
m_threads, m_service_daemon, m_local_rados, local_mirror_uuid,
template <typename I>
void PoolReplayer<I>::handle_post_acquire_leader(Context *on_finish) {
- dout(20) << dendl;
+ dout(10) << dendl;
m_service_daemon->add_or_update_attribute(m_local_pool_id,
SERVICE_DAEMON_LEADER_KEY, true);
template <typename I>
void PoolReplayer<I>::handle_pre_release_leader(Context *on_finish) {
- dout(20) << dendl;
+ dout(10) << dendl;
m_service_daemon->remove_attribute(m_local_pool_id,
SERVICE_DAEMON_LEADER_KEY);
template <typename I>
void PoolReplayer<I>::init_local_pool_watcher(Context *on_finish) {
- dout(20) << dendl;
+ dout(10) << dendl;
Mutex::Locker locker(m_lock);
assert(!m_local_pool_watcher);
template <typename I>
void PoolReplayer<I>::handle_init_local_pool_watcher(
int r, Context *on_finish) {
- dout(20) << "r=" << r << dendl;
+ dout(10) << "r=" << r << dendl;
if (r < 0) {
derr << "failed to retrieve local images: " << cpp_strerror(r) << dendl;
on_finish = new FunctionContext([this, on_finish, r](int) {
template <typename I>
void PoolReplayer<I>::init_remote_pool_watcher(Context *on_finish) {
- dout(20) << dendl;
+ dout(10) << dendl;
Mutex::Locker locker(m_lock);
assert(!m_remote_pool_watcher);
template <typename I>
void PoolReplayer<I>::handle_init_remote_pool_watcher(
int r, Context *on_finish) {
- dout(20) << "r=" << r << dendl;
+ dout(10) << "r=" << r << dendl;
if (r < 0) {
derr << "failed to retrieve remote images: " << cpp_strerror(r) << dendl;
on_finish = new FunctionContext([this, on_finish, r](int) {
template <typename I>
void PoolReplayer<I>::init_image_deleter(Context *on_finish) {
- dout(20) << dendl;
+ dout(10) << dendl;
Mutex::Locker locker(m_lock);
assert(!m_image_deleter);
template <typename I>
void PoolReplayer<I>::handle_init_image_deleter(int r, Context *on_finish) {
- dout(20) << "r=" << r << dendl;
+ dout(10) << "r=" << r << dendl;
if (r < 0) {
derr << "failed to init image deleter: " << cpp_strerror(r) << dendl;
on_finish = new FunctionContext([this, on_finish, r](int) {
template <typename I>
void PoolReplayer<I>::shut_down_image_deleter(Context* on_finish) {
- dout(20) << dendl;
+ dout(10) << dendl;
{
Mutex::Locker locker(m_lock);
if (m_image_deleter) {
template <typename I>
void PoolReplayer<I>::handle_shut_down_image_deleter(
int r, Context* on_finish) {
- dout(20) << "r=" << r << dendl;
+ dout(10) << "r=" << r << dendl;
{
Mutex::Locker locker(m_lock);
template <typename I>
void PoolReplayer<I>::shut_down_pool_watchers(Context *on_finish) {
- dout(20) << dendl;
+ dout(10) << dendl;
{
Mutex::Locker locker(m_lock);
template <typename I>
void PoolReplayer<I>::handle_shut_down_pool_watchers(
int r, Context *on_finish) {
- dout(20) << "r=" << r << dendl;
+ dout(10) << "r=" << r << dendl;
{
Mutex::Locker locker(m_lock);
template <typename I>
void PoolReplayer<I>::wait_for_update_ops(Context *on_finish) {
- dout(20) << dendl;
+ dout(10) << dendl;
Mutex::Locker locker(m_lock);
template <typename I>
void PoolReplayer<I>::handle_wait_for_update_ops(int r, Context *on_finish) {
- dout(20) << "r=" << r << dendl;
+ dout(10) << "r=" << r << dendl;
assert(r == 0);
shut_down_image_map(on_finish);
template <typename I>
void PoolReplayer<I>::handle_update_leader(
const std::string &leader_instance_id) {
- dout(20) << "leader_instance_id=" << leader_instance_id << dendl;
+ dout(10) << "leader_instance_id=" << leader_instance_id << dendl;
m_instance_watcher->handle_update_leader(leader_instance_id);
}
local_tag_tid = local_image_ctx->journal->get_tag_tid();
local_tag_data = local_image_ctx->journal->get_tag_data();
- dout(20) << ": local tag " << local_tag_tid << ": "
+ dout(10) << ": local tag " << local_tag_tid << ": "
<< local_tag_data << dendl;
}
if (local_tag_data.predecessor.commit_valid &&
local_tag_data.predecessor.mirror_uuid == m_remote_mirror_uuid &&
local_tag_data.predecessor.tag_tid > remote_tag.tid) {
- dout(20) << ": skipping processed predecessor remote tag "
+ dout(15) << ": skipping processed predecessor remote tag "
<< remote_tag.tid << dendl;
continue;
}
if (!local_tag_data.predecessor.commit_valid) {
// newly synced local image (no predecessor) replays from the first tag
if (remote_tag_data.mirror_uuid != librbd::Journal<>::LOCAL_MIRROR_UUID) {
- dout(20) << ": skipping non-primary remote tag" << dendl;
+ dout(15) << ": skipping non-primary remote tag" << dendl;
continue;
}
- dout(20) << ": using initial primary remote tag" << dendl;
+ dout(10) << ": using initial primary remote tag" << dendl;
break;
}
local_tag_data.predecessor.mirror_uuid ==
librbd::Journal<>::LOCAL_MIRROR_UUID) {
// local demoted and remote has matching event
- dout(20) << ": found matching local demotion tag" << dendl;
+ dout(15) << ": found matching local demotion tag" << dendl;
remote_orphan_tag_tid = remote_tag.tid;
continue;
}
remote_tag_data.predecessor.mirror_uuid ==
librbd::Journal<>::LOCAL_MIRROR_UUID) {
// remote demoted and local has matching event
- dout(20) << ": found matching remote demotion tag" << dendl;
+ dout(15) << ": found matching remote demotion tag" << dendl;
remote_orphan_tag_tid = remote_tag.tid;
continue;
}
remote_tag_data.predecessor.commit_valid && remote_orphan_tag_tid &&
remote_tag_data.predecessor.tag_tid == *remote_orphan_tag_tid) {
// remote promotion tag chained to remote/local demotion tag
- dout(20) << ": found chained remote promotion tag" << dendl;
+ dout(15) << ": found chained remote promotion tag" << dendl;
reconnect_orphan = true;
break;
}
if (remote_tag_data_valid &&
local_tag_data.mirror_uuid == m_remote_mirror_uuid) {
- dout(20) << ": local image is in clean replay state" << dendl;
+ dout(10) << ": local image is in clean replay state" << dendl;
} else if (reconnect_orphan) {
- dout(20) << ": remote image was demoted/promoted" << dendl;
+ dout(10) << ": remote image was demoted/promoted" << dendl;
} else {
derr << ": split-brain detected -- skipping image replay" << dendl;
m_ret_val = -EEXIST;