Repository navigation
reef: qa/cephfs: improvements for name generators in test_volumes.py - #54729
Merged
Merged
Conversation
vshankar
requested changes
Mar 19, 2024
vshankar
left a comment
Contributor
There was a problem hiding this comment.
@rishabh-d-dave please rebase this with changes to tests to use the new helper name.
Move tests for "ceph fs volume rename" command to a new class. This makes it possible to run this group of tests in a single command. This provides a convenient way to execute these tests which is necessary after the changes has been made to the code for the "ceph fs volume rename" command. Signed-off-by: Rishabh Dave <[email protected]> (cherry picked from commit e268908) Conflicts: qa/tasks/cephfs/test_volumes.py test_rename_when_fs_is_online() is not present on Quincy branch, unlike main branch
Generate a name that is shorter and easier to remember. Also, write a simpler, faster & better helper method for generating unique names. This method will also have shorter and more concise name, so this will be easier to type and easier to read. Fixes: https://tracker.ceph.com/issues/63680 Signed-off-by: Rishabh Dave <[email protected]> (cherry picked from commit ad96e91) Conflicts: qa/tasks/cephfs/test_volumes.py Unlike main branch, on Quincy branch test methods test_rename_when_clients_arent_refused(), test_rename_when_fs_is_online(), test_periodic_async_work() and test_subvolume_group_rm_when_its_not_empty() are absent.
Writing guest keyring to CWD's file named "keyring" will over-write build/keyring on developer's machine which will make the cluster inoperatable and also fail the test. Fixes: https://tracker.ceph.com/issues/63506 Signed-off-by: Rishabh Dave <[email protected]> (cherry picked from commit 974c4f9)
Fix warnings printed by the command "flake8 --select=F,E9 --exclude=venv,.tox src/pybind/mgr/volumes/". While working with mgr/vol, syntax errors are not printed anywhere. Any attempt to run vstart.sh after such faulty patch causes vstart.sh to go in a infinite loop. And running "ceph fs volume" command prints "no such command exists". This doesn't tell the actual issue and causes confusion. When flake8 is run, the issue is not immediately apparent due to so many warnings. Therefore, fix these warnings so that it becomes easier to spot such critical issues here onwards. Note: mypy uses comments like "#type: Dict" for type checking and therefore counts 'from typechecking import Dict' as not unsued. But flake8 doesn't recognize type hints embedded in comment. Therfore, switch to actually using type hints instead of adding type hints to comments. Signed-off-by: Rishabh Dave <[email protected]> (cherry picked from commit 95dac20)
It's not obvious where the clone creation is performed. It's especially obfuscated because we call the function/method for cloning indirectly. Therefore, add comments where necessary and mark it with heavy rating. Same goes for all other "subvolume snapshot clone" operations. Signed-off-by: Rishabh Dave <[email protected]> (cherry picked from commit 2e0b4ae)
Instead of writing like this -
if abcd1.abcd2(abcd3) and abcd4 == abcd5
print('efgh6')
if abcd7.abcd8(abcd9) and abcd4 == abcd5
print('efgh10')
Write like this because it easier to read, especially in case of the
patch where condition under is really long -
if abcd4 == abcd5:
if abcd1.abcd2(abcd3):
print('abcd4')
if abcd5.abcd8(abcd9):
print('abcd5')
Signed-off-by: Rishabh Dave <[email protected]>
(cherry picked from commit e0034e5)
Method "open_clone_subvolume_pair()" returns subvolumes, yet return value is named as clone_volume. Rectify this mistake. Signed-off-by: Rishabh Dave <[email protected]> (cherry picked from commit 060de1d)
_generate_random_group_name() and _generate_random_subvolume_name() were deleted in one of the commit from this series of commits. And PR ceph#54207 adds calls to these helper methods. This wasn't the case for the main branch version of this series of commits. This is why this issue is being fixed in Reef branch directly through a fresh/new commit instead of backporting a commit. Signed-off-by: Rishabh Dave <[email protected]>
rishabh-d-dave
force-pushed
the
wip-63688-reef
branch
from
March 22, 2024 17:15
bd7f718 to
741e6e1
Compare
Contributor
Author
Fixed. 741e6e1 |
Contributor
|
jenkins test make check |
vshankar
approved these changes
Apr 2, 2024
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.
backport tracker: https://tracker.ceph.com/issues/63688
backport of #54631, #54616, #54308 and e268908
parent tracker: https://tracker.ceph.com/issues/63680
this backport was staged using ceph-backport.sh version 16.0.0.6848
find the latest version at https://github.com/ceph/ceph/blob/main/src/script/ceph-backport.sh