} else if (r == -EEXIST) {
finish_start_fail(r, "split-brain detected");
return;
- } else if (m_remote_group_id.empty()){
- r = -EINVAL;
- //FIXME: The primary should not care if the remote is ready.
- // Bootstrap again when the replayer is restarted
- finish_start_fail(r, "remote is not ready yet");
- return;
- } else if (r == -EINVAL) {
- sync_group_names();
} else if (r < 0) {
finish_start_fail(r, "bootstrap failed");
return;
"local group is primary");
finish_start_fail(0, "local group is primary");
return;
+ } else if (m_remote_group_id.empty()) { // m_remote_group_id matter for
+ // secondary cluster case.
+ finish_start_fail(-EINVAL, "remote is not ready yet");
+ return;
}
m_local_group_ctx.listener = &m_listener;