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

Projects
None yet
5 participants
@songbaisen
Copy link

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

This comment has been minimized.

Copy link

ghost commented Nov 21, 2016

jenkins test this please

@jecluis
Copy link
Member

jecluis left a comment

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;

This comment has been minimized.

Copy link
@jecluis

jecluis Nov 21, 2016

Member

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.

This comment has been minimized.

Copy link
@songbaisen

songbaisen Nov 23, 2016

Author

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

This comment has been minimized.

Copy link
@tchaikov

tchaikov Feb 6, 2017

Contributor

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

This comment has been minimized.

Copy link
@jecluis

jecluis Nov 21, 2016

Member

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.

This comment has been minimized.

Copy link
@songbaisen

songbaisen Nov 23, 2016

Author

@jecluis Yes good idea sir.

@jecluis jecluis added the core label Nov 21, 2016

@jecluis jecluis self-assigned this Nov 21, 2016

songbaisen
mon: OSDMonitor preprocess_pool_op add check only concern our self cl…
…uster command

we only concern the commands send to ourself cluster

Signed-off-by:song baisen <song.baisen@zte.com.cn>

@songbaisen songbaisen force-pushed the songbaisen:b8 branch 2 times, most recently from 03fcc16 to ebea0ac Nov 25, 2016

@songbaisen

This comment has been minimized.

Copy link
Author

songbaisen commented Nov 25, 2016

@jecluis Done it.

@yuriw

This comment has been minimized.

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

3 checks passed

Signed-off-by all commits in this PR are signed
Details
Unmodifed Submodules submodules for project are unmodified
Details
default Build finished.
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.