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

Conversation

songbaisen
Copy link

@songbaisen songbaisen commented Jul 15, 2016

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

@ghost
Copy link

ghost commented Nov 21, 2016

jenkins test this please

Copy link
Member

@jecluis jecluis left a 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;
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.

@@ -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
Copy link
Member

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.

Copy link
Author

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.

@jecluis jecluis added the core label Nov 21, 2016
@jecluis jecluis self-assigned this Nov 21, 2016
…uster command

we only concern the commands send to ourself cluster

Signed-off-by:song baisen <song.baisen@zte.com.cn>
@songbaisen
Copy link
Author

@jecluis Done it.

@yuriw
Copy link
Contributor

yuriw commented Feb 7, 2017

@liewegas this was tested pls merge

@liewegas liewegas merged commit af3d311 into ceph:master Feb 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants