Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(csi-driver): add pre-publish hook to cleanup stale entries #905

Merged
merged 1 commit into from
Dec 12, 2024

Conversation

Abhinandan-Purkait
Copy link
Member

@Abhinandan-Purkait Abhinandan-Purkait commented Dec 11, 2024

Scenario:
If an node undergoes a network partition and the application pods on it are moved by out-of-service taint then it can happen that the stale mount paths and the nvme controllers get left around, because CSI NodeUnstage was never called.
Once the node comes back and joins the cluster and the application pod comes back to the same node, it can happen that the stale nvme path gets live again causing the existing buffer data to be flushed potentially causing data corruption.

Changes:
This adds a pre-publish hook that can intercept the ControllerPublish and issue cleanup on the node if stale entries are detected.

@Abhinandan-Purkait Abhinandan-Purkait force-pushed the pre-publish-cp branch 2 times, most recently from f1d7cd4 to 18dc858 Compare December 12, 2024 07:40
control-plane/csi-driver/proto/node-service.proto Outdated Show resolved Hide resolved
control-plane/csi-driver/proto/node-service.proto Outdated Show resolved Hide resolved
control-plane/csi-driver/src/bin/node/main_.rs Outdated Show resolved Hide resolved
control-plane/csi-driver/src/bin/controller/controller.rs Outdated Show resolved Hide resolved
control-plane/csi-driver/src/bin/controller/controller.rs Outdated Show resolved Hide resolved
control-plane/csi-driver/src/bin/node/findmnt.rs Outdated Show resolved Hide resolved
control-plane/csi-driver/src/bin/node/mount.rs Outdated Show resolved Hide resolved
control-plane/csi-driver/src/bin/node/nodeplugin_grpc.rs Outdated Show resolved Hide resolved
@Abhinandan-Purkait Abhinandan-Purkait force-pushed the pre-publish-cp branch 2 times, most recently from 1d6ead3 to 3fedfd3 Compare December 12, 2024 15:34
@Abhinandan-Purkait Abhinandan-Purkait force-pushed the pre-publish-cp branch 3 times, most recently from 273cea9 to cd397c7 Compare December 12, 2024 17:40
@Abhinandan-Purkait
Copy link
Member Author

bors merge

bors-openebs-mayastor bot pushed a commit that referenced this pull request Dec 12, 2024
905: feat(csi-driver): add pre-publish hook to cleanup stale entries r=Abhinandan-Purkait a=Abhinandan-Purkait

Scenario:
If an node undergoes a network partition and the application pods on it are moved by out-of-service taint then it can happen that the stale mount paths and the nvme controllers get left around, because CSI NodeUnstage was never called.
Once the node comes back and joins the cluster and the application pod comes back to the same node, it can happen that the stale nvme path gets live again causing the existing buffer data to be flushed potentially causing data corruption.

Changes:
This adds a pre-publish hook that can intercept the ControllerPublish and issue cleanup on the node if stale entries are detected.

Co-authored-by: Abhinandan Purkait <[email protected]>
@bors-openebs-mayastor
Copy link

Build failed:

@Abhinandan-Purkait
Copy link
Member Author

bors try

bors-openebs-mayastor bot pushed a commit that referenced this pull request Dec 12, 2024
@bors-openebs-mayastor
Copy link

try

Build succeeded:

@Abhinandan-Purkait
Copy link
Member Author

bors merge

bors-openebs-mayastor bot pushed a commit that referenced this pull request Dec 12, 2024
905: feat(csi-driver): add pre-publish hook to cleanup stale entries r=Abhinandan-Purkait a=Abhinandan-Purkait

Scenario:
If an node undergoes a network partition and the application pods on it are moved by out-of-service taint then it can happen that the stale mount paths and the nvme controllers get left around, because CSI NodeUnstage was never called.
Once the node comes back and joins the cluster and the application pod comes back to the same node, it can happen that the stale nvme path gets live again causing the existing buffer data to be flushed potentially causing data corruption.

Changes:
This adds a pre-publish hook that can intercept the ControllerPublish and issue cleanup on the node if stale entries are detected.

Co-authored-by: Abhinandan Purkait <[email protected]>
@Abhinandan-Purkait
Copy link
Member Author

bors cancel

@bors-openebs-mayastor
Copy link

Canceled.

@Abhinandan-Purkait
Copy link
Member Author

bors try

bors-openebs-mayastor bot pushed a commit that referenced this pull request Dec 12, 2024
@bors-openebs-mayastor
Copy link

try

Build succeeded:

@Abhinandan-Purkait
Copy link
Member Author

bors merge

@bors-openebs-mayastor
Copy link

Build succeeded:

@bors-openebs-mayastor bors-openebs-mayastor bot merged commit 4104acf into release/2.7 Dec 12, 2024
4 checks passed
@bors-openebs-mayastor bors-openebs-mayastor bot deleted the pre-publish-cp branch December 12, 2024 20:30
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.

3 participants