Skip to content

mds: add MDS asok command for dumping stray directories#60684

Merged
kotreshhr merged 4 commits intoceph:mainfrom
salieri11:wip-igolikov-asok-56442
Mar 24, 2025
Merged

mds: add MDS asok command for dumping stray directories#60684
kotreshhr merged 4 commits intoceph:mainfrom
salieri11:wip-igolikov-asok-56442

Conversation

@salieri11
Copy link
Contributor

@salieri11 salieri11 commented Nov 10, 2024

This PR adds new MDS asok command
dump stray
which will dump the content of the stray folders in the MDS.

Current output:

[
    "stray_inode": {
        "ino": "0x100000001f7",
        "stray_prior_path": "/dir/dir1",
        "client_caps": [
            {
                "client_id": 4156,
                "pending": "pAsLsXsFscr",
                "issued": "pAsLsXsFscr",
                "wanted": "-",
                "last_sent": 3
            }
        ],
        "loner": -1,
        "want_loner": -1,
        "mds_caps_wanted": [],
        "is_subvolume": false
    },
]

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

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

@salieri11 salieri11 added the wip-igolikov WIP PR, do not merge label Nov 10, 2024
@salieri11 salieri11 requested a review from batrick November 10, 2024 19:10
@salieri11 salieri11 self-assigned this Nov 10, 2024
@github-actions github-actions bot added the cephfs Ceph File System label Nov 10, 2024
@gregsfortytwo
Copy link
Member

Looks like this needs to grab the mds_lock; I don't think anything is doing that automatically?
I'm also not sure if scan_stray_dir() is safe to call at random times or not?

Copy link
Member

@joscollin joscollin left a comment

Choose a reason for hiding this comment

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

@salieri11 No qa test & doc updates for this?

@salieri11
Copy link
Contributor Author

No qa test & doc updates for this?
Definitely. Can you please refer me to docs location (how can I update it) and some simple example for QA test?

@joscollin
Copy link
Member

No qa test & doc updates for this?
Definitely. Can you please refer me to docs location (how can I update it) and some simple example for QA test?

Probably where stray directories are mentioned in the docs or in troubleshooting.
The qa test should probably go to test_strays.py.

@salieri11 salieri11 requested a review from a team as a code owner December 1, 2024 19:59
@salieri11 salieri11 requested review from a team as code owners December 4, 2024 12:28
@salieri11 salieri11 requested review from Achintk1491 and prgoel-code and removed request for a team December 4, 2024 12:28
@salieri11
Copy link
Contributor Author

jenkins retest this please

@salieri11
Copy link
Contributor Author

jenkins test make check

@salieri11
Copy link
Contributor Author

jenkins test dashboard

@salieri11
Copy link
Contributor Author

@vshankar vshankar requested a review from batrick February 21, 2025 03:58
@salieri11 salieri11 dismissed batrick’s stale review February 24, 2025 09:31

requested changes have been implemented

@batrick batrick force-pushed the wip-igolikov-asok-56442 branch from e899bc4 to 7ea962b Compare February 24, 2025 17:07
@batrick
Copy link
Member

batrick commented Feb 24, 2025

@salieri11 I made some adjustments to your commit ordering, commit titles, removed a code comment / whitespace churn, and squashed a bug fix to your code.

$ git push git@github.com:salieri11/ceph.git HEAD:wip-igolikov-asok-56442 --force
Enumerating objects: 962, done.
Counting objects: 100% (456/456), done.
Delta compression using up to 32 threads
Compressing objects: 100% (126/126), done.
Writing objects: 100% (241/241), 48.33 KiB | 8.05 MiB/s, done.
Total 241 (delta 204), reused 144 (delta 114), pack-reused 0 (from 0)
remote: Resolving deltas: 100% (204/204), completed with 128 local objects.
To github.com:salieri11/ceph.git
 + e899bc4024ae...7ea962b748a3 HEAD -> wip-igolikov-asok-56442 (forced update)

I mostly used git rebase -i to do that. Please have a look.

@salieri11
Copy link
Contributor Author

@salieri11 I made some adjustments to your commit ordering, commit titles, removed a code comment / whitespace churn, and squashed a bug fix to your code.

$ git push git@github.com:salieri11/ceph.git HEAD:wip-igolikov-asok-56442 --force
Enumerating objects: 962, done.
Counting objects: 100% (456/456), done.
Delta compression using up to 32 threads
Compressing objects: 100% (126/126), done.
Writing objects: 100% (241/241), 48.33 KiB | 8.05 MiB/s, done.
Total 241 (delta 204), reused 144 (delta 114), pack-reused 0 (from 0)
remote: Resolving deltas: 100% (204/204), completed with 128 local objects.
To github.com:salieri11/ceph.git
 + e899bc4024ae...7ea962b748a3 HEAD -> wip-igolikov-asok-56442 (forced update)

I mostly used git rebase -i to do that. Please have a look.

Thanks, Patrick. Appreciate your help here.

@salieri11
Copy link
Contributor Author

jenkins test make check arm64

@salieri11 salieri11 force-pushed the wip-igolikov-asok-56442 branch from 7ea962b to ed6867d Compare February 26, 2025 14:39
the rename makes the code consistent and allows to call the
`MDSContext::finish` method from the `C_MDS_DumpStrayDirCtx::finish` method,
which fortifies the safety of the new dump stray folder command.

Signed-off-by: Igor Golikov <igolikov@ibm.com>
Fixes: http://tracker.ceph.com/issues/56442
Fixes: https://tracker.ceph.com/issues/56442
Signed-off-by: Igor Golikov <igolikov@ibm.com>
@salieri11 salieri11 force-pushed the wip-igolikov-asok-56442 branch from ed6867d to f858fa9 Compare March 3, 2025 15:28
@salieri11
Copy link
Contributor Author

jenkins retest this please

@salieri11 salieri11 removed the wip-igolikov WIP PR, do not merge label Mar 5, 2025
@salieri11 salieri11 moved this from Review in progress to Reviewer approved in Ceph-Dashboard Mar 5, 2025
@salieri11 salieri11 moved this from Reviewer approved to Ready-to-merge in Ceph-Dashboard Mar 5, 2025
@vshankar
Copy link
Contributor

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

@kotreshhr
Copy link
Contributor

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

@vshankar No related failures. Please check run wiki here https://tracker.ceph.com/projects/cephfs/wiki/QA_main_2025#wip-vshankar-testing-20250313072951-debug
I think the ceph dashboard and rook e2e tests are not related. Please confirm and merge this.

@vshankar
Copy link
Contributor

jenkins test dashboard

@vshankar
Copy link
Contributor

jenkins test dashboard cephadm

@vshankar
Copy link
Contributor

jenkins test rook e2e

@vshankar
Copy link
Contributor

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

@vshankar No related failures. Please check run wiki here https://tracker.ceph.com/projects/cephfs/wiki/QA_main_2025#wip-vshankar-testing-20250313072951-debug I think the ceph dashboard and rook e2e tests are not related. Please confirm and merge this.

Looks good.

@ljflores
Copy link
Member

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

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

10 participants