-
Notifications
You must be signed in to change notification settings - Fork 170
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 pvc clone #11151
base: master
Are you sure you want to change the base?
VM snapshot pvc clone #11151
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: ayush-patni 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 |
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.
PR validation on existing cluster
Cluster Name: apatni-cnv-hotpl2
Cluster Configuration:
PR Test Suite:
PR Test Path: tests/functional/workloads/cnv/test_vm_snapshot_cloning_ops.py::TestVmSnapshotClone::test_vm_snapshot_pvc_clone
Additional Test Params:
OCP VERSION: 4.18
OCS VERSION: 4.18
tested against branch: master
Job UNSTABLE (some or all tests failed).
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.
PR validation on existing cluster
Cluster Name: apatni-cnv-hotpl2
Cluster Configuration:
PR Test Suite:
PR Test Path: tests/functional/workloads/cnv/test_vm_snapshot_cloning_ops.py::TestVmSnapshotClone::test_vm_snapshot_pvc_clone
Additional Test Params:
OCP VERSION: 4.18
OCS VERSION: 4.18
tested against branch: master
Job UNSTABLE (some or all tests failed).
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.
PR validation on existing cluster
Cluster Name: apatni-cnv-hotpl2
Cluster Configuration:
PR Test Suite:
PR Test Path: tests/functional/workloads/cnv/test_vm_snapshot_cloning_ops.py::TestVmSnapshotClone::test_vm_snapshot_pvc_clone
Additional Test Params:
OCP VERSION: 4.18
OCS VERSION: 4.18
tested against branch: master
Job UNSTABLE (some or all tests failed).
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.
PR validation on existing cluster
Cluster Name: apatni-cnv-snap
Cluster Configuration:
PR Test Suite:
PR Test Path: tests/functional/workloads/cnv/test_vm_snapshot_cloning_ops.py::TestVmSnapshotClone::test_vm_snapshot_pvc_clone
Additional Test Params:
OCP VERSION: 4.18
OCS VERSION: 4.18
tested against branch: master
7. Verify that the data persisted after cloning | ||
""" | ||
proj_obj = project_factory() | ||
file_paths = ["/file.txt", "/new_file.txt"] |
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.
You are not writing new data in the test. There is no need for new_file.txt here
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.
We'll be utilising the path for new data
https://github.com/red-hat-storage/ocs-ci/pull/11151/files#r1923153342
existing_pvc_obj=res_snap_obj, | ||
namespace=vm_obj.namespace, | ||
storageclass=vm_obj.sc_name, | ||
)[-1] |
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.
indexing was removed in the cnv_workload fixture, please rebase your PR to pull the latest code
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.
Done
# Clone the restored VM | ||
res_vm_obj_clone = clone_vm_workload( | ||
res_vm_obj, namespace=vm_obj.namespace | ||
)[-1] |
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.
indexing was removed in the clone_vm_workload fixture, please rebase your PR to pull the latest code
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.
Done
@@ -119,3 +119,76 @@ def test_vm_snapshot_ops( | |||
source_csum == res_csum | |||
), f"Failed: MD5 comparison between source {vm_obj.name} and cloned {res_vm_obj.name} VMs" | |||
res_vm_obj.stop() | |||
|
|||
@workloads | |||
@pytest.mark.polarion_id("OCS-") |
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.
Please create a testcase in polarion and add its id here
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.
Done
assert source_csum == res_csum, ( | ||
f"Failed: MD5 comparison between source {vm_obj.name} and cloned " | ||
f"{res_vm_obj.name} VMs" | ||
) |
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.
Add new data in cloned vm
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.
Done
4. Deploy a new VM using the restored snapshot PVC | ||
5. Clone the VM workload to create a new PVC from the restored snapshot PVC | ||
6. Check data integrity in the cloned VM | ||
7. Verify that the data persisted after cloning |
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.
Add step which we added at last
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.
Done
size=vm_obj.pvc_size, | ||
volume_mode=snap_obj.parent_volume_mode, | ||
access_mode=vm_obj.pvc_access_mode, | ||
status=constants.STATUS_BOUND, |
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.
By default is constants.STATUS_BOUND
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.
Removed
d1893f3
to
1bbf69d
Compare
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.
PR validation on existing cluster
Cluster Name: apatni-cnv-snap3
Cluster Configuration:
PR Test Suite:
PR Test Path: tests/functional/workloads/cnv/test_vm_snapshot_cloning_ops.py::TestVmSnapshotClone::test_vm_snapshot_pvc_clone
Additional Test Params:
OCP VERSION: 4.18
OCS VERSION: 4.18
tested against branch: master
Job UNSTABLE (some or all tests failed).
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.
PR validation on existing cluster
Cluster Name: apatni-cnv-snap3
Cluster Configuration:
PR Test Suite:
PR Test Path: tests/functional/workloads/cnv/test_vm_snapshot_cloning_ops.py::TestVmSnapshotClone::test_vm_snapshot_pvc_clone
Additional Test Params:
OCP VERSION: 4.18
OCS VERSION: 4.18
tested against branch: master
Job UNSTABLE (some or all tests failed).
Signed-off-by: AYUSH-D-PATNI <[email protected]>
Signed-off-by: AYUSH-D-PATNI <[email protected]>
Signed-off-by: AYUSH-D-PATNI <[email protected]>
Signed-off-by: AYUSH-D-PATNI <[email protected]>
Signed-off-by: AYUSH-D-PATNI <[email protected]>
Signed-off-by: AYUSH-D-PATNI <[email protected]>
Signed-off-by: AYUSH-D-PATNI <[email protected]>
Signed-off-by: AYUSH-D-PATNI <[email protected]>
Signed-off-by: AYUSH-D-PATNI <[email protected]>
Signed-off-by: AYUSH-D-PATNI <[email protected]>
Signed-off-by: AYUSH-D-PATNI <[email protected]>
Signed-off-by: AYUSH-D-PATNI <[email protected]>
Signed-off-by: AYUSH-D-PATNI <[email protected]>
Signed-off-by: AYUSH-D-PATNI <[email protected]>
Signed-off-by: AYUSH-D-PATNI <[email protected]>
Signed-off-by: AYUSH-D-PATNI <[email protected]>
6b155db
to
8fa4474
Compare
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.
PR validation on existing cluster
Cluster Name: apatni-cnv-snap3
Cluster Configuration:
PR Test Suite:
PR Test Path: tests/functional/workloads/cnv/test_vm_snapshot_cloning_ops.py::TestVmSnapshotClone::test_vm_snapshot_pvc_clone
Additional Test Params:
OCP VERSION: 4.18
OCS VERSION: 4.18
tested against branch: master
Job UNSTABLE (some or all tests failed).
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.
PR validation on existing cluster
Cluster Name: apatni-cnv-snap3
Cluster Configuration:
PR Test Suite:
PR Test Path: tests/functional/workloads/cnv/test_vm_snapshot_cloning_ops.py::TestVmSnapshotClone::test_vm_snapshot_pvc_clone
Additional Test Params:
OCP VERSION: 4.18
OCS VERSION: 4.18
tested against branch: master
This PR consists of two test cases resp for CNV: VM snapshot pvc clone.
Replacing PR 11062 with this one for better availability