Skip to content

csi-node: add optional startupProbe for slow-starting drivers#197

Merged
duckhawk merged 2 commits into
mainfrom
fix/csi-node-startup-probe
Jul 2, 2026
Merged

csi-node: add optional startupProbe for slow-starting drivers#197
duckhawk merged 2 commits into
mainfrom
fix/csi-node-startup-probe

Conversation

@duckhawk

Copy link
Copy Markdown
Member

Description

Add a startupProbeFailureThreshold config parameter to the CSI node
DaemonSet template (_csi_node.tpl). When set to a positive integer, a
Kubernetes startupProbe is rendered on the node container using the
same /healthz HTTP endpoint as the existing liveness probe.

While the startup probe is active the kubelet suspends liveness checks,
giving the driver enough time to finish initialisation before the pod is
considered unhealthy.

Why do we need it, and what problem does it solve?

CSI drivers that perform device cleanup at startup (e.g. Huawei eSDK
garbage collector, triggerGarbageCollector()) can block the gRPC
server for up to 240 seconds. The existing livenessProbe
(initialDelaySeconds: 5, default failureThreshold: 3,
periodSeconds: 10) kills the pod after ~35 s, well before startup
completes. This creates an infinite crash loop where stale multipath
maps are never cleaned and trigger the next restart.

What is the expected result?

Modules that set startupProbeFailureThreshold in their CSI node config
(e.g. 30 → 300 s max startup time) will have a startupProbe rendered
in the DaemonSet manifest. Modules that do not set the parameter are
unaffected (backward compatible, defaults to 0 / disabled).

Checklist

  • The code is covered by unit tests.
  • e2e tests passed.
  • Documentation updated according to the changes.
  • Changes were tested in the Kubernetes cluster manually.

@duckhawk duckhawk closed this Jun 24, 2026
@duckhawk duckhawk deleted the fix/csi-node-startup-probe branch June 24, 2026 16:41
@duckhawk duckhawk restored the fix/csi-node-startup-probe branch July 2, 2026 14:33
@duckhawk duckhawk reopened this Jul 2, 2026
duckhawk and others added 2 commits July 2, 2026 17:51
CSI drivers that perform device cleanup at startup (e.g. Huawei eSDK
garbage collector) can block the gRPC server for minutes. The existing
livenessProbe (initialDelaySeconds=5, default failureThreshold=3)
kills the pod before it becomes ready, creating a crash loop.

Add a `startupProbeFailureThreshold` config parameter: when set to a
positive integer, a Kubernetes startupProbe is rendered on the node
container. While the startup probe is active the kubelet suspends
liveness checks, giving the driver enough time to finish
initialisation.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@duckhawk duckhawk force-pushed the fix/csi-node-startup-probe branch from a8f7be2 to 235a895 Compare July 2, 2026 14:52
@duckhawk duckhawk merged commit 8106973 into main Jul 2, 2026
3 of 4 checks passed
@duckhawk duckhawk deleted the fix/csi-node-startup-probe branch July 2, 2026 14:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants