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
ceph-dencoder: COMMON - Add missing types #52210
ceph-dencoder: COMMON - Add missing types #52210
Conversation
36b64aa
to
1508cc3
Compare
1508cc3
to
6a47b20
Compare
b45e950
to
6814743
Compare
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.
LGTM. Just nits.
src/auth/Auth.h
Outdated
@@ -59,6 +59,16 @@ struct EntityAuth { | |||
decode(pending_key, bl); | |||
} | |||
} | |||
void dump(ceph::Formatter *f) const { | |||
f->dump_object("key", key); | |||
for (auto p = caps.begin(); p != caps.end(); ++p) { |
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: let's use the range-based for loop.
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.
Done
src/auth/Auth.h
Outdated
@@ -95,6 +105,21 @@ struct AuthCapsInfo { | |||
allow_all = (bool)a; | |||
decode(caps, bl); | |||
} | |||
void dump(ceph::Formatter *f) const { | |||
f->dump_bool("allow_all", allow_all); | |||
for (auto p = caps.begin(); !p.end(); ++p) { |
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.
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.
Done
src/auth/Auth.h
Outdated
@@ -295,6 +349,23 @@ struct RotatingSecrets { | |||
} | |||
|
|||
void dump(); | |||
void dump(ceph::Formatter *f) const { | |||
f->open_array_section("secrets"); | |||
for (auto& p : secrets) { |
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: const auto&
+ structured bindings.
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.
Done
src/auth/Auth.h
Outdated
ls.push_back(new ExpiringCryptoKey); | ||
ls.push_back(new ExpiringCryptoKey); | ||
ls.back()->key.set_secret(CEPH_CRYPTO_AES, bufferptr("1234567890123456", 16), | ||
utime_t(123, 456)); |
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: how about moving all the args to the newline?
src/auth/Crypto.cc
Outdated
ls.push_back(new CryptoKey); | ||
ls.back()->type = CEPH_CRYPTO_AES; | ||
ls.back()->set_secret(CEPH_CRYPTO_AES, bufferptr("1234567890123456", 16), | ||
utime_t(123, 456)); |
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
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.
Done
src/cls/version/cls_version_ops.h
Outdated
void dump(ceph::Formatter *f) const { | ||
f->dump_object("objv", objv); | ||
f->open_array_section("conds"); | ||
for (auto& i : conds) { |
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.
const
@@ -6,12 +6,6 @@ | |||
#include "common/ceph_json.h" | |||
|
|||
|
|||
void obj_version::dump(ceph::Formatter *f) const |
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.
I'm not seeing it's being moved; really looks like a deletion.
src/common/entity_name.cc
Outdated
@@ -29,6 +29,25 @@ const std::array<EntityName::str_to_entity_type_t, 6> EntityName::STR_TO_ENTITY_ | |||
{ CEPH_ENTITY_TYPE_CLIENT, "client" }, | |||
}}; | |||
|
|||
void EntityName:: |
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: let's not split this.
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.
sure
src/common/entity_name.cc
Outdated
f->dump_string("id", id); | ||
} | ||
|
||
void EntityName:: |
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
src/messages/MClientRequest.h
Outdated
@@ -59,6 +59,17 @@ struct SnapPayload { | |||
decode(metadata, iter); | |||
DECODE_FINISH(iter); | |||
} | |||
void dump(ceph::Formatter *f) const { | |||
for (auto &i : metadata) { |
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.
const
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.
Done
jenkins test api |
07a181b
to
3ac3726
Compare
3ac3726
to
0959234
Compare
jenkins retest this please |
5af2ca6
to
ee52e0d
Compare
jenkins test make check |
ee52e0d
to
3104663
Compare
bd937af
to
28716d7
Compare
… encode-decode comparison Currently, ceph-dencoder lacks certain common types, preventing us from accurately checking the ceph corpus for encode-decode mismatches. This pull request aims to address this issue by adding the missing types to ceph-dencoder. To successfully incorporate these types into ceph-dencoder, we need to introduce the necessary dump and generate_test_instances functions that was missing in some types. These functions are essential for proper encode and decode of the added types. This PR will enhance the functionality of ceph-dencoder by including the missing types, enabling a comprehensive analysis of encode-decode consistency. With the addition of these types, we can ensure the robustness and correctness of the ceph corpus. This update will significantly contribute to improving the overall reliability and accuracy of ceph-dencoder. It allows for a more comprehensive assessment of the encode-decode behavior, leading to enhanced data integrity and stability within the ceph ecosystem. Fixes: https://tracker.ceph.com/issues/61788 Signed-off-by: Nitzan Mordechai <nmordech@redhat.com>
Signed-off-by: Nitzan Mordechai <nmordech@redhat.com>
28716d7
to
c64501d
Compare
jenkins retest this please |
This pull request has been automatically marked as stale because it has not had any activity for 60 days. It will be closed if no further activity occurs for another 30 days. |
@NitzanMordhai Looks like @rzarzynski approved this PR -- is it still relevant? |
@@ -53,7 +53,11 @@ struct obj_version { | |||
tag.compare(v.tag) == 0); | |||
} | |||
|
|||
void dump(ceph::Formatter *f) const; | |||
void dump(ceph::Formatter *f) const { |
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.
ACK (for the comment on obj_version
from the last round).
@athanatos: Yup, we want those changes. |
rados approve Unrelated failures:
Details:
|
has any of this been backported to reef? ultimately we want to enable the 18.2.0 corpus there too so we can catch encoding regressions in reef backports |
Currently, ceph-dencoder lacks certain common types, preventing us from accurately checking the ceph corpus for encode-decode mismatches. This pull request aims to address this issue by adding the missing types to ceph-dencoder.
To successfully incorporate these types into ceph-dencoder, we need to introduce the necessary dump and generate_test_instances functions that was missing in some types. These functions are essential for proper encode and decode of the added types.
This PR will enhance the functionality of ceph-dencoder by including the missing types, enabling a comprehensive analysis of encode-decode consistency. With the addition of these types, we can ensure the robustness and correctness of the ceph corpus.
This update will significantly contribute to improving the overall reliability and accuracy of ceph-dencoder. It allows for a more comprehensive assessment of the encode-decode behavior, leading to enhanced data integrity and stability within the ceph ecosystem.
Fixes: https://tracker.ceph.com/issues/61788
Contribution Guidelines
To sign and title your commits, please refer to Submitting Patches to Ceph.
If you are submitting a fix for a stable branch (e.g. "pacific"), please refer to Submitting Patches to Ceph - Backports for the proper workflow.
Checklist
Show available Jenkins commands
jenkins retest this please
jenkins test classic perf
jenkins test crimson perf
jenkins test signed
jenkins test make check
jenkins test make check arm64
jenkins test submodules
jenkins test dashboard
jenkins test dashboard cephadm
jenkins test api
jenkins test docs
jenkins render docs
jenkins test ceph-volume all
jenkins test ceph-volume tox
jenkins test windows