Skip to content
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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

julpark-rh
Copy link
Contributor

@julpark-rh julpark-rh commented Feb 21, 2025

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
  • Create a test case in Polarion reviewed and approved.
  • Create a design/automation approach doc. Optional for tests with similar tests already automated.
  • Review the automation design
  • Implement the test script and perform test runs
  • Submit PR for code review and approve
  • Update Polarion Test with Automation script details and update automation fields
  • If automation is part of Close loop, update BZ flag qe-test_coverage “+” and link Polarion test

@@ -153,3 +150,5 @@ def run(ceph_cluster, **kw):
log.info(e)
log.info(traceback.format_exc())
return 1
finally:
Copy link
Contributor

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
Copy link
Contributor

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",
Copy link
Contributor

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",
Copy link
Contributor

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)
Copy link
Contributor

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)
Copy link
Contributor

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)
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants