-
Notifications
You must be signed in to change notification settings - Fork 83
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
adding rename scenario in tier-1 #4467
base: main
Are you sure you want to change the base?
Conversation
6b22feb
to
0eeefe8
Compare
@@ -153,3 +150,5 @@ def run(ceph_cluster, **kw): | |||
log.info(e) | |||
log.info(traceback.format_exc()) | |||
return 1 | |||
finally: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it okay to retain the file system? Because i see, there was a deletion of file system earlier. Will this have any impact on run using tier suite?
default_fs = "cephfs_new" | ||
new_name = "renamed_fs3" | ||
fs_util.rename_volume(clients[0], default_fs, new_name) | ||
default_fs = new_name |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this line 87 needs an update.. Else this may fail for version starting with 4
if fs_util.get_fs_info(clients[0], "cephfs_new"):
default_fs = "cephfs_new"
for command in commands: | ||
client1.exec_command(sudo=True, cmd=command) | ||
results.append(f"{command} successfully executed") | ||
wait_for_process(client1, "cephfs_new") | ||
new_name = "renamed_fs1" | ||
FsUtils_v1.rename_volume(client1, fs_name_old, new_name) | ||
commands = [ | ||
"ceph config set mon mon_allow_pool_delete true", | ||
"ceph fs volume rm cephfs_new --yes-i-really-mean-it", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This may fail since rename was done to new name
@@ -79,7 +83,7 @@ def run(ceph_cluster, **kw): | |||
results.append(f"{command} successfully executed") | |||
|
|||
verifyremove_command = [ | |||
"ceph fs ls | grep cephfs_new", | |||
f"ceph fs ls | grep {new_name}", | |||
"ceph osd lspools | grep cephfs.cephfs_new", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need to update ceph osd lspools with the renamed fs name
@@ -94,6 +98,8 @@ def run(ceph_cluster, **kw): | |||
return 0 | |||
|
|||
except Exception as e: | |||
log.info(e) | |||
log.info(traceback.format_exc()) | |||
log.error(e) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need to update line number 93 with the renamed fs name
wait_for_process(client1, "cephfs_new", ispresent=False)
fs_name = "cephfs" if not erasure else "cephfs-ec" | ||
fs_name_old = "cephfs_new" | ||
fs_name = "renamed_fs4" | ||
fs_util.rename_volume(client[0], fs_name_old, fs_name) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needs update on line number 110
if "4." in rhbuild:
fs_name = "cephfs_new"
fs_name = "cephfs" if not erasure else "cephfs-ec" | ||
fs_name_old = "cephfs_new" | ||
fs_name = "renamed_fs7" | ||
fs_util.rename_volume(client[0], fs_name_old, fs_name) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This rename should be moved to else condition. This may work if there is an exisiting cephfs with name "cephfs_new" and may fail for new run. I see this is in few of the TC's. You can take a look
fs_util.rename_volume(client1, fs_name_old, fs_name)
fs_details = fs_util.get_fs_info(client1, fs_name)
if not fs_details:
fs_util.create_fs(client1, fs_name)
else:
rename logic
Signed-off-by: julpark <[email protected]>
Description
tier-1:http://magna002.ceph.redhat.com/cephci-jenkins/cephci-run-5AJE6E/
tier-0:http://magna002.ceph.redhat.com/cephci-jenkins/cephci-run-PPJ4MF/
I have renamed the volume in the middle of tier-1 suite to validate all the functions work well even thou name is changed.
After each test case, it changed back to "cephfs_new", all the test cases are using same volume. (modified some test cases)
Please include Automation development guidelines. Source of Test case - New Feature/Regression Test/Close loop of customer BZs
Please include Automation development guidelines. Source of Test case - New Feature/Regression Test/Close loop of customer BZs
click to expand checklist