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
Conversation
jenkins test this please |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
figuring out whether an error should be returned to the sender, and if so which error, is a must imo.
if (m->fsid != mon->monmap->fsid) { | ||
dout(0) << "preprocess_pool_op: on fsid " << m->fsid | ||
<< " != " << mon->monmap->fsid << dendl; | ||
return true; |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
@@ -7703,6 +7703,13 @@ 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) << "preprocess_pool_op: on fsid " << m->fsid |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also, if we are outputting this error message on level 0, would certainly be nice to know which message is being dropped. I'd recommend fitting the message in here as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jecluis Yes good idea sir.
…uster command we only concern the commands send to ourself cluster Signed-off-by:song baisen <song.baisen@zte.com.cn>
03fcc16
to
ebea0ac
Compare
@jecluis Done it. |
@liewegas this was tested pls merge |
mon: OSDMonitor add check only concern our self cluster command
we only concern the command send to ourself cluster
Signed-off-by:song baisen song.baisen@zte.com.cn