csi-driver-host-path icon indicating copy to clipboard operation
csi-driver-host-path copied to clipboard

Add ControllerServer.GetSnapshot CSI procedure

Open nixpanic opened this issue 6 months ago • 14 comments

What type of PR is this?

Uncomment only one /kind <> line, hit enter to put that in a new line, and remove leading whitespaces from that line:

/kind api-change /kind bug /kind cleanup /kind design /kind documentation /kind failing-test

/kind feature

/kind flake

What this PR does / why we need it:

The new ControllerServer.GetSnapshot CSI procedure has been added to the specification. This should be implemented in the csi-driver-hostpath so that other components can use it for testing.

Which issue(s) this PR fixes:

Related to kubernetes-csi/csi-test#573

Special notes for your reviewer:

Marked as Draft because there is no CSI spec release with the new GetSnapshot procedure yet.

Does this PR introduce a user-facing change?:

Add support for the new ControllerServer.GetSnapshot CSI procedure.

nixpanic avatar May 28 '25 08:05 nixpanic

Skipping CI for Draft Pull Request. If you want CI signal for your change, please convert it to an actual PR. You can still manually trigger a test run with /test all

k8s-ci-robot avatar May 28 '25 08:05 k8s-ci-robot

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: nixpanic Once this PR has been reviewed and has the lgtm label, please assign xing-yang for approval. For more information see the Code Review Process.

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

k8s-ci-robot avatar May 28 '25 08:05 k8s-ci-robot

/test all

Nothing should break :crossed_fingers:

nixpanic avatar May 28 '25 09:05 nixpanic

A panic happens:

+ kubectl logs csi-hostpathplugin-98n5w csi-provisioner
W0528 09:08:30.734604       1 feature_gate.go:354] Setting GA feature gate Topology=true. It will be removed in a future release.
I0528 09:08:30.734723       1 feature_gate.go:387] feature gates: {map[Topology:true]}
I0528 09:08:30.734762       1 csi-provisioner.go:166] "Version" version="v5.2.0"
I0528 09:08:30.734774       1 csi-provisioner.go:189] Building kube configs for running in cluster...
I0528 09:08:30.735052       1 envvar.go:172] "Feature gate default state" feature="ClientsAllowCBOR" enabled=false
I0528 09:08:30.735090       1 envvar.go:172] "Feature gate default state" feature="ClientsPreferCBOR" enabled=false
I0528 09:08:30.735099       1 envvar.go:172] "Feature gate default state" feature="InformerResourceVersion" enabled=false
I0528 09:08:30.735107       1 envvar.go:172] "Feature gate default state" feature="WatchListClient" enabled=false
I0528 09:08:30.735787       1 connection.go:234] "Connecting" address="unix:///csi/csi.sock"
I0528 09:08:30.736893       1 common.go:143] "Probing CSI driver for readiness"
I0528 09:08:30.736926       1 connection.go:264] "GRPC call" method="/csi.v1.Identity/Probe" request="{}"
I0528 09:08:30.738315       1 connection.go:270] "GRPC response" response="{}" err=null
I0528 09:08:30.738392       1 connection.go:264] "GRPC call" method="/csi.v1.Identity/GetPluginInfo" request="{}"
I0528 09:08:30.739400       1 connection.go:270] "GRPC response" response="{\"name\":\"hostpath.csi.k8s.io\",\"vendor_version\":\"v1.16.0-20-g3fb2665\"}" err=null
I0528 09:08:30.739465       1 csi-provisioner.go:244] Detected CSI driver hostpath.csi.k8s.io
I0528 09:08:30.739486       1 connection.go:264] "GRPC call" method="/csi.v1.Identity/GetPluginCapabilities" request="{}"
I0528 09:08:30.740548       1 connection.go:270] "GRPC response" response="{\"capabilities\":[{\"service\":{\"type\":\"CONTROLLER_SERVICE\"}},{\"service\":{\"type\":\"GROUP_CONTROLLER_SERVICE\"}},{\"service\":{\"type\":\"VOLUME_ACCESSIBILITY_CONSTRAINTS\"}}]}" err=null
I0528 09:08:30.740602       1 connection.go:264] "GRPC call" method="/csi.v1.Controller/ControllerGetCapabilities" request="{}"
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x30 pc=0x1b8ae42]

goroutine 1 [running]:
github.com/kubernetes-csi/csi-lib-utils/protosanitizer.stripSingleValue({0x263df28, 0xc00031f680}, {{}, 0x1de98a0?, 0x0?, 0x1de9120?})
	/workspace/vendor/github.com/kubernetes-csi/csi-lib-utils/protosanitizer/protosanitizer.go:71 +0x82
github.com/kubernetes-csi/csi-lib-utils/protosanitizer.stripValue({0x263df28, 0xc00031f680}, {{}, 0x1de98a0?, 0x0?, 0xc0005029e8?})
	/workspace/vendor/github.com/kubernetes-csi/csi-lib-utils/protosanitizer/protosanitizer.go:94 +0x1b8
github.com/kubernetes-csi/csi-lib-utils/protosanitizer.stripMessage.func1({0x263df28, 0xc00031f680}, {{}, 0x1de98a0?, 0x0?, 0xc0002569d0?})
	/workspace/vendor/github.com/kubernetes-csi/csi-lib-utils/protosanitizer/protosanitizer.go:108 +0xdc
...

Reported kubernetes-csi/external-provisioner#1382 to get a release with the (already merged) fix.

nixpanic avatar May 28 '25 11:05 nixpanic

/test all

All sidecars should have fixes for the unknown enum value of the GetSnapshot capability, no more panics?

nixpanic avatar Jun 03 '25 12:06 nixpanic

/test all

take 2: hopefully replaced all v5.2.0 csi-provisioner sidecars.

nixpanic avatar Jun 03 '25 13:06 nixpanic

/test pull-kubernetes-csi-csi-driver-host-path-1-30-test-on-kubernetes-1-30

Oh no, more sidecars needed updating

nixpanic avatar Jun 03 '25 16:06 nixpanic

/test pull-kubernetes-csi-csi-driver-host-path-1-31-on-kubernetes-1-31

nixpanic avatar Jun 10 '25 07:06 nixpanic

The csi-external-health-monitor-controller with fix is not available as a release yet. Waiting for kubernetes/k8s.io#8177.

nixpanic avatar Jun 10 '25 10:06 nixpanic

/test pull-kubernetes-csi-csi-driver-host-path-1-31-on-kubernetes-1-31

nixpanic avatar Jun 12 '25 08:06 nixpanic

/test pull-kubernetes-csi-csi-driver-host-path-1-31-on-kubernetes-1-31

nixpanic avatar Jun 12 '25 14:06 nixpanic

/retest

nixpanic avatar Jun 12 '25 15:06 nixpanic

The Kubernetes project currently lacks enough contributors to adequately respond to all PRs.

This bot triages PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the PR is closed

You can:

  • Mark this PR as fresh with /remove-lifecycle stale
  • Close this PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

k8s-triage-robot avatar Sep 21 '25 10:09 k8s-triage-robot

The Kubernetes project currently lacks enough active contributors to adequately respond to all PRs.

This bot triages PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the PR is closed

You can:

  • Mark this PR as fresh with /remove-lifecycle rotten
  • Close this PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle rotten

k8s-triage-robot avatar Oct 21 '25 11:10 k8s-triage-robot

/test all

nixpanic avatar Oct 21 '25 14:10 nixpanic

@nixpanic: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
pull-kubernetes-csi-csi-driver-host-path-unit 99fc32539fc75b3f766a7c65649d16a4591e4a82 link true /test pull-kubernetes-csi-csi-driver-host-path-unit

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

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-sigs/prow repository. I understand the commands that are listed here.

k8s-ci-robot avatar Oct 21 '25 15:10 k8s-ci-robot

PR needs rebase.

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-sigs/prow repository.

k8s-ci-robot avatar Nov 04 '25 22:11 k8s-ci-robot