Skip to content

mgr/vol: print proper message when subvolume metadata filename is too long#61706

Merged
rishabh-d-dave merged 2 commits intoceph:mainfrom
rishabh-d-dave:subvol-meta-filename-too-long
Feb 28, 2025
Merged

mgr/vol: print proper message when subvolume metadata filename is too long#61706
rishabh-d-dave merged 2 commits intoceph:mainfrom
rishabh-d-dave:subvol-meta-filename-too-long

Conversation

@rishabh-d-dave
Copy link
Contributor

@rishabh-d-dave rishabh-d-dave commented Feb 7, 2025

When combination of subvolume group name and subvolume name is longer
than 248 characters, it leads to a failure because the metadata file is
a combination of both of these along with ":", "_" and ".meta".

Currently, when this comibnation longer than 248 characters, a bunch
stacktraces are printed along with multiple errors. This confuses the
user as well as looks bad.

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

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

@rishabh-d-dave rishabh-d-dave requested review from a team, batrick and vshankar February 7, 2025 13:34
@rishabh-d-dave rishabh-d-dave force-pushed the subvol-meta-filename-too-long branch 2 times, most recently from d59aaff to 83e716a Compare February 7, 2025 13:43
@rishabh-d-dave rishabh-d-dave added the wip-rishabh-testing Rishabh's testing label label Feb 7, 2025
@rishabh-d-dave
Copy link
Contributor Author

This PR is under test in https://tracker.ceph.com/issues/69873.

rishabh-d-dave added a commit to rishabh-d-dave/ceph that referenced this pull request Feb 8, 2025
* refs/pull/61706/head:
	qa/cephfs: add tests for "fs subvolume create" command when...
	mgr/vol: print proper message when subvolume metadata filename is too...
long.

When combination of subvolume group name and subvolume name is longer
than 248 characters, it leads to a failure because the metadata file is
a combination of both of these along with ":", "_" and ".meta".

Currently, when this comibnation longer than 248 characters, a bunch
stacktraces are printed along with multiple errors. This confuses the
user as well as looks bad.

Fixes: https://tracker.ceph.com/issues/69865
Signed-off-by: Rishabh Dave <ridave@redhat.com>
subvolume metadata file name length is too long.

Signed-off-by: Rishabh Dave <ridave@redhat.com>
@rishabh-d-dave rishabh-d-dave force-pushed the subvol-meta-filename-too-long branch from 83e716a to 01f8f71 Compare February 24, 2025 12:17
Copy link
Contributor

@mchangir mchangir left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor Author

@rishabh-d-dave rishabh-d-dave left a comment

Choose a reason for hiding this comment

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

@rishabh-d-dave rishabh-d-dave dismissed vshankar’s stale review February 28, 2025 10:00

Requested change was incorporated.

@rishabh-d-dave rishabh-d-dave merged commit 53e3ed2 into ceph:main Feb 28, 2025
11 checks passed
@rishabh-d-dave rishabh-d-dave deleted the subvol-meta-filename-too-long branch February 28, 2025 12:49
log = logging.getLogger(__name__)


FILE_NAME_MAX = 255
Copy link
Contributor

Choose a reason for hiding this comment

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

Sorry to comment on a merged PR, but this shoud be NAME_MAX.

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