kubernetes-sigs / vsphere-csi-driver

vSphere storage Container Storage Interface (CSI) plugin
https://docs.vmware.com/en/VMware-vSphere-Container-Storage-Plug-in/index.html
Apache License 2.0
289 stars 173 forks source link

Update Snapshot-specific CnsVolumeOperationDetails in CSI CreateSnapshot #2857

Closed nikhilbarge closed 2 months ago

nikhilbarge commented 3 months ago

What this PR does / why we need it: Update Snapshot-specific CnsVolumeOperationDetails in CSI CreateSnapshot, to deliver the extra params to the volmanager that creates the CnsVolumeOperationDetails.

Testing done: Run e2e test

Performed manual testing :

verified if snapshot created successfully with extra params :

{"level":"info","time":"2024-05-03T12:05:44.008990613Z","caller":"wcp/controller.go:1587","msg":"WCP CreateSnapshot: called with args {SourceVolumeId:ccd01548-20df-480e-82e5-3e5af5e307c4 Name:snapshot-ab0c8958-b1ba-4057-aa9b-fef97ba768cf Secrets:map[] Parameters:map[csi.storage.k8s.io/volumesnapshot/name:example-vanilla-rwo-filesystem-snapshot csi.storage.k8s.io/volumesnapshot/namespace:testsnap csi.storage.k8s.io/volumesnapshotcontent/name:snapcontent-ab0c8958-b1ba-4057-aa9b-fef97ba768cf] XXX_NoUnkeyedLiteral:{} XXX_unrecognized:[] XXX_sizecache:0}","TraceId":"f3240a6d-bbb0-4dff-9820-167fac9a26ea"}
.
.
{"level":"info","time":"2024-05-03T12:05:44.048301347Z","caller":"volume/manager.go:2355","msg":"QuotaInfo during CreateSnapshot call: {Reserved:1Gi StoragePolicyId: StorageClassName:example-vanilla-rwo-filesystem-sc Namespace:testsnap}","TraceId":"f3240a6d-bbb0-4dff-9820-167fac9a26ea"}
{"level":"info","time":"2024-05-03T12:05:44.065082432Z","caller":"volume/util.go:402","msg":"Calling CnsClient.CreateSnapshots: VolumeID [\"ccd01548-20df-480e-82e5-3e5af5e307c4\"] Description [\"snapshot-ab0c8958-b1ba-4057-aa9b-fef97ba768cf-ccd01548-20df-480e-82e5-3e5af5e307c4\"] cnsSnapshotCreateSpecList [[]types.CnsSnapshotCreateSpec{types.CnsSnapshotCreateSpec{DynamicData:types.DynamicData{}, VolumeId:types.CnsVolumeId{DynamicData:types.DynamicData{}, Id:\"ccd01548-20df-480e-82e5-3e5af5e307c4\"}, Description:\"snapshot-ab0c8958-b1ba-4057-aa9b-fef97ba768cf-ccd01548-20df-480e-82e5-3e5af5e307c4\"}}]","TraceId":"f3240a6d-bbb0-4dff-9820-167fac9a26ea"}
.
.
.
{"level":"info","time":"2024-05-03T12:05:47.739970348Z","caller":"wcp/controller.go:1671","msg":"CreateSnapshot succeeded for snapshot ccd01548-20df-480e-82e5-3e5af5e307c4+0647df87-84bb-48cd-ab2a-9476fc6cc347 on volume ccd01548-20df-480e-82e5-3e5af5e307c4 size 1073741824 Time proto seconds:1714737944 nanos:804338000 Timestamp 2024-05-03 12:05:44.804338 +0000 UTC Response: snapshot:<size_bytes:1073741824 snapshot_id:\"ccd01548-20df-480e-82e5-3e5af5e307c4+0647df87-84bb-48cd-ab2a-9476fc6cc347\" source_volume_id:\"ccd01548-20df-480e-82e5-3e5af5e307c4\" creation_time:<seconds:1714737944 nanos:804338000 > ready_to_use:true > ","TraceId":"f3240a6d-bbb0-4dff-9820-167fac9a26ea"}

Controller logs - vsphere_csi_controller.log

Snapshot log - snapshot_create.log

Special notes for your reviewer:

Release note:

Update Snapshot-specific CnsVolumeOperationDetails in CSI CreateSnapshot
k8s-ci-robot commented 3 months ago

Hi @nikhilbarge. Thanks for your PR.

I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.
svcbot-qecnsdp commented 3 months ago

Started vanilla Block pipeline... Build Number: 2567

svcbot-qecnsdp commented 3 months ago
Block vanilla build status: FAILURE 
Stage before exit: e2e-tests 
Jenkins E2E Test Results: 
------------------------------

Ran 1 of 848 Specs in 393.820 seconds
SUCCESS! -- 1 Passed | 0 Failed | 0 Pending | 847 Skipped
PASS

Ginkgo ran 1 suite in 7m45.081437662s
Test Suite Passed
--
------------------------------

Ran 14 of 848 Specs in 6894.830 seconds
SUCCESS! -- 14 Passed | 0 Failed | 0 Pending | 834 Skipped
PASS

Ginkgo ran 1 suite in 1h55m13.517907113s
Test Suite Passed
--

Ran 52 of 848 Specs in 1369.550 seconds
FAIL! -- 42 Passed | 10 Failed | 0 Pending | 796 Skipped

Ginkgo ran 1 suite in 23m10.313488886s

Test Suite Failed
svcbot-qecnsdp commented 2 months ago

Started WCP block pre-checkin pipeline... Build Number: 1402

svcbot-qecnsdp commented 2 months ago
Build ID: 1402
WCP build status: FAILURE 
Stage before exit: null 
svcbot-qecnsdp commented 2 months ago

Started WCP block pre-checkin pipeline... Build Number: 1403

svcbot-qecnsdp commented 2 months ago
Build ID: 1403
WCP build status: FAILURE 
Stage before exit: null 
svcbot-qecnsdp commented 2 months ago

Started WCP block pre-checkin pipeline... Build Number: 1407

svcbot-qecnsdp commented 2 months ago
Build ID: 1407
WCP build status: FAILURE 
Stage before exit: null 
svcbot-qecnsdp commented 2 months ago

Started WCP block pre-checkin pipeline... Build Number: 1410

svcbot-qecnsdp commented 2 months ago
Build ID: 1410
WCP build status: FAILURE 
Stage before exit: null 
Jenkins E2E Test Results: 
FAIL! -- 11 Passed | 2 Failed | 0 Pending | 835 Skipped
--- FAIL: TestE2E (3515.35s)
FAIL

Ginkgo ran 1 suite in 59m39.377633209s

Test Suite Failed
make: Leaving directory `/home/worker/workspace/csi-wcp-precheckin/Results/1410/vsphere-csi-driver`
svcbot-qecnsdp commented 2 months ago

Started WCP block pre-checkin pipeline... Build Number: 1411

svcbot-qecnsdp commented 2 months ago
Build ID: 1411
WCP build status: SUCCESS 
Stage before exit: finally 
Jenkins E2E Test Results: 

Ran 0 of 848 Specs in 0.029 seconds
SUCCESS! -- 0 Passed | 0 Failed | 0 Pending | 848 Skipped
PASS

Ginkgo ran 1 suite in 1m13.106704877s
Test Suite Passed
make: Leaving directory `/home/worker/workspace/csi-wcp-precheckin/Results/1411/vsphere-csi-driver`
svcbot-qecnsdp commented 2 months ago

Started WCP block pre-checkin pipeline... Build Number: 1412

svcbot-qecnsdp commented 2 months ago
Build ID: 1412
WCP build status: SUCCESS 
Stage before exit: finally 
Jenkins E2E Test Results: 

Ran 0 of 848 Specs in 0.024 seconds
SUCCESS! -- 0 Passed | 0 Failed | 0 Pending | 848 Skipped
PASS

Ginkgo ran 1 suite in 1m4.960978137s
Test Suite Passed
make: Leaving directory `/home/worker/workspace/csi-wcp-precheckin/Results/1412/vsphere-csi-driver`
xing-yang commented 2 months ago

/ok-to-test

deepakkinni commented 2 months ago

/approve

xing-yang commented 2 months ago

/approve /lgtm

k8s-ci-robot commented 2 months ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: deepakkinni, nikhilbarge, xing-yang

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

The pull request process is described here

Needs approval from an approver in each of these files: - ~~[OWNERS](https://github.com/kubernetes-sigs/vsphere-csi-driver/blob/master/OWNERS)~~ [deepakkinni,xing-yang] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment