Skip to content

NodeStage is not called after NodeUnstage error #100182

@jsafrane

Description

@jsafrane

How to reproduce it (as minimally and precisely as possible):

  1. Run a pod that uses a CSI volume that supports NodeStage (such as Ceph RBD)
  2. Delete the pod
  3. The CSI driver times out when processing NodeUnstage call. It is un-staging the volume in the background and eventually succeeds. (Ceph RBD talks to the storage backed in NodeUnstage and there was some network disruption)
  4. Create new pod that uses the same volume on the same node

What happened:

kubelet calls only NodePublish. Since the previous NodeUnstage did not succeed, it wrongly assumes that the volume is still NodeStaged.

What you expected to happen:

kubelet calls NodeStage + NodePublish, because it can't be sure if the volume is staged or not.
After NodeUnstage error, we should mark volumes as uncertain to make sure NodeStage is called after NodeUnstage returns error.

Environment:

  • Kubernetes version (use kubectl version): 1.21

Metadata

Metadata

Assignees

Labels

kind/bugCategorizes issue or PR as related to a bug.priority/important-soonMust be staffed and worked on either currently, or very soon, ideally in time for the next release.sig/storageCategorizes an issue or PR as relevant to SIG Storage.triage/acceptedIndicates an issue or PR is ready to be actively worked on.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions