Skip to content

Can we remove check for container waiting state to determine volume unmounting? #69831

@msau42

Description

@msau42

Is this a BUG REPORT or FEATURE REQUEST?:
@kubernetes/sig-storage-bugs

What happened:
Volume manager calls isPodTerminated to check if we should unmount a volume. In it, it's checking if the Pod deletion timestamp is set and if all the containers are in terminated or waiting state.

I don't think we should actually check for waiting state because it indicates that the container is trying to be started. This could manifest as a race condition where we end up unmounting a volume while the container is being started up for a deleted pod.

This check was added as part of #41456. It took the notRunning util function from pod status manager and made a copy of it in the volume manager. Checking for waiting state may make sense for pod status manager, but not necessarily for how volume manager uses it.

What you expected to happen:
We should only unmount the volume if we are sure there's no chance of the container running.

Metadata

Metadata

Assignees

Labels

kind/bugCategorizes issue or PR as related to a bug.lifecycle/frozenIndicates that an issue or PR should not be auto-closed due to staleness.needs-triageIndicates an issue or PR lacks a `triage/foo` label and requires one.sig/nodeCategorizes an issue or PR as relevant to SIG Node.sig/storageCategorizes an issue or PR as relevant to SIG Storage.triage/needs-informationIndicates an issue needs more information in order to work on it.

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions