ASSERT_EQ(0, stop_cond.wait());
}
-TEST_F(TestImageReplayer, ErrorJournalReset)
+TEST_F(TestImageReplayer, JournalReset)
{
bootstrap();
-
ASSERT_EQ(0, librbd::Journal<>::reset(m_remote_ioctx, m_remote_image_id));
-
- C_SaferCond cond;
- m_replayer->start(&cond);
- ASSERT_EQ(-EEXIST, cond.wait());
+ // try to recover
+ bootstrap();
}
TEST_F(TestImageReplayer, ErrorNoJournal)
} else if (tag_data.mirror_uuid == m_remote_mirror_uuid &&
m_client_meta->state == librbd::journal::MIRROR_PEER_STATE_REPLAYING) {
dout(20) << ": local image is in clean replay state" << dendl;
+ } else if (m_client_meta->state == librbd::journal::MIRROR_PEER_STATE_SYNCING) {
+ dout(20) << ": previous sync was canceled" << dendl;
} else {
derr << ": split-brain detected -- skipping image replay" << dendl;
m_ret_val = -EEXIST;