azurefile-csi-driver icon indicating copy to clipboard operation
azurefile-csi-driver copied to clipboard

feat: add smb file restore from snapshot

Open umagnus opened this issue 2 years ago • 60 comments

What type of PR is this?

/kind feature

What this PR does / why we need it:

feat: add smb file restore from snapshot by using azcopy

Which issue(s) this PR fixes:

Fixes #136

Requirements:

Special notes for your reviewer:

enable different storageclass smb file restore, but only be enabled in the same sub because csi cannot get different subs id in sourceVolumeContent snapshotId, but it can get account name in it. Also add e2e test case should create a pod, write to its pv, take a volume snapshot, overwrite data in original pv, create another pod from the snapshot, use another storage class, and read unaltered original data from original pv[file.csi.azure.com] to test this case.

NAME                              STATUS   VOLUME                                     CAPACITY   ACCESS MODES   STORAGECLASS                                         AGE
pvc-azurefile                     Bound    pvc-38a798d8-2a95-439f-98b6-340963369a33   100Gi      RWX            azurefile-csi                                        47h
pvc-azurefile-snapshot-restored   Bound    pvc-21d8fdf8-d9c8-4dfc-a0d1-3883b8489cca   100Gi      RWX            azurefile-6843-file.csi.azure.com-dynamic-sc-zdnfp   43h

csi logs

I0202 07:38:14.720539       1 utils.go:100] GRPC call: /csi.v1.Controller/CreateVolume
I0202 07:38:14.720559       1 utils.go:101] GRPC request: {"capacity_range":{"required_bytes":1073741824000},"name":"pvc-adb84e31-5c2d-49eb-9a2a-deaa614e2c03","parameters":{"csi.storage.k8s.io/pv/name":"pvc-adb84e31-5c2d-49eb-9a2a-deaa614e2c03","csi.storage.k8s.io/pvc/name":"pvc-azurefile-snapshot-restored","csi.storage.k8s.io/pvc/namespace":"default","skuName":"Premium_LRS"},"volume_capabilities":[{"AccessType":{"Mount":{"mount_flags":["dir_mode=0777","file_mode=0777","mfsymlinks","cache=strict","nosharesock","actimeo=30"]}},"access_mode":{"mode":5}}],"volume_content_source":{"Type":{"Snapshot":{"snapshot_id":"MC_aks-smbtest_group_aks-smbtest_eastus#f958d93650b164b0d93c052#pvc-f27cf6c3-236d-4b46-95c8-eb7e60019be0###default#2024-02-02T07:04:56.0000000Z"}}}}
I0202 07:38:14.981775       1 azure_storageaccount.go:322] found a matching account f958d93650b164b0d93c052 type Premium_LRS location eastus
I0202 07:38:15.347448       1 controllerserver.go:561] begin to create file share(pvc-adb84e31-5c2d-49eb-9a2a-deaa614e2c03) on account(f958d93650b164b0d93c052) type(Premium_LRS) subID() rg(MC_aks-smbtest_group_aks-smbtest_eastus) location() size(1000) protocol(SMB)
I0202 07:38:15.783626       1 controllerserver.go:1376] generate sas token for account(f958d93650b164b0d93c052)
I0202 07:38:15.794328       1 controllerserver.go:1040] azcopy job status: NotFound, copy percent: %, error: <nil>
I0202 07:38:15.794347       1 controllerserver.go:1047] copy fileshare pvc-f27cf6c3-236d-4b46-95c8-eb7e60019be0(snapshot: 2024-02-02T07:04:56.0000000Z) to pvc-adb84e31-5c2d-49eb-9a2a-deaa614e2c03
W0202 07:56:15.821338       1 controllerserver.go:1059] CopyFileShare(MC_aks-smbtest_group_aks-smbtest_eastus, f958d93650b164b0d93c052, pvc-adb84e31-5c2d-49eb-9a2a-deaa614e2c03) failed with error(timeout waiting for copy fileshare pvc-f27cf6c3-236d-4b46-95c8-eb7e60019be0(snapshot: 2024-02-02T07:04:56.0000000Z) to pvc-adb84e31-5c2d-49eb-9a2a-deaa614e2c03 succeed, copy percent: 20.0%): 
I0202 07:56:15.821495       1 azure_metrics.go:115] "Observed Request Latency" latency_seconds=1081.100546864 request="azurefile_csi_driver_controller_create_volume_from_snapshot" resource_group="mc_aks-smbtest_group_aks-smbtest_eastus" subscription_id="" source="file.csi.azure.com" volumeid="" result_code="failed_csi_driver_controller_create_volume_from_snapshot"
E0202 07:56:15.821519       1 utils.go:105] GRPC error: timeout waiting for copy fileshare pvc-f27cf6c3-236d-4b46-95c8-eb7e60019be0(snapshot: 2024-02-02T07:04:56.0000000Z) to pvc-adb84e31-5c2d-49eb-9a2a-deaa614e2c03 succeed, copy percent: 20.0%
I0202 07:56:15.835425       1 utils.go:100] GRPC call: /csi.v1.Controller/CreateVolume
I0202 07:56:15.835444       1 utils.go:101] GRPC request: {"capacity_range":{"required_bytes":1073741824000},"name":"pvc-adb84e31-5c2d-49eb-9a2a-deaa614e2c03","parameters":{"csi.storage.k8s.io/pv/name":"pvc-adb84e31-5c2d-49eb-9a2a-deaa614e2c03","csi.storage.k8s.io/pvc/name":"pvc-azurefile-snapshot-restored","csi.storage.k8s.io/pvc/namespace":"default","skuName":"Premium_LRS"},"volume_capabilities":[{"AccessType":{"Mount":{"mount_flags":["dir_mode=0777","file_mode=0777","mfsymlinks","cache=strict","nosharesock","actimeo=30"]}},"access_mode":{"mode":5}}],"volume_content_source":{"Type":{"Snapshot":{"snapshot_id":"MC_aks-smbtest_group_aks-smbtest_eastus#f958d93650b164b0d93c052#pvc-f27cf6c3-236d-4b46-95c8-eb7e60019be0###default#2024-02-02T07:04:56.0000000Z"}}}}
I0202 07:56:16.040436       1 controllerserver.go:561] begin to create file share(pvc-adb84e31-5c2d-49eb-9a2a-deaa614e2c03) on account(f958d93650b164b0d93c052) type(Premium_LRS) subID() rg(MC_aks-smbtest_group_aks-smbtest_eastus) location() size(1000) protocol(SMB)
I0202 07:56:16.353439       1 controllerserver.go:1376] generate sas token for account(f958d93650b164b0d93c052)
I0202 07:56:16.383047       1 controllerserver.go:1040] azcopy job status: Running, copy percent: 20.0%, error: <nil>
I0202 07:56:16.383189       1 azure_metrics.go:115] "Observed Request Latency" latency_seconds=0.54713538 request="azurefile_csi_driver_controller_create_volume_from_snapshot" resource_group="mc_aks-smbtest_group_aks-smbtest_eastus" subscription_id="" source="file.csi.azure.com" volumeid="" result_code="failed_csi_driver_controller_create_volume_from_snapshot"
E0202 07:56:16.383213       1 utils.go:105] GRPC error: An existed azcopy job is running, please wait for it to complete
I0202 07:56:16.837452       1 utils.go:100] GRPC call: /csi.v1.Controller/CreateVolume
I0202 07:56:16.837515       1 utils.go:101] GRPC request: {"capacity_range":{"required_bytes":1073741824000},"name":"pvc-adb84e31-5c2d-49eb-9a2a-deaa614e2c03","parameters":{"csi.storage.k8s.io/pv/name":"pvc-adb84e31-5c2d-49eb-9a2a-deaa614e2c03","csi.storage.k8s.io/pvc/name":"pvc-azurefile-snapshot-restored","csi.storage.k8s.io/pvc/namespace":"default","skuName":"Premium_LRS"},"volume_capabilities":[{"AccessType":{"Mount":{"mount_flags":["dir_mode=0777","file_mode=0777","mfsymlinks","cache=strict","nosharesock","actimeo=30"]}},"access_mode":{"mode":5}}],"volume_content_source":{"Type":{"Snapshot":{"snapshot_id":"MC_aks-smbtest_group_aks-smbtest_eastus#f958d93650b164b0d93c052#pvc-f27cf6c3-236d-4b46-95c8-eb7e60019be0###default#2024-02-02T07:04:56.0000000Z"}}}}
I0202 07:56:16.940987       1 controllerserver.go:561] begin to create file share(pvc-adb84e31-5c2d-49eb-9a2a-deaa614e2c03) on account(f958d93650b164b0d93c052) type(Premium_LRS) subID() rg(MC_aks-smbtest_group_aks-smbtest_eastus) location() size(1000) protocol(SMB)
I0202 07:56:17.132965       1 controllerserver.go:1376] generate sas token for account(f958d93650b164b0d93c052)
I0202 07:56:17.165058       1 controllerserver.go:1040] azcopy job status: Running, copy percent: 20.0%, error: <nil>
I0202 07:56:17.165244       1 azure_metrics.go:115] "Observed Request Latency" latency_seconds=0.327512003 request="azurefile_csi_driver_controller_create_volume_from_snapshot" resource_group="mc_aks-smbtest_group_aks-smbtest_eastus" subscription_id="" source="file.csi.azure.com" volumeid="" result_code="failed_csi_driver_controller_create_volume_from_snapshot"
E0202 07:56:17.165267       1 utils.go:105] GRPC error: An existed azcopy job is running, please wait for it to complete
I0202 07:56:21.179437       1 utils.go:100] GRPC call: /csi.v1.Controller/CreateVolume
I0202 07:56:21.179584       1 utils.go:101] GRPC request: {"capacity_range":{"required_bytes":1073741824000},"name":"pvc-adb84e31-5c2d-49eb-9a2a-deaa614e2c03","parameters":{"csi.storage.k8s.io/pv/name":"pvc-adb84e31-5c2d-49eb-9a2a-deaa614e2c03","csi.storage.k8s.io/pvc/name":"pvc-azurefile-snapshot-restored","csi.storage.k8s.io/pvc/namespace":"default","skuName":"Premium_LRS"},"volume_capabilities":[{"AccessType":{"Mount":{"mount_flags":["dir_mode=0777","file_mode=0777","mfsymlinks","cache=strict","nosharesock","actimeo=30"]}},"access_mode":{"mode":5}}],"volume_content_source":{"Type":{"Snapshot":{"snapshot_id":"MC_aks-smbtest_group_aks-smbtest_eastus#f958d93650b164b0d93c052#pvc-f27cf6c3-236d-4b46-95c8-eb7e60019be0###default#2024-02-02T07:04:56.0000000Z"}}}}
I0202 07:56:21.305654       1 controllerserver.go:561] begin to create file share(pvc-adb84e31-5c2d-49eb-9a2a-deaa614e2c03) on account(f958d93650b164b0d93c052) type(Premium_LRS) subID() rg(MC_aks-smbtest_group_aks-smbtest_eastus) location() size(1000) protocol(SMB)
I0202 07:56:21.932902       1 controllerserver.go:1376] generate sas token for account(f958d93650b164b0d93c052)
I0202 07:56:21.962335       1 controllerserver.go:1040] azcopy job status: Running, copy percent: 20.0%, error: <nil>
I0202 07:56:21.962391       1 azure_metrics.go:115] "Observed Request Latency" latency_seconds=0.782584073 request="azurefile_csi_driver_controller_create_volume_from_snapshot" resource_group="mc_aks-smbtest_group_aks-smbtest_eastus" subscription_id="" source="file.csi.azure.com" volumeid="" result_code="failed_csi_driver_controller_create_volume_from_snapshot"
E0202 07:56:21.962412       1 utils.go:105] GRPC error: An existed azcopy job is running, please wait for it to complete
I0202 07:56:29.979872       1 utils.go:100] GRPC call: /csi.v1.Controller/CreateVolume
I0202 07:56:29.979896       1 utils.go:101] GRPC request: {"capacity_range":{"required_bytes":1073741824000},"name":"pvc-adb84e31-5c2d-49eb-9a2a-deaa614e2c03","parameters":{"csi.storage.k8s.io/pv/name":"pvc-adb84e31-5c2d-49eb-9a2a-deaa614e2c03","csi.storage.k8s.io/pvc/name":"pvc-azurefile-snapshot-restored","csi.storage.k8s.io/pvc/namespace":"default","skuName":"Premium_LRS"},"volume_capabilities":[{"AccessType":{"Mount":{"mount_flags":["dir_mode=0777","file_mode=0777","mfsymlinks","cache=strict","nosharesock","actimeo=30"]}},"access_mode":{"mode":5}}],"volume_content_source":{"Type":{"Snapshot":{"snapshot_id":"MC_aks-smbtest_group_aks-smbtest_eastus#f958d93650b164b0d93c052#pvc-f27cf6c3-236d-4b46-95c8-eb7e60019be0###default#2024-02-02T07:04:56.0000000Z"}}}}
I0202 07:56:30.036367       1 controllerserver.go:561] begin to create file share(pvc-adb84e31-5c2d-49eb-9a2a-deaa614e2c03) on account(f958d93650b164b0d93c052) type(Premium_LRS) subID() rg(MC_aks-smbtest_group_aks-smbtest_eastus) location() size(1000) protocol(SMB)
I0202 07:56:30.288995       1 controllerserver.go:1376] generate sas token for account(f958d93650b164b0d93c052)
I0202 07:56:30.347651       1 controllerserver.go:1040] azcopy job status: Running, copy percent: 20.0%, error: <nil>
I0202 07:56:30.347725       1 azure_metrics.go:115] "Observed Request Latency" latency_seconds=0.367587463 request="azurefile_csi_driver_controller_create_volume_from_snapshot" resource_group="mc_aks-smbtest_group_aks-smbtest_eastus" subscription_id="" source="file.csi.azure.com" volumeid="" result_code="failed_csi_driver_controller_create_volume_from_snapshot"
E0202 07:56:30.347747       1 utils.go:105] GRPC error: An existed azcopy job is running, please wait for it to complete
I0202 07:56:46.362968       1 utils.go:100] GRPC call: /csi.v1.Controller/CreateVolume
I0202 07:56:46.362990       1 utils.go:101] GRPC request: {"capacity_range":{"required_bytes":1073741824000},"name":"pvc-adb84e31-5c2d-49eb-9a2a-deaa614e2c03","parameters":{"csi.storage.k8s.io/pv/name":"pvc-adb84e31-5c2d-49eb-9a2a-deaa614e2c03","csi.storage.k8s.io/pvc/name":"pvc-azurefile-snapshot-restored","csi.storage.k8s.io/pvc/namespace":"default","skuName":"Premium_LRS"},"volume_capabilities":[{"AccessType":{"Mount":{"mount_flags":["dir_mode=0777","file_mode=0777","mfsymlinks","cache=strict","nosharesock","actimeo=30"]}},"access_mode":{"mode":5}}],"volume_content_source":{"Type":{"Snapshot":{"snapshot_id":"MC_aks-smbtest_group_aks-smbtest_eastus#f958d93650b164b0d93c052#pvc-f27cf6c3-236d-4b46-95c8-eb7e60019be0###default#2024-02-02T07:04:56.0000000Z"}}}}
I0202 07:56:46.529748       1 controllerserver.go:561] begin to create file share(pvc-adb84e31-5c2d-49eb-9a2a-deaa614e2c03) on account(f958d93650b164b0d93c052) type(Premium_LRS) subID() rg(MC_aks-smbtest_group_aks-smbtest_eastus) location() size(1000) protocol(SMB)
I0202 07:56:46.820895       1 controllerserver.go:1376] generate sas token for account(f958d93650b164b0d93c052)
I0202 07:56:46.868274       1 controllerserver.go:1040] azcopy job status: Running, copy percent: 20.0%, error: <nil>
I0202 07:56:46.868934       1 azure_metrics.go:115] "Observed Request Latency" latency_seconds=0.50510625 request="azurefile_csi_driver_controller_create_volume_from_snapshot" resource_group="mc_aks-smbtest_group_aks-smbtest_eastus" subscription_id="" source="file.csi.azure.com" volumeid="" result_code="failed_csi_driver_controller_create_volume_from_snapshot"
E0202 07:56:46.868955       1 utils.go:105] GRPC error: An existed azcopy job is running, please wait for it to complete
I0202 07:57:18.884280       1 utils.go:100] GRPC call: /csi.v1.Controller/CreateVolume
I0202 07:57:18.884447       1 utils.go:101] GRPC request: {"capacity_range":{"required_bytes":1073741824000},"name":"pvc-adb84e31-5c2d-49eb-9a2a-deaa614e2c03","parameters":{"csi.storage.k8s.io/pv/name":"pvc-adb84e31-5c2d-49eb-9a2a-deaa614e2c03","csi.storage.k8s.io/pvc/name":"pvc-azurefile-snapshot-restored","csi.storage.k8s.io/pvc/namespace":"default","skuName":"Premium_LRS"},"volume_capabilities":[{"AccessType":{"Mount":{"mount_flags":["dir_mode=0777","file_mode=0777","mfsymlinks","cache=strict","nosharesock","actimeo=30"]}},"access_mode":{"mode":5}}],"volume_content_source":{"Type":{"Snapshot":{"snapshot_id":"MC_aks-smbtest_group_aks-smbtest_eastus#f958d93650b164b0d93c052#pvc-f27cf6c3-236d-4b46-95c8-eb7e60019be0###default#2024-02-02T07:04:56.0000000Z"}}}}
I0202 07:57:18.958625       1 controllerserver.go:561] begin to create file share(pvc-adb84e31-5c2d-49eb-9a2a-deaa614e2c03) on account(f958d93650b164b0d93c052) type(Premium_LRS) subID() rg(MC_aks-smbtest_group_aks-smbtest_eastus) location() size(1000) protocol(SMB)
I0202 07:57:19.165210       1 controllerserver.go:1376] generate sas token for account(f958d93650b164b0d93c052)
I0202 07:57:19.193582       1 controllerserver.go:1040] azcopy job status: Running, copy percent: 20.0%, error: <nil>
I0202 07:57:19.193639       1 azure_metrics.go:115] "Observed Request Latency" latency_seconds=0.308890875 request="azurefile_csi_driver_controller_create_volume_from_snapshot" resource_group="mc_aks-smbtest_group_aks-smbtest_eastus" subscription_id="" source="file.csi.azure.com" volumeid="" result_code="failed_csi_driver_controller_create_volume_from_snapshot"
E0202 07:57:19.193655       1 utils.go:105] GRPC error: An existed azcopy job is running, please wait for it to complete
I0202 07:58:23.207230       1 utils.go:100] GRPC call: /csi.v1.Controller/CreateVolume
I0202 07:58:23.207380       1 utils.go:101] GRPC request: {"capacity_range":{"required_bytes":1073741824000},"name":"pvc-adb84e31-5c2d-49eb-9a2a-deaa614e2c03","parameters":{"csi.storage.k8s.io/pv/name":"pvc-adb84e31-5c2d-49eb-9a2a-deaa614e2c03","csi.storage.k8s.io/pvc/name":"pvc-azurefile-snapshot-restored","csi.storage.k8s.io/pvc/namespace":"default","skuName":"Premium_LRS"},"volume_capabilities":[{"AccessType":{"Mount":{"mount_flags":["dir_mode=0777","file_mode=0777","mfsymlinks","cache=strict","nosharesock","actimeo=30"]}},"access_mode":{"mode":5}}],"volume_content_source":{"Type":{"Snapshot":{"snapshot_id":"MC_aks-smbtest_group_aks-smbtest_eastus#f958d93650b164b0d93c052#pvc-f27cf6c3-236d-4b46-95c8-eb7e60019be0###default#2024-02-02T07:04:56.0000000Z"}}}}
I0202 07:58:23.332958       1 controllerserver.go:561] begin to create file share(pvc-adb84e31-5c2d-49eb-9a2a-deaa614e2c03) on account(f958d93650b164b0d93c052) type(Premium_LRS) subID() rg(MC_aks-smbtest_group_aks-smbtest_eastus) location() size(1000) protocol(SMB)
I0202 07:58:23.557224       1 controllerserver.go:1376] generate sas token for account(f958d93650b164b0d93c052)
I0202 07:58:23.589042       1 controllerserver.go:1040] azcopy job status: Running, copy percent: 20.0%, error: <nil>
I0202 07:58:23.589099       1 azure_metrics.go:115] "Observed Request Latency" latency_seconds=0.381526988 request="azurefile_csi_driver_controller_create_volume_from_snapshot" resource_group="mc_aks-smbtest_group_aks-smbtest_eastus" subscription_id="" source="file.csi.azure.com" volumeid="" result_code="failed_csi_driver_controller_create_volume_from_snapshot"
E0202 07:58:23.589149       1 utils.go:105] GRPC error: An existed azcopy job is running, please wait for it to complete
I0202 08:00:31.612168       1 utils.go:100] GRPC call: /csi.v1.Controller/CreateVolume
I0202 08:00:31.612192       1 utils.go:101] GRPC request: {"capacity_range":{"required_bytes":1073741824000},"name":"pvc-adb84e31-5c2d-49eb-9a2a-deaa614e2c03","parameters":{"csi.storage.k8s.io/pv/name":"pvc-adb84e31-5c2d-49eb-9a2a-deaa614e2c03","csi.storage.k8s.io/pvc/name":"pvc-azurefile-snapshot-restored","csi.storage.k8s.io/pvc/namespace":"default","skuName":"Premium_LRS"},"volume_capabilities":[{"AccessType":{"Mount":{"mount_flags":["dir_mode=0777","file_mode=0777","mfsymlinks","cache=strict","nosharesock","actimeo=30"]}},"access_mode":{"mode":5}}],"volume_content_source":{"Type":{"Snapshot":{"snapshot_id":"MC_aks-smbtest_group_aks-smbtest_eastus#f958d93650b164b0d93c052#pvc-f27cf6c3-236d-4b46-95c8-eb7e60019be0###default#2024-02-02T07:04:56.0000000Z"}}}}
I0202 08:00:31.746105       1 controllerserver.go:561] begin to create file share(pvc-adb84e31-5c2d-49eb-9a2a-deaa614e2c03) on account(f958d93650b164b0d93c052) type(Premium_LRS) subID() rg(MC_aks-smbtest_group_aks-smbtest_eastus) location() size(1000) protocol(SMB)
I0202 08:00:32.069130       1 controllerserver.go:1376] generate sas token for account(f958d93650b164b0d93c052)
I0202 08:00:32.106192       1 controllerserver.go:1040] azcopy job status: Running, copy percent: 20.0%, error: <nil>
I0202 08:00:32.106256       1 azure_metrics.go:115] "Observed Request Latency" latency_seconds=0.493872805 request="azurefile_csi_driver_controller_create_volume_from_snapshot" resource_group="mc_aks-smbtest_group_aks-smbtest_eastus" subscription_id="" source="file.csi.azure.com" volumeid="" result_code="failed_csi_driver_controller_create_volume_from_snapshot"
E0202 08:00:32.106285       1 utils.go:105] GRPC error: An existed azcopy job is running, please wait for it to complete
I0202 08:04:48.123723       1 utils.go:100] GRPC call: /csi.v1.Controller/CreateVolume
I0202 08:04:48.123745       1 utils.go:101] GRPC request: {"capacity_range":{"required_bytes":1073741824000},"name":"pvc-adb84e31-5c2d-49eb-9a2a-deaa614e2c03","parameters":{"csi.storage.k8s.io/pv/name":"pvc-adb84e31-5c2d-49eb-9a2a-deaa614e2c03","csi.storage.k8s.io/pvc/name":"pvc-azurefile-snapshot-restored","csi.storage.k8s.io/pvc/namespace":"default","skuName":"Premium_LRS"},"volume_capabilities":[{"AccessType":{"Mount":{"mount_flags":["dir_mode=0777","file_mode=0777","mfsymlinks","cache=strict","nosharesock","actimeo=30"]}},"access_mode":{"mode":5}}],"volume_content_source":{"Type":{"Snapshot":{"snapshot_id":"MC_aks-smbtest_group_aks-smbtest_eastus#f958d93650b164b0d93c052#pvc-f27cf6c3-236d-4b46-95c8-eb7e60019be0###default#2024-02-02T07:04:56.0000000Z"}}}}
I0202 08:04:48.403043       1 controllerserver.go:561] begin to create file share(pvc-adb84e31-5c2d-49eb-9a2a-deaa614e2c03) on account(f958d93650b164b0d93c052) type(Premium_LRS) subID() rg(MC_aks-smbtest_group_aks-smbtest_eastus) location() size(1000) protocol(SMB)
I0202 08:04:49.023654       1 controllerserver.go:1376] generate sas token for account(f958d93650b164b0d93c052)
I0202 08:04:49.067010       1 controllerserver.go:1040] azcopy job status: Running, copy percent: 20.0%, error: <nil>
I0202 08:04:49.067069       1 azure_metrics.go:115] "Observed Request Latency" latency_seconds=0.94280594 request="azurefile_csi_driver_controller_create_volume_from_snapshot" resource_group="mc_aks-smbtest_group_aks-smbtest_eastus" subscription_id="" source="file.csi.azure.com" volumeid="" result_code="failed_csi_driver_controller_create_volume_from_snapshot"
E0202 08:04:49.067134       1 utils.go:105] GRPC error: An existed azcopy job is running, please wait for it to complete
I0202 08:08:14.539375       1 utils.go:100] GRPC call: /csi.v1.Controller/CreateVolume
I0202 08:08:14.539398       1 utils.go:101] GRPC request: {"capacity_range":{"required_bytes":1073741824000},"name":"pvc-adb84e31-5c2d-49eb-9a2a-deaa614e2c03","parameters":{"csi.storage.k8s.io/pv/name":"pvc-adb84e31-5c2d-49eb-9a2a-deaa614e2c03","csi.storage.k8s.io/pvc/name":"pvc-azurefile-snapshot-restored","csi.storage.k8s.io/pvc/namespace":"default","skuName":"Premium_LRS"},"volume_capabilities":[{"AccessType":{"Mount":{"mount_flags":["dir_mode=0777","file_mode=0777","mfsymlinks","cache=strict","nosharesock","actimeo=30"]}},"access_mode":{"mode":5}}],"volume_content_source":{"Type":{"Snapshot":{"snapshot_id":"MC_aks-smbtest_group_aks-smbtest_eastus#f958d93650b164b0d93c052#pvc-f27cf6c3-236d-4b46-95c8-eb7e60019be0###default#2024-02-02T07:04:56.0000000Z"}}}}
I0202 08:08:14.754147       1 controllerserver.go:561] begin to create file share(pvc-adb84e31-5c2d-49eb-9a2a-deaa614e2c03) on account(f958d93650b164b0d93c052) type(Premium_LRS) subID() rg(MC_aks-smbtest_group_aks-smbtest_eastus) location() size(1000) protocol(SMB)
I0202 08:08:15.022329       1 controllerserver.go:1376] generate sas token for account(f958d93650b164b0d93c052)
I0202 08:08:15.065648       1 controllerserver.go:1040] azcopy job status: Running, copy percent: 40.0%, error: <nil>
I0202 08:08:15.065698       1 azure_metrics.go:115] "Observed Request Latency" latency_seconds=0.526114391 request="azurefile_csi_driver_controller_create_volume_from_snapshot" resource_group="mc_aks-smbtest_group_aks-smbtest_eastus" subscription_id="" source="file.csi.azure.com" volumeid="" result_code="failed_csi_driver_controller_create_volume_from_snapshot"
E0202 08:08:15.065715       1 utils.go:105] GRPC error: An existed azcopy job is running, please wait for it to complete
I0202 08:09:49.084252       1 utils.go:100] GRPC call: /csi.v1.Controller/CreateVolume
I0202 08:09:49.084273       1 utils.go:101] GRPC request: {"capacity_range":{"required_bytes":1073741824000},"name":"pvc-adb84e31-5c2d-49eb-9a2a-deaa614e2c03","parameters":{"csi.storage.k8s.io/pv/name":"pvc-adb84e31-5c2d-49eb-9a2a-deaa614e2c03","csi.storage.k8s.io/pvc/name":"pvc-azurefile-snapshot-restored","csi.storage.k8s.io/pvc/namespace":"default","skuName":"Premium_LRS"},"volume_capabilities":[{"AccessType":{"Mount":{"mount_flags":["dir_mode=0777","file_mode=0777","mfsymlinks","cache=strict","nosharesock","actimeo=30"]}},"access_mode":{"mode":5}}],"volume_content_source":{"Type":{"Snapshot":{"snapshot_id":"MC_aks-smbtest_group_aks-smbtest_eastus#f958d93650b164b0d93c052#pvc-f27cf6c3-236d-4b46-95c8-eb7e60019be0###default#2024-02-02T07:04:56.0000000Z"}}}}
I0202 08:09:49.304469       1 controllerserver.go:561] begin to create file share(pvc-adb84e31-5c2d-49eb-9a2a-deaa614e2c03) on account(f958d93650b164b0d93c052) type(Premium_LRS) subID() rg(MC_aks-smbtest_group_aks-smbtest_eastus) location() size(1000) protocol(SMB)
I0202 08:09:49.623094       1 controllerserver.go:1376] generate sas token for account(f958d93650b164b0d93c052)
I0202 08:09:49.652297       1 controllerserver.go:1040] azcopy job status: Running, copy percent: 40.0%, error: <nil>
I0202 08:09:49.652351       1 azure_metrics.go:115] "Observed Request Latency" latency_seconds=0.567849873 request="azurefile_csi_driver_controller_create_volume_from_snapshot" resource_group="mc_aks-smbtest_group_aks-smbtest_eastus" subscription_id="" source="file.csi.azure.com" volumeid="" result_code="failed_csi_driver_controller_create_volume_from_snapshot"
E0202 08:09:49.652368       1 utils.go:105] GRPC error: An existed azcopy job is running, please wait for it to complete
I0202 08:14:49.668920       1 utils.go:100] GRPC call: /csi.v1.Controller/CreateVolume
I0202 08:14:49.668943       1 utils.go:101] GRPC request: {"capacity_range":{"required_bytes":1073741824000},"name":"pvc-adb84e31-5c2d-49eb-9a2a-deaa614e2c03","parameters":{"csi.storage.k8s.io/pv/name":"pvc-adb84e31-5c2d-49eb-9a2a-deaa614e2c03","csi.storage.k8s.io/pvc/name":"pvc-azurefile-snapshot-restored","csi.storage.k8s.io/pvc/namespace":"default","skuName":"Premium_LRS"},"volume_capabilities":[{"AccessType":{"Mount":{"mount_flags":["dir_mode=0777","file_mode=0777","mfsymlinks","cache=strict","nosharesock","actimeo=30"]}},"access_mode":{"mode":5}}],"volume_content_source":{"Type":{"Snapshot":{"snapshot_id":"MC_aks-smbtest_group_aks-smbtest_eastus#f958d93650b164b0d93c052#pvc-f27cf6c3-236d-4b46-95c8-eb7e60019be0###default#2024-02-02T07:04:56.0000000Z"}}}}
I0202 08:14:49.863733       1 controllerserver.go:561] begin to create file share(pvc-adb84e31-5c2d-49eb-9a2a-deaa614e2c03) on account(f958d93650b164b0d93c052) type(Premium_LRS) subID() rg(MC_aks-smbtest_group_aks-smbtest_eastus) location() size(1000) protocol(SMB)
I0202 08:14:50.313310       1 controllerserver.go:1376] generate sas token for account(f958d93650b164b0d93c052)
I0202 08:14:50.323557       1 controllerserver.go:1040] azcopy job status: Completed, copy percent: 100.0%, error: <nil>
I0202 08:14:50.323605       1 controllerserver.go:593] create file share pvc-adb84e31-5c2d-49eb-9a2a-deaa614e2c03 on storage account f958d93650b164b0d93c052 successfully
I0202 08:14:50.323650       1 azure_metrics.go:115] "Observed Request Latency" latency_seconds=0.654503239 request="azurefile_csi_driver_controller_create_volume_from_snapshot" resource_group="mc_aks-smbtest_group_aks-smbtest_eastus" subscription_id="" source="file.csi.azure.com" volumeid="MC_aks-smbtest_group_aks-smbtest_eastus#f958d93650b164b0d93c052#pvc-adb84e31-5c2d-49eb-9a2a-deaa614e2c03###default" result_code="succeeded"
I0202 08:14:50.323740       1 utils.go:107] GRPC response: {"volume":{"capacity_bytes":1073741824000,"content_source":{"Type":{"Snapshot":{"snapshot_id":"MC_aks-smbtest_group_aks-smbtest_eastus#f958d93650b164b0d93c052#pvc-f27cf6c3-236d-4b46-95c8-eb7e60019be0###default#2024-02-02T07:04:56.0000000Z"}}},"volume_context":{"csi.storage.k8s.io/pv/name":"pvc-adb84e31-5c2d-49eb-9a2a-deaa614e2c03","csi.storage.k8s.io/pvc/name":"pvc-azurefile-snapshot-restored","csi.storage.k8s.io/pvc/namespace":"default","secretnamespace":"default","skuName":"Premium_LRS"},"volume_id":"MC_aks-smbtest_group_aks-smbtest_eastus#f958d93650b164b0d93c052#pvc-adb84e31-5c2d-49eb-9a2a-deaa614e2c03###default"}}


Release note:

none

umagnus avatar Sep 26 '23 09:09 umagnus

Hi @umagnus. 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. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

k8s-ci-robot avatar Sep 26 '23 09:09 k8s-ci-robot

/ok-to-test

cvvz avatar Sep 27 '23 07:09 cvvz

/retest

umagnus avatar Oct 11 '23 01:10 umagnus

/retest

umagnus avatar Oct 11 '23 07:10 umagnus

/retest

umagnus avatar Oct 12 '23 06:10 umagnus

/retest

umagnus avatar Oct 16 '23 02:10 umagnus

/retest

umagnus avatar Oct 16 '23 08:10 umagnus

/retest

umagnus avatar Oct 19 '23 02:10 umagnus

run golangci-lint
  Running [/home/runner/golangci-lint-1.51.2-linux-amd64/golangci-lint run --out-format=github-actions -E=gofmt,deadcode,unused,varcheck,ineffassign,revive,misspell,exportloopref,asciicheck,bodyclose,depguard,dogsled,dupl,durationcheck,errname,forbidigo -D=staticcheck --timeout=30m0s] in [] ...
  Error: 1854-1942 lines are duplicate of `pkg/azurefile/controllerserver_test.go:1943-20[31](https://github.com/kubernetes-sigs/azurefile-csi-driver/actions/runs/6558534029/job/17845099290?pr=1466#step:4:33)` (dupl)
  Error: 1943-2031 lines are duplicate of `pkg/azurefile/controllerserver_test.go:1854-1942` (dupl)

andyzhangx avatar Oct 19 '23 03:10 andyzhangx

/retest

umagnus avatar Oct 20 '23 04:10 umagnus

/retest

umagnus avatar Oct 26 '23 03:10 umagnus

/retest

umagnus avatar Oct 31 '23 02:10 umagnus

/retest

umagnus avatar Nov 03 '23 01:11 umagnus

/retest

umagnus avatar Nov 03 '23 06:11 umagnus

/retest

umagnus avatar Nov 06 '23 03:11 umagnus

/retest

umagnus avatar Nov 06 '23 06:11 umagnus

/retest

umagnus avatar Jan 08 '24 10:01 umagnus

can you rebase this PR, and continue? thanks.

andyzhangx avatar Jan 10 '24 05:01 andyzhangx

/test pull-azurefile-csi-driver-e2e

umagnus avatar Jan 17 '24 06:01 umagnus

/test pull-azurefile-csi-driver-e2e

umagnus avatar Jan 17 '24 07:01 umagnus

/retest

umagnus avatar Jan 19 '24 09:01 umagnus

/retest

umagnus avatar Jan 22 '24 05:01 umagnus

/retest

umagnus avatar Jan 23 '24 01:01 umagnus

/retest

umagnus avatar Jan 23 '24 07:01 umagnus

/retest

umagnus avatar Jan 23 '24 09:01 umagnus

/retest

umagnus avatar Jan 23 '24 12:01 umagnus

/retest

umagnus avatar Jan 26 '24 08:01 umagnus

/retest

umagnus avatar Jan 30 '24 08:01 umagnus

/retest

andyzhangx avatar Jan 30 '24 11:01 andyzhangx

/retest

umagnus avatar Feb 04 '24 06:02 umagnus