-
Notifications
You must be signed in to change notification settings - Fork 43.2k
Can we remove check for container waiting state to determine volume unmounting? #69831
Copy link
Copy link
Closed
Closed
Copy link
Labels
kind/bugCategorizes issue or PR as related to a bug.Categorizes issue or PR as related to a bug.lifecycle/frozenIndicates that an issue or PR should not be auto-closed due to staleness.Indicates 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.Indicates an issue or PR lacks a `triage/foo` label and requires one.sig/nodeCategorizes an issue or PR as relevant to SIG Node.Categorizes an issue or PR as relevant to SIG Node.sig/storageCategorizes an issue or PR as relevant to SIG Storage.Categorizes an issue or PR as relevant to SIG Storage.triage/needs-informationIndicates an issue needs more information in order to work on it.Indicates an issue needs more information in order to work on it.
Metadata
Metadata
Assignees
Labels
kind/bugCategorizes issue or PR as related to a bug.Categorizes issue or PR as related to a bug.lifecycle/frozenIndicates that an issue or PR should not be auto-closed due to staleness.Indicates 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.Indicates an issue or PR lacks a `triage/foo` label and requires one.sig/nodeCategorizes an issue or PR as relevant to SIG Node.Categorizes an issue or PR as relevant to SIG Node.sig/storageCategorizes an issue or PR as relevant to SIG Storage.Categorizes an issue or PR as relevant to SIG Storage.triage/needs-informationIndicates an issue needs more information in order to work on it.Indicates an issue needs more information in order to work on it.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Projects
StatusShow more project fields
Done
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
notRunningutil 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.