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

messages/: always set header.version in encode_payload() #16421

Merged
merged 1 commit into from Jul 20, 2017

Conversation

Projects
None yet
4 participants
@tchaikov
Contributor

tchaikov commented Jul 19, 2017

we encode the payload w/o the writelock even can_write == NOWRITE, if
the message "can_fast_prepare". in that case, the "feature" of the
connection is 0, as no handshake happens yet. so the header.version is
always set to a version compatible with pre-luminous. but when the
message is re-encoded when the connection is re-established with feature
with luminous, the header.version is not set back to HEADER_VERSION.
that's why the message's encoding is not consistent with header.version
sometimes.

in this change, we always set the header.version in encode_payload(), so
it's consistent even after connection reset and message re-encoding.

Fixes: http://tracker.ceph.com/issues/19939
Signed-off-by: Kefu Chai kchai@redhat.com

@tchaikov tchaikov added the bug fix label Jul 19, 2017

@tchaikov tchaikov requested review from liewegas, yuyuyu101 and jdurgin Jul 19, 2017

@tchaikov tchaikov added this to the luminous milestone Jul 19, 2017

messages/: always set header.version in encode_payload()
we encode the payload w/o the writelock even can_write == NOWRITE, if
the message "can_fast_prepare". in that case, the "feature" of the
connection is 0, as no handshake happens yet. so the header.version is
always set to a version compatible with pre-luminous. but when the
message is re-encoded when the connection is re-established with feature
with luminous, the header.version is not set back to HEADER_VERSION.
that's why the message's encoding is not consistent with header.version
sometimes.

in this change, we always set the header.version in encode_payload(), so
it's consistent even after connection reset and message re-encoding.

Fixes: http://tracker.ceph.com/issues/19939
Signed-off-by: Kefu Chai <kchai@redhat.com>
@yuyuyu101

YES!

@tchaikov tchaikov added the needs-qa label Jul 19, 2017

@liewegas

YAY!

@jdurgin

nice debugging!

@tchaikov

This comment has been minimized.

@tchaikov tchaikov merged commit 153d030 into ceph:master Jul 20, 2017

4 checks passed

Signed-off-by all commits in this PR are signed
Details
Unmodified Submodules submodules for project are unmodified
Details
make check make check succeeded
Details
make check (arm64) make check succeeded
Details
@tchaikov

This comment has been minimized.

Contributor

tchaikov commented Jul 20, 2017

i am merging this before the tests finish, because quite a few PRs' "make check" run failed due to this issue. and i am quite confident about the root cause of this issue.

@tchaikov tchaikov deleted the tchaikov:wip-19939 branch Jul 20, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment