Skip to content

mds: encode bal_rank_mask using a higher (next) version#54745

Merged
vshankar merged 1 commit intoceph:mainfrom
vshankar:wip-63713
Dec 13, 2023
Merged

mds: encode bal_rank_mask using a higher (next) version#54745
vshankar merged 1 commit intoceph:mainfrom
vshankar:wip-63713

Conversation

@vshankar
Copy link
Contributor

@vshankar vshankar commented Dec 1, 2023

This is required for a reef client to work with a higher revision MDS, since essentially, this happens:

reef(client):

if (version >=17) {
decode(bal_rank_mask, p);
}

and higher-revision MDS (say, upcoming squid):

version = 17
encode(version, bl);
...
...
encode(max_xattr_size, bl);
encode(bal_rank_mask, bl);

The client incorrectly decodes max_xattr_size (type: uint64_t) into
bal_rank_mask (type: string).

This situation ended up due to a couple of reasons:

Which means reef(18.2.0) user-space clients are broken with higher version MDSs.

Fixes: https://tracker.ceph.com/issues/63713

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. "quincy"), please refer to Submitting Patches to Ceph - Backports for the proper workflow.

  • When filling out the below checklist, you may click boxes directly in the GitHub web UI. When entering or editing the entire PR message in the GitHub web UI editor, you may also select a checklist item by adding an x between the brackets: [x]. Spaces and capitalization matter when checking off items this way.

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
  • jenkins test rook e2e

This is required for a reef client to work with a higher revision
MDS, since essentially, this happens:

reef(client):

if (version >=17) {
    decode(bal_rank_mask, p);
}

and higher-revision MDS (say, upcoming squid):

version = 17
encode(version, bl);
...
...
encode(max_xattr_size, bl);
encode(bal_rank_mask, bl);

The client incorrectly decodes max_xattr_size (type: uint64_t) into
bal_rank_mask (type: string).

This situation ended up due to a couple of reasons:

* the kclient patchset hanlding `max_xattr_size` was merged early on
  and another MDS side change that bumped the MDSMap encoding version
  to 17 got merged in the midst (PR ceph#43284). Details in comment:

        ceph#46357 (comment)

* The reef backport for PR ceph#46357 got delayed (and, reef branched out).

Which means reef(18.2.0) user-space clients are broken with higher version
MDSs.

Fixes: https://tracker.ceph.com/issues/63713
Signed-off-by: Venky Shankar <vshankar@redhat.com>
@vshankar vshankar added the cephfs Ceph File System label Dec 1, 2023
@vshankar vshankar requested a review from a team December 1, 2023 09:52
@vshankar vshankar marked this pull request as ready for review December 1, 2023 10:07
@vshankar
Copy link
Contributor Author

vshankar commented Dec 1, 2023

(Not sure why github has started to create draft PRs by default for me. Maybe because few days back I pushed a draft change and now github thinks all my new PRs are probably draft - weird).

Copy link
Member

@batrick batrick left a comment

Choose a reason for hiding this comment

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

Kudos to @leonid-s-usov for catching it.

@vshankar
Copy link
Contributor Author

vshankar commented Dec 7, 2023

@vshankar
Copy link
Contributor Author

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants