Repository navigation
rgw/tracing: end to end trace for put obj op #47457
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -36,7 +36,7 @@ namespace _mosdop { | |
| template<typename V> | ||
| class MOSDOp final : public MOSDFastDispatchOp { | ||
| private: | ||
| static constexpr int HEAD_VERSION = 8; | ||
| static constexpr int HEAD_VERSION = 9; | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @yuvalif @rzarzynski - This change seems to be causing failures in some fs suite runs where a new(-er) cephfs client talks to old cluster daemons. The client (ceph-fuse) is upgraded to reef (main branch) while the other ceph daemons are nautilus. Details are captured in this tracker: https://tracker.ceph.com/issues/59534 The upgraded client sends an osd_op with (version) v9. The OSD knows to decode upto v8 and would silently drop the request. This seems to be the case with pacific too: https://github.com/ceph/ceph/blob/pacific/src/messages/MOSDOp.h#L402
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. i don't see this change in reef. this is currently only on main. see so, my suggestion is to wait for PR: #48971, and revert the version back to 8 - by repurposing the blkin trace entry to send otel traces
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
doesn't that still change the format of the encoding? i don't think we can reuse version 8 if the contents are different
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. there could be a workaround that by using some magic number to distinguish the 2 types of payloads, and decode and throw away if its not there. on a different note, @vshankar, what happened in the past when we had to change the message format?
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is on ceph/main and not on ceph/reef, correct? This is a RADOS change, it's your call whether to revert first. Either way, let's find a coherent and testable change that can replace this. This feature has been in progress for a couple of years, if I'm not mistaken.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Let's revert to not hot-patch-in-a-hurry an encoding problem, then get into the weeds and arrange a meeting / workshop on the encoding stuff to finally merge the redo of this PR.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. +1
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
I think I might have misunderstood the earlier conversation -- a feature bit would be a way to resolve this and might be the right one (I'm hoping we don't need to burn a bit that way, but if we need to we will). A config option would be very bad. :)
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Right - I was pointing out for using a feature bit and then choose the encoding versions accordingly. Anyway, +1 for reverting which cannot be done via the github UI for this change. I guess @yuvalif is on it and the revert will be merged soon... |
||
| static constexpr int COMPAT_VERSION = 3; | ||
|
|
||
| private: | ||
|
|
@@ -361,8 +361,7 @@ struct ceph_osd_request_head { | |
| encode(retry_attempt, payload); | ||
| encode(features, payload); | ||
| } else { | ||
| // latest v8 encoding with hobject_t hash separate from pgid, no | ||
| // reassert version | ||
| // latest v9 opentelemetry trace | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. OK, here it is. Let's squash this fixup before merging.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @rzarzynski which commit do you want me to squash?
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| header.version = HEAD_VERSION; | ||
|
|
||
| encode(pgid, payload); | ||
|
|
@@ -371,6 +370,7 @@ struct ceph_osd_request_head { | |
| encode(flags, payload); | ||
| encode(reqid, payload); | ||
| encode_trace(payload, features); | ||
| encode_otel_trace(payload, features); | ||
|
ideepika marked this conversation as resolved.
Resolved
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There's the conversation about the encoding breaking things, and this here is the fundamental issue — you just shoved a new data member into the middle of an encoding, which is an absolutely incompatible change, and didn't do anything to make sure all the various endpoints involved were able to keep communicating. I'm guessing this was modeled after 6159027, but that looks to have been riding along on an existing check for the SERVER_LUMINOUS flag to keep things okay (or else it was broken and fixed up elsewhere), which this PR doesn't get to take advantage of.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yes. will post a similar fix that checks on the SERVER_REEF flag.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. created a fix here: #51288 |
||
|
|
||
| // -- above decoded up front; below decoded post-dispatch thread -- | ||
|
|
||
|
|
@@ -400,6 +400,16 @@ struct ceph_osd_request_head { | |
|
|
||
| // Always keep here the newest version of decoding order/rule | ||
| if (header.version == HEAD_VERSION) { | ||
| decode(pgid, p); | ||
| uint32_t hash; | ||
| decode(hash, p); | ||
| hobj.set_hash(hash); | ||
| decode(osdmap_epoch, p); | ||
| decode(flags, p); | ||
| decode(reqid, p); | ||
| decode_trace(p); | ||
| decode_otel_trace(p); | ||
| } else if (header.version == 8) { | ||
| decode(pgid, p); // actual pgid | ||
| uint32_t hash; | ||
| decode(hash, p); // raw hash value | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1023,6 +1023,15 @@ void Message::decode_trace(ceph::bufferlist::const_iterator &p, bool create) | |
| #endif | ||
| } | ||
|
|
||
| void Message::encode_otel_trace(ceph::bufferlist &bl, uint64_t features) const | ||
| { | ||
| tracing::encode(otel_trace, bl); | ||
| } | ||
|
|
||
| void Message::decode_otel_trace(ceph::bufferlist::const_iterator &p, bool create) | ||
| { | ||
| tracing::decode(otel_trace, p); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. How costly this is in terms of performance? CC: @markhpc.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. see: https://github.com/ceph/ceph/pull/47457/files#diff-b46d02199b4bb6f489ab7279d33d54db05f46245022bb937c48a94b36ba5d0cfR69
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 👍. |
||
| } | ||
|
|
||
| // This routine is not used for ordinary messages, but only when encapsulating a message | ||
| // for forwarding and routing. It's also used in a backward compatibility test, which only | ||
|
|
||
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.
nit: since we have the
opentelemetry::libopentelemetrytarget for this header dependency, we should probably require targets like ceph-common to depend on that target orjaeger_baseinstead of adding a globalinclude_directories()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.
do you mean I should add the include dir and dependency separatly to each Cmake that needs that?
i.e. add:
to: common, msg, auth, global, librados etc.
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.
ideally we'd just add
target_link_libraries(common PUBLIC opentelemetry::libopentelemetry)and other targets would inherit the dependency from thatbut i recently went through a similar exercise trying to remove the global include_directories() for libfmt in #50479, and it was a huge mess because of all of the separate object libraries like auth, msg, etc that get linked into common
so let's leave this as-is, and think about cleaning up that mess of common dependencies later.. maybe.. some day