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

jewel: fix "upgrade saturates mon node networking" and related encoding bugs #11643

Closed
wants to merge 8 commits into from

Conversation

asheplyakov
Copy link

@asheplyakov asheplyakov commented Oct 25, 2016

liewegas and others added 8 commits October 25, 2016 15:55
…lags

If the JEWEL or KRAKEN flags aren't set, encode the full map without
those features.  This ensure that older OSDs in the cluster will be able
to correctly encode the full map with a matching CRC.  At least, that is
true as long as the encoding changes are guarded by those feature bits.
That appears to be true currently, and we plan to ensure that it is true
in the future as well.

Signed-off-by: Sage Weil <sage@redhat.com>
(cherry picked from commit 5e0daf6)

Backport to Jewel: skip CEPH_OSDMAP_REQUIRE_KRAKEN handling

Related: ceph#17386
We want to prompt users to set this flag as soon as their
upgrades complete.

Signed-off-by: Sage Weil <sage@redhat.com>
(cherry picked from commit 12e5083)

Related: ceph#17386, ceph#17365
…as OSDMap

The Incremental encode stashes encode_features, which is
what we use later to reencode the updated OSDMap.  Use
the same features so that the encoding will match!

Signed-off-by: Sage Weil <sage@redhat.com>
(cherry picked from commit 916ca6a)

Related: ceph#17386, ceph#17365
operator<<(ostream, Message&) defined in Message.h is not good enough for
stringify(const T&). And the compiler is not smart enough to report this
clearly, instead it goes on to find a close match from the standard library

operator<<(std::basic_ostream<_CharT, _Traits>&&, const _Tp&)

where it can match _Tp to just about any type, but notes that the first parameter
doesn't match and prints a confusing error message:

error: cannot bind 'std::basic_ostream<char>' lvalue to 'std::basic_ostream<char>&&'

Related: ceph#17386, ceph#17365

Signed-off-by: Alexey Sheplyakov <asheplyakov@mirantis.com>
We were encoding the message with the sending client's
features, which makes no sense: we need to encode with
the recipient's features so that it can decode the
message.

The simplest way to fix this is to rip out the bizarre
msg_bl handling code and simply keep a decoded Message
reference, and encode it when we send.

We encode the encapsulated message with the intersection
of the target mon's features and the sending client's
features.  This probably doesn't matter, but it's
conceivable that there is some feature-dependent
behavior in the message encode/decode that is important.

Fixes: http://tracker.ceph.com/issues/17365
Signed-off-by: Sage Weil <sage@redhat.com>
(cherry picked from commit d4f5e88)

Related: ceph#17386, ceph#17365
Normally we never call encode on a message that has a byte_throttler set
because we only use it for messages we received.  However, for forwarded
messages that we clear_payload() before resending, we *do* reencode, and in
that case we need to retake the appropriate number of bytes from the
throttler--just like we release them in clear_payload().

Signed-off-by: Sage Weil <sage@redhat.com>
(cherry picked from commit a965128)

Related: ceph#17386, ceph#17365
Signed-off-by: Sage Weil <sage@redhat.com>
(cherry picked from commit e7bf50b)

Related: ceph#17386, ceph#17365
…ffering features

This ensures we reencode the payload with the
appropriate set of features if the client, us, or the
target do not have identical features.  Otherwise we
may forward an encoding with more features than the
target can handle.

Signed-off-by: Sage Weil <sage@redhat.com>
(cherry picked from commit a433455)

Related: ceph#17386, ceph#17365
@asheplyakov asheplyakov changed the title jewel: fix "upgrade saturates mon node networking" and encoding related bugs jewel: fix "upgrade saturates mon node networking" and related encoding bugs Oct 25, 2016
@tchaikov tchaikov added this to the jewel milestone Oct 25, 2016
@ghost
Copy link

ghost commented Oct 28, 2016

replaced by #11679 purely for cosmetic reasons (titles, missing cherry-pick -x). The selection of commits is otherwise perfectly fine.

@ghost ghost closed this Oct 28, 2016
@ghost
Copy link

ghost commented Oct 28, 2016

@asheplyakov 8fdafe3 has been replaced by a cherry-pick of 0a157e0

@asheplyakov asheplyakov deleted the jewel-17386 branch November 24, 2016 12:31
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants