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

ceph-dencoder: COMMON - Add missing types #52210

Merged
merged 2 commits into from Dec 13, 2023

Conversation

NitzanMordhai
Copy link
Contributor

@NitzanMordhai NitzanMordhai commented Jun 27, 2023

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

Checklist

  • Tracker (select at least one)
    • References tracker ticket
    • Very recent bug; references commit where it was introduced
    • New feature (ticket optional)
    • Doc update (no ticket needed)
    • Code cleanup (no ticket needed)
  • Component impact
    • Affects Dashboard, opened tracker ticket
    • Affects Orchestrator, opened tracker ticket
    • No impact that needs to be tracked
  • Documentation (select at least one)
    • Updates relevant documentation
    • No doc update is appropriate
  • Tests (select at least one)
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

@NitzanMordhai NitzanMordhai requested a review from a team as a code owner June 27, 2023 13:01
@NitzanMordhai NitzanMordhai force-pushed the wip-nitzan-ceph-dencoder-extend-common-types-available branch from 36b64aa to 1508cc3 Compare June 28, 2023 05:55
@NitzanMordhai NitzanMordhai force-pushed the wip-nitzan-ceph-dencoder-extend-common-types-available branch from 1508cc3 to 6a47b20 Compare July 17, 2023 12:29
@NitzanMordhai NitzanMordhai requested a review from a team as a code owner July 17, 2023 12:29
@github-actions github-actions bot added bluestore cephfs Ceph File System core labels Jul 17, 2023
@NitzanMordhai NitzanMordhai force-pushed the wip-nitzan-ceph-dencoder-extend-common-types-available branch 2 times, most recently from b45e950 to 6814743 Compare July 18, 2023 11:29
@NitzanMordhai NitzanMordhai changed the title ceph-dencoder: Add missing common types to ceph-dencoder for accurate encode-decode comparison ceph-dencoder: COMMON - Add missing types Aug 6, 2023
Copy link
Contributor

@rzarzynski rzarzynski left a 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) {
Copy link
Contributor

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.

Copy link
Contributor Author

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) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

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) {
Copy link
Contributor

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.

Copy link
Contributor Author

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));
Copy link
Contributor

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?

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));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

void dump(ceph::Formatter *f) const {
f->dump_object("objv", objv);
f->open_array_section("conds");
for (auto& i : conds) {
Copy link
Contributor

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
Copy link
Contributor

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.

@@ -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::
Copy link
Contributor

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sure

f->dump_string("id", id);
}

void EntityName::
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit

@@ -59,6 +59,17 @@ struct SnapPayload {
decode(metadata, iter);
DECODE_FINISH(iter);
}
void dump(ceph::Formatter *f) const {
for (auto &i : metadata) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

const

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@rzarzynski
Copy link
Contributor

jenkins test api

@NitzanMordhai NitzanMordhai force-pushed the wip-nitzan-ceph-dencoder-extend-common-types-available branch 2 times, most recently from 07a181b to 3ac3726 Compare August 13, 2023 07:14
@NitzanMordhai NitzanMordhai force-pushed the wip-nitzan-ceph-dencoder-extend-common-types-available branch from 3ac3726 to 0959234 Compare September 6, 2023 08:58
@NitzanMordhai
Copy link
Contributor Author

jenkins retest this please

@NitzanMordhai NitzanMordhai force-pushed the wip-nitzan-ceph-dencoder-extend-common-types-available branch 5 times, most recently from 5af2ca6 to ee52e0d Compare September 10, 2023 05:14
@NitzanMordhai
Copy link
Contributor Author

jenkins test make check

@NitzanMordhai NitzanMordhai force-pushed the wip-nitzan-ceph-dencoder-extend-common-types-available branch from ee52e0d to 3104663 Compare September 10, 2023 12:01
… 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>
@NitzanMordhai NitzanMordhai force-pushed the wip-nitzan-ceph-dencoder-extend-common-types-available branch from 28716d7 to c64501d Compare September 13, 2023 08:30
@NitzanMordhai
Copy link
Contributor Author

jenkins retest this please

Copy link

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.
If you are a maintainer or core committer, please follow-up on this pull request to identify what steps should be taken by the author to move this proposed change forward.
If you are the author of this pull request, thank you for your proposed contribution. If you believe this change is still appropriate, please ensure that any feedback has been addressed and ask for a code review.

@github-actions github-actions bot added the stale label Nov 12, 2023
@athanatos
Copy link
Contributor

@NitzanMordhai Looks like @rzarzynski approved this PR -- is it still relevant?

@github-actions github-actions bot removed the stale label Nov 13, 2023
@@ -53,7 +53,11 @@ struct obj_version {
tag.compare(v.tag) == 0);
}

void dump(ceph::Formatter *f) const;
void dump(ceph::Formatter *f) const {
Copy link
Contributor

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).

@rzarzynski
Copy link
Contributor

@athanatos: Yup, we want those changes.

@NitzanMordhai
Copy link
Contributor Author

rados approve

Unrelated failures:

  1. https://tracker.ceph.com/issues/63748
  2. https://tracker.ceph.com/issues/61774
  3. https://tracker.ceph.com/issues/63783
  4. https://tracker.ceph.com/issues/59380
  5. https://tracker.ceph.com/issues/59142
  6. https://tracker.ceph.com/issues/59196

Details:

  1. ['7487680', '7487836'] - qa/workunits/post-file.sh: Couldn't create directory
  2. ['7487541', '7487610', '7487750', '7487751', '7487683', '7487822'] - centos 9 testing reveals rocksdb "Leak_StillReachable" memory leak in mons
  3. ['7487677', '7487816', '7487532'] - mgr: 'ceph rgw realm bootstrap' fails with KeyError: 'realm_name'
  4. ['7487804', '7487806', '7487647'] - rados/singleton-nomsgr: test failing from "Health check failed: 1 full osd(s) (OSD_FULL)" and "Health check failed: 1 filesystem is offline (MDS_ALL_DOWN)"
  5. ['7487724', '7487568'] - mgr/dashboard: fix e2e for dashboard v3
  6. ['7487579', '7487739'] - cephtest bash -c ceph_test_lazy_omap_stats

@yuriw yuriw merged commit bf0b102 into main Dec 13, 2023
10 of 13 checks passed
@yuriw yuriw deleted the wip-nitzan-ceph-dencoder-extend-common-types-available branch December 13, 2023 15:40
@cbodley
Copy link
Contributor

cbodley commented Mar 6, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
6 participants