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

vm snapshot test case #11045

Merged
merged 4 commits into from
Dec 20, 2024
Merged

vm snapshot test case #11045

merged 4 commits into from
Dec 20, 2024

Conversation

parikshithb
Copy link
Contributor

No description provided.

Signed-off-by: Parikshith <[email protected]>
@parikshithb parikshithb added the team/e2e E2E team related issues/PRs label Dec 13, 2024
@parikshithb parikshithb self-assigned this Dec 13, 2024
@parikshithb parikshithb requested review from a team as code owners December 13, 2024 12:37
@pull-request-size pull-request-size bot added the size/M PR that changes 30-99 lines label Dec 13, 2024
Copy link

@ocs-ci ocs-ci left a comment

Choose a reason for hiding this comment

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

PR validation on existing cluster

Cluster Name: pbyregow-cnv3
Cluster Configuration:
PR Test Suite: workloads
PR Test Path: tests/functional/workloads/cnv/test_vm_cloning_ops.py::TestVmSnapshotClone::test_vm_snapshot_ops
Additional Test Params:
OCP VERSION: 4.17
OCS VERSION: 4.17
tested against branch: master

Job UNSTABLE (some or all tests failed).

Signed-off-by: Parikshith <[email protected]>
@pull-request-size pull-request-size bot added size/L PR that changes 100-499 lines and removed size/M PR that changes 30-99 lines labels Dec 13, 2024
Copy link

@ocs-ci ocs-ci left a comment

Choose a reason for hiding this comment

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

PR validation on existing cluster

Cluster Name: pbyregow-cnv3
Cluster Configuration:
PR Test Suite: workloads
PR Test Path: tests/functional/workloads/cnv/test_vm_cloning_ops.py::TestVmSnapshotClone::test_vm_snapshot_ops
Additional Test Params:
OCP VERSION: 4.17
OCS VERSION: 4.17
tested against branch: master

Job PASSED.

Signed-off-by: Parikshith <[email protected]>
Copy link

@ocs-ci ocs-ci left a comment

Choose a reason for hiding this comment

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

PR validation on existing cluster

Cluster Name: pbyregow-cnv3
Cluster Configuration:
PR Test Suite: workloads
PR Test Path: tests/functional/workloads/cnv/test_vm_snapshot_cloning_ops.py::TestVmSnapshotClone::test_vm_snapshot_ops
Additional Test Params:
OCP VERSION: 4.17
OCS VERSION: 4.17
tested against branch: master

Job UNSTABLE (some or all tests failed).

Signed-off-by: Parikshith <[email protected]>
Copy link

@ocs-ci ocs-ci left a comment

Choose a reason for hiding this comment

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

PR validation on existing cluster

Cluster Name: pbyregow-cnv3
Cluster Configuration:
PR Test Suite: workloads
PR Test Path: tests/functional/workloads/cnv/test_vm_snapshot_cloning_ops.py::TestVmSnapshotClone::test_vm_snapshot_ops
Additional Test Params:
OCP VERSION: 4.17
OCS VERSION: 4.17
tested against branch: master

Job PASSED.

@parikshithb parikshithb added the Verified Mark when PR was verified and log provided label Dec 17, 2024
Comment on lines +114 to +115
# Write new file to VM
run_dd_io(vm_obj=res_vm_obj, file_path=file_paths[1], verify=True)
Copy link
Contributor

Choose a reason for hiding this comment

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

this should be done after validating the data integrity

Copy link
Contributor

@avd-sagare avd-sagare Dec 20, 2024

Choose a reason for hiding this comment

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

Sure I am working on this and it will take care in my next PR

res_csum = cal_md5sum_vm(vm_obj=res_vm_obj, file_path=file_paths[0])
assert (
source_csum == res_csum
), f"Failed: MD5 comparison between source {vm_obj.name} and cloned {res_vm_obj.name} VMs"
Copy link
Contributor

Choose a reason for hiding this comment

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

the operation is restore not clone, please update the assert message accordingly

Copy link
Contributor

@avd-sagare avd-sagare Dec 20, 2024

Choose a reason for hiding this comment

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

Sure I am working on this and it will take care in my next PR

assert (
source_csum == res_csum
), f"Failed: MD5 comparison between source {vm_obj.name} and cloned {res_vm_obj.name} VMs"
res_vm_obj.stop()
Copy link
Contributor

Choose a reason for hiding this comment

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

step 7 says "Delete all the VMs created as part of this test", here we are only stopping the VM, not deleting it

Copy link
Contributor

@avd-sagare avd-sagare Dec 20, 2024

Choose a reason for hiding this comment

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

Sure I am working on this and it will take care in my next PR

res_snap_obj = snapshot_restore_factory(
snapshot_obj=snap_obj,
storageclass=vm_obj.sc_name,
size=vm_obj.pvc_size,
Copy link
Contributor

Choose a reason for hiding this comment

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

Ideally, the pvc size will be same as the restore size of snapshot. This is not a must and can be removed

Copy link
Contributor

@avd-sagare avd-sagare Dec 20, 2024

Choose a reason for hiding this comment

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

Sure I am working on this and it will take care in my next PR

@@ -7088,7 +7091,8 @@ def teardown():
Cleans up the CNV workloads

"""
for cnv_wl in cnv_workloads:
# Iterating from end so that restored VMs are deleted before source
Copy link
Contributor

Choose a reason for hiding this comment

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

Is deleting the restored VMs before the source causing any problems? At least in PVCs, IIRC, I don't think there will be any issues. The parent PVC can be deleted even with the restored PVC in use

Copy link
Contributor

@avd-sagare avd-sagare Dec 20, 2024

Choose a reason for hiding this comment

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

Sure I am working on this and I will take care of this in my next immediate PR.

Copy link
Contributor

Choose a reason for hiding this comment

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

Based on avadhoot's comments, I will merge this PR as it's required urgently and low priority review comments will be handled in a followup PR

Copy link
Contributor

@shylesh shylesh left a comment

Choose a reason for hiding this comment

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

lgtm

Copy link

openshift-ci bot commented Dec 20, 2024

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: avd-sagare, hnallurv, parikshithb, shylesh

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@shylesh shylesh merged commit ebc7fe3 into red-hat-storage:master Dec 20, 2024
7 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm size/L PR that changes 100-499 lines team/e2e E2E team related issues/PRs Verified Mark when PR was verified and log provided
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants