Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mon: OSDMonitor add check only concern our self cluster command #10309

Merged
merged 1 commit into from Feb 7, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/mon/OSDMonitor.cc
Expand Up @@ -7703,6 +7703,14 @@ bool OSDMonitor::preprocess_pool_op(MonOpRequestRef op)
{
op->mark_osdmon_event(__func__);
MPoolOp *m = static_cast<MPoolOp*>(op->get_req());

if (m->fsid != mon->monmap->fsid) {
dout(0) << __func__ << " drop message on fsid " << m->fsid
<< " != " << mon->monmap->fsid << " for " << *m << dendl;
_pool_op_reply(op, -EINVAL, osdmap.get_epoch());
return true;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not entirely sure what the consequences of returning an error here would be, but silently dropping the message doesn't feel right.

We should figure out if there's an appropriate error to be replied to the consumer, and if so, make sure to use it.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jecluis Agree with that. I will add it later.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

passing an error string via the MPoolOpReply ::response_data is a viable way, but we need to change the interface of librados to return the error string. so returning an error code is fine here in the updated commit.

}

if (m->op == POOL_OP_CREATE)
return preprocess_pool_op_create(op);

Expand Down