Skip to content

mgr/vol: show progress and stats for the subvolume snapshot clones - #54620

Merged
vshankar merged 11 commits into
ceph:mainfrom
rishabh-d-dave:mgr-vol-clone-stats
Aug 26, 2024
Merged

vshankar merged 11 commits into
ceph:mainfrom
rishabh-d-dave:mgr-vol-clone-stats

Conversation

@rishabh-d-dave

@rishabh-d-dave rishabh-d-dave commented Nov 22, 2023 •

Copy link
Copy Markdown
Contributor

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

Earlier approach archived here - PR #55389

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

@rishabh-d-dave rishabh-d-dave added cephfs Ceph File System pybind labels Nov 22, 2023
@rishabh-d-dave
rishabh-d-dave requested a review from a team November 22, 2023 19:00
@rishabh-d-dave

Copy link
Copy Markdown
Contributor Author

@vshankar I got to know that we want to try to use rstats than a python method/function. Please ignore that for now and let me know if the rest of the PR looks fine.

@rishabh-d-dave

Copy link
Copy Markdown
Contributor Author

@rishabh-d-dave
rishabh-d-dave marked this pull request as draft November 23, 2023 09:02
Comment thread src/pybind/mgr/volumes/fs/misc_util.py Resolved
@vshankar
vshankar requested a review from a team November 23, 2023 11:39
Comment thread src/pybind/mgr/volumes/fs/misc_util.py Resolved
@rishabh-d-dave
rishabh-d-dave force-pushed the mgr-vol-clone-stats branch 5 times, most recently from 6790195 to b425e17 Compare November 29, 2023 19:42
@github-actions github-actions Bot added the tests label Nov 29, 2023
@github-actions

Copy link
Copy Markdown

This pull request can no longer be automatically merged: a rebase is needed and changes have to be manually resolved

@vshankar

Copy link
Copy Markdown
Contributor

@rishabh-d-dave ping back when this is ready for review again.

@rishabh-d-dave
rishabh-d-dave force-pushed the mgr-vol-clone-stats branch 2 times, most recently from 3ffe725 to d7d3306 Compare December 3, 2023 19:18
@vshankar
vshankar requested a review from a team December 4, 2023 04:50
Comment thread src/pybind/mgr/progress/module.py Resolved
@rishabh-d-dave
rishabh-d-dave marked this pull request as ready for review December 4, 2023 13:47
Print a progress bar for ongoing clone job in output of "ceph status".

When multiple clones are ongoing, show 1 progress bar in output of
"ceph status" shows average of progress made by each clone.

When number of clone job is more than number of clone threads, print 2
progress bars in output of "ceph status"  command; one for ongoing clone
jobs and other for ongoing+pending clone jobs.

Fixes: https://tracker.ceph.com/issues/61904
Signed-off-by: Rishabh Dave <[email protected]>
1. Let caller check for multiple states. It might happen that clone
   finishes while it is being cancelled, in such cases user might want
    to check for both.
2. Add a helper method to check if clone is in pending state and add a
   separate method to check if clone is in cancelled state.

Signed-off-by: Rishabh Dave <[email protected]>
Add a helper method that accepts command arguments (along with rest of
paramters accepted by the method run_shell()) and return the stdout of
the command.

Signed-off-by: Rishabh Dave <[email protected]>
TestVolumesHelper._do_subvolume_io() is a helper method that allows
users to generate data for testing. mgr/vol code that reports progress
made by clone jobs depends on the value set for xattr rbytes. It takes
a bit of a time for rbytes to be set.

And, therefore, all tests in TestCloneProgressReporter needs to wait for
subvolume's rbytes xattr's value to be set to the actual amount of data
present on the subvolume before proceeding to actually testing.

So that this can be achieved make _do_subvolume_io() return size of the
data it has generated.

Signed-off-by: Rishabh Dave <[email protected]>
Clone progress is shown to user through "ceph fs clone status" output
and through "ceph status" output. Test both these features.

Signed-off-by: Rishabh Dave <[email protected]>
Update docs and add release notes about the progress report that is
printed in output of "ceph fs clone status" command and progress bars
that is/are printed in output of "ceph status" command.

Signed-off-by: Rishabh Dave <[email protected]>
Test name is test_subvolume_snapshot_info_if_clone_pending_for_no_group,
located in class TestSubvolumeSnapshotClones in test_volumes.py

5 seconds can (sometimes) be insufficient as value of the config option
"snapshot_clone_delay" in this. Increase it to avoid unnecessary race
conditions which leads to irrelevant failures.

Following is an example where 5 seconds was insufficient as waiting
period since instead it took 8 seconds -

2024-07-28T18:16:10.088 DEBUG:teuthology.orchestra.run.smithi064:> sudo adjust-ulimits ceph-coverage /home/ubuntu/cephtest/archive/coverage timeout 120 ceph --cluster ceph config set mgr mgr/volumes/snapshot_clone_no_wait False
...
2024-07-28T18:16:18.694 DEBUG:teuthology.orchestra.run.smithi064:> sudo adjust-ulimits ceph-coverage /home/ubuntu/cephtest/archive/coverage timeout 120 ceph --cluster ceph fs subvolume snapshot info cephfs subvol79370 subvol_snap40980

This issue was seen during testing of PR to which this commit belongs.

This commit has been separated from the commit that adds tests for clone
progress reporting so that it's easy to document need for this code
patch and also track it.

This commit is not being moved to a different PR and been kept on the
same PR since it can't be reproduced otherwise. This also ensures that
commit is backported to older release along with code that caused this
issue, causing no one to need to find this commit while backporting
effort.

Signed-off-by: Rishabh Dave <[email protected]>
@vshankar

Copy link
Copy Markdown
Contributor

@rishabh-d-dave

Copy link
Copy Markdown
Contributor Author

jenkins test make check

@rishabh-d-dave

Copy link
Copy Markdown
Contributor Author

jenkins test api

@rishabh-d-dave

Copy link
Copy Markdown
Contributor Author

@rishabh-d-dave

Copy link
Copy Markdown
Contributor Author

jenkins test api

@rishabh-d-dave

Copy link
Copy Markdown
Contributor Author

@rishabh-d-dave

Copy link
Copy Markdown
Contributor Author

jenkins test api

@rishabh-d-dave

Copy link
Copy Markdown
Contributor Author

@rishabh-d-dave

Copy link
Copy Markdown
Contributor Author

jenkins test api

@rishabh-d-dave

rishabh-d-dave commented Aug 19, 2024 •

Copy link
Copy Markdown
Contributor Author

Strangely build for API failed this time even though build and also unit tests passed during make check - https://jenkins.ceph.com/job/ceph-api/79919.

@rishabh-d-dave

Copy link
Copy Markdown
Contributor Author

jenkins test make check

1 similar comment
@rishabh-d-dave

Copy link
Copy Markdown
Contributor Author

jenkins test make check

@rishabh-d-dave

Copy link
Copy Markdown
Contributor Author

jenkins test api

@rishabh-d-dave

rishabh-d-dave commented Aug 19, 2024 •

Copy link
Copy Markdown
Contributor Author

Finally ceph API passed!

@vshankar vshankar left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

fs suite tests look good. will merge this soon (pending run wiki update)

@vshankar

Copy link
Copy Markdown
Contributor

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants