Repository navigation
mgr/vol: show statistics for progress made by clone - #55389
Closed
rishabh-d-dave wants to merge 17 commits into
Closed
rishabh-d-dave wants to merge 17 commits into
rishabh-d-dave wants to merge 17 commits into
Conversation
Add a helpers to check if config has a section and if section has option set (or as it is said in codebase, key present section). This will not only help in reducing typing effort and make code more readable code but it will also bring more uniformity to the code. Signed-off-by: Rishabh Dave <[email protected]>
Add helpers that can store collected statistics (size and the number of regular file, directories and symbolic links) and print, log and return them. Signed-off-by: Rishabh Dave <[email protected]>
Right now there is no way for users to figure out how much progress has been made in cloning a snapshot. Collect total size of data to be copied along with total number of regular files and directories before cloning. And then everytime some progress is made in cloning, show amount of data, regular files and directories copied. Also show percentage of progress made in output, where the percentage is "(data copied)/(total data to be copied) * 100". Fixes: https://tracker.ceph.com/issues/61904 Signed-off-by: Rishabh Dave <[email protected]>
Show a progress bar and percentage for an on-going clone. Fixes: https://tracker.ceph.com/issues/61904 Signed-off-by: Rishabh Dave <[email protected]>
When multiple clones are in progress, print a progress bar where progress in the average of progress made by all on-going clones. Also show average of percentage completed and a total number of on-going clones. Fixes: https://tracker.ceph.com/issues/61904 Signed-off-by: Rishabh Dave <[email protected]>
A progress bar for just ongoing clones can confuse users. Let's say, there are 6 clone jobs and 4 async clone threads are allowed. When one of the 4 jobs completes, percentange completed will reduce and progress bar will move back because a new job will be instantly moved from pending state to ongoing state. This progress for this new job will be 0% (unlike previous job in its place progress of which was 100%). This can pontentially confuse users. Another issue is user will never know when all clones, pending as well ongoing, will come to an end. For example, when there are total 40 clones, 4 in progress and 36 on-going, the progress bar will move back 36 times roughly. This will confuse as well as frustrate user since it will never know when cloning will end. To avoid these issues, add a second progess bar in "ceph -s" output which show progress for both ongoing as well as pending clones. Fixes: https://tracker.ceph.com/issues/61904 Signed-off-by: Rishabh Dave <[email protected]>
When a volume is deleted while one or more clones are in progress, make sure that progress bar(s) are removed from the output of command "ceph -s". Signed-off-by: Rishabh Dave <[email protected]>
This config option makes async cloner threads sleep for specified seconds after a regular file is copied. This option is added so that progress bar will halt after regular files copied. This allows testing progress bar for CephFS subvolume snapshot clones. Signed-off-by: Rishabh Dave <[email protected]>
Update code in this method such that it is easier on eyes. Add an empty line to separate each logical block, use a helper method since indentation is very high due for "with" clause. Signed-off-by: Rishabh Dave <[email protected]>
When one or more clones are cancelled, make sure progress bars are removed from the output of "ceph status" command. Signed-off-by: Rishabh Dave <[email protected]>
1. Let caller of these helper method decide the period of sleep. 2. Let caller check for multiple states. Signed-off-by: Rishabh Dave <[email protected]>
Add a helper method to check if clone is in pending state and add a separte method to check if clone is in cancelled state. Signed-off-by: Rishabh Dave <[email protected]>
1. Make method __check_clone_state() raise WrongCloneStatus exception instead of raising AssertionError so that it is unique and therefore easier to catch it. 2. Rename variable "timo" and "check" to more sensible names. 3. Log expected clone state and curren clone state for easy debugging. Signed-off-by: Rishabh Dave <[email protected]>
2. Don't produce a new random number everytime, rather let the name be a series. This is more predictable and helps while debugging tests. 2. Set default value for "n", the parameter through which we tell the number of names to be generated. 3. No need to loop when "n=1", return random generated name directly. 4. Starting numbering the names from one. This way last digit of name is 1 for first name. Signed-off-by: Rishabh Dave <[email protected]>
Before returning stdout (which is of type "str"), run str method strip() on it so that whitspace like space character and newline characters are deleted. Such whitespace characters are an hinderance when this str is to be used eventually. 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]>
Clone progress is shown to user through "ceph fs clone status" output and throught "ceph -s" output. Test both these features. Signed-off-by: Rishabh Dave <[email protected]>
4 of 14 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
xbetween the brackets:[x]. Spaces and capitalization matter when checking off items this way.Checklist
Show available Jenkins commands
jenkins retest this pleasejenkins test classic perfjenkins test crimson perfjenkins test signedjenkins test make checkjenkins test make check arm64jenkins test submodulesjenkins test dashboardjenkins test dashboard cephadmjenkins test apijenkins test docsjenkins render docsjenkins test ceph-volume alljenkins test ceph-volume toxjenkins test windowsjenkins test rook e2e