Skip to content

Commit

Permalink
Merge pull request #18601 from dillaman/wip-21961
Browse files Browse the repository at this point in the history
rbd-mirror: clean up spurious error log messages

Reviewed-by: Mykola Golub <to.my.trociny@gmail.com>
  • Loading branch information
trociny committed Oct 29, 2017
2 parents 0d19edf + 625222e commit f212753
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 11 deletions.
6 changes: 3 additions & 3 deletions src/tools/rbd_mirror/ImageReplayer.cc
Expand Up @@ -620,9 +620,9 @@ void ImageReplayer<I>::handle_init_remote_journaler(int r) {
return;
}

derr << "image_id=" << m_local_image_id << ", "
<< "m_client_meta.image_id=" << m_client_meta.image_id << ", "
<< "client.state=" << client.state << dendl;
dout(5) << "image_id=" << m_local_image_id << ", "
<< "client_meta.image_id=" << m_client_meta.image_id << ", "
<< "client.state=" << client.state << dendl;
if (m_client_meta.image_id == m_local_image_id &&
client.state != cls::journal::CLIENT_STATE_CONNECTED) {
dout(5) << "client flagged disconnected, stopping image replay" << dendl;
Expand Down
14 changes: 6 additions & 8 deletions src/tools/rbd_mirror/image_replayer/PrepareRemoteImageRequest.cc
Expand Up @@ -129,20 +129,18 @@ void PrepareRemoteImageRequest<I>::handle_get_client(int r) {

if (r == -ENOENT) {
dout(10) << "client not registered" << dendl;
register_client();
} else if (r < 0) {
derr << "failed to retrieve client: " << cpp_strerror(r) << dendl;
finish(r);
return;
}

*m_client_state = m_client.state;
if (decode_client_meta()) {
} else if (!decode_client_meta()) {
// require operator intervention since the data is corrupt
finish(-EBADMSG);
} else {
// skip registration if it already exists
*m_client_state = m_client.state;
finish(0);
return;
}

register_client();
}

template <typename I>
Expand Down

0 comments on commit f212753

Please sign in to comment.