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

No easy way how to update CSI driver that uses fuse #70013

Closed
jsafrane opened this issue Oct 19, 2018 · 31 comments · Fixed by #88569
Closed

No easy way how to update CSI driver that uses fuse #70013

jsafrane opened this issue Oct 19, 2018 · 31 comments · Fixed by #88569
Labels
lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. sig/storage Categorizes an issue or PR as relevant to SIG Storage.

Comments

@jsafrane
Copy link
Member

We recommend to use DaemonSet to run CSI drivers on node. If a driver runs fuse daemon, it's almost impossible to update it, as killing a pod with the driver kills the fuse daemons too and it will kill all mounts, possibly corrupting application data.

We need a documented and supported way how to update such CSI drivers. Note that the update process can be manual or the code can live somewhere else, we just need it to to be documented and supported so people don't loose data.

/sig storage
@msau42 @davidz627 @saad-ali @pohly @vladimirvivien @verult @lpabon @jingxu97 @gnufied

@k8s-ci-robot k8s-ci-robot added the sig/storage Categorizes an issue or PR as relevant to SIG Storage. label Oct 19, 2018
@lpabon
Copy link
Contributor

lpabon commented Oct 25, 2018

@jsafrane I think that is the responsibility of the driver, in my opinion. Although we could definitely provide guidelines, we shouldn't provide a solution, since we cannot control their release or update processes.

@fejta-bot
Copy link

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jan 23, 2019
@davidz627
Copy link
Contributor

/remove-lifecycle stale

@k8s-ci-robot k8s-ci-robot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jan 24, 2019
@fredkan
Copy link
Member

fredkan commented Mar 25, 2019

Expect there is a common solution for this issue.

One workaround: https://github.com/AliyunContainerService/csi-plugin/blob/master/docs/oss-upgrade.md

@fejta-bot
Copy link

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jun 23, 2019
@farcaller
Copy link

/remove-lifecycle stale

@k8s-ci-robot k8s-ci-robot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jun 23, 2019
@jim3ma
Copy link

jim3ma commented Jul 17, 2019

Available solution from Alibaba Cloud OSS plugin:
https://github.com/AliyunContainerService/csi-plugin/blob/master/docs/oss-upgrade.md
This solution is making fuse processes running in node's root namespaces and cgroup, so when daemonset pod upgrade, fuse processes will not be killed.

Another solution: Buddy daemonset pods(two daemonset pods work as buddy)
When need upgrade, the buddy pod will take all fd(s) from original pod and then serve csi service.
This solution needs some code changes for fuse drivers.

@fejta-bot
Copy link

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle stale

@k8s-ci-robot k8s-ci-robot added lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Oct 16, 2019
@jim3ma
Copy link

jim3ma commented Oct 23, 2019

/remove-lifecycle stale

@fejta-bot
Copy link

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jan 21, 2020
@davidz627
Copy link
Contributor

/remove-lifecycle stale

@k8s-ci-robot k8s-ci-robot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jan 21, 2020
@andyzhangx
Copy link
Member

andyzhangx commented Feb 24, 2020

I hit similar issue, make fuse driver standalone is one solution;
another problem is that how to recover when those mounting paths are already broken when fuse csi driver is restarted:
so when fuse driver is broken(sometimes due to csi driver pod restarted), the stage volume path is broken, following code will return error directly:

mounted, err := isDirMounted(c.plugin, deviceMountPath)
if err != nil {
klog.Error(log("attacher.MountDevice failed while checking mount status for dir [%s]", deviceMountPath))
return err

is it possible only return error when it's not IsCorruptedMnt, like what flexvolume did:

if pathErr != nil && !mount.IsCorruptedMnt(pathErr) {
return fmt.Errorf("Error checking path: %v", pathErr)

So in that case, even fuse driver is broken, we could make sure if fuse csi driver has remount logic, it could recover after fuse driver is back.
WDYT? I could make code change if that's an acceptable workaround.

@andyzhangx
Copy link
Member

I worked out a PR(#88569) to mitigate this issue when fuse driver on the node is restarted(mount point is corrupted), could someone take a look? Thanks.

@andyzhangx
Copy link
Member

/open
keep the issue open since PR(#88569) is only a mitigation

@Ark-kun
Copy link

Ark-kun commented Oct 31, 2020

/reopen

@k8s-ci-robot
Copy link
Contributor

@Ark-kun: You can't reopen an issue/PR unless you authored it or you are a collaborator.

In response to this:

/reopen

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@andyzhangx
Copy link
Member

/reopen

@k8s-ci-robot k8s-ci-robot reopened this Oct 31, 2020
@k8s-ci-robot
Copy link
Contributor

@andyzhangx: Reopened this issue.

In response to this:

/reopen

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@k8s-ci-robot
Copy link
Contributor

@jsafrane: This issue is currently awaiting triage.

If a SIG or subproject determines this is a relevant issue, they will accept it by applying the triage/accepted label and provide further guidance.

The triage/accepted label can be added by org members by writing /triage accepted in a comment.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@k8s-ci-robot k8s-ci-robot added the needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. label Oct 31, 2020
@jim3ma
Copy link

jim3ma commented Oct 31, 2020

Available solution from Alibaba Cloud OSS plugin:
https://github.com/AliyunContainerService/csi-plugin/blob/master/docs/oss-upgrade.md
This solution is making fuse processes running in node's root namespaces and cgroup, so when daemonset pod upgrade, fuse processes will not be killed.

Another solution: Buddy daemonset pods(two daemonset pods work as buddy)
When need upgrade, the buddy pod will take all fd(s) from original pod and then serve csi service.
This solution needs some code changes for fuse drivers.

We implement a solution - transferring fds in csi pods with surging rolling update.

@andyzhangx
Copy link
Member

Available solution from Alibaba Cloud OSS plugin:
https://github.com/AliyunContainerService/csi-plugin/blob/master/docs/oss-upgrade.md
This solution is making fuse processes running in node's root namespaces and cgroup, so when daemonset pod upgrade, fuse processes will not be killed.
Another solution: Buddy daemonset pods(two daemonset pods work as buddy)
When need upgrade, the buddy pod will take all fd(s) from original pod and then serve csi service.
This solution needs some code changes for fuse drivers.

We implement a solution - transferring fd in csi pod with surging rolling update.

@jim3ma do you have the details of the solution? thanks.

@jim3ma
Copy link

jim3ma commented Oct 31, 2020

Available solution from Alibaba Cloud OSS plugin:
https://github.com/AliyunContainerService/csi-plugin/blob/master/docs/oss-upgrade.md
This solution is making fuse processes running in node's root namespaces and cgroup, so when daemonset pod upgrade, fuse processes will not be killed.
Another solution: Buddy daemonset pods(two daemonset pods work as buddy)
When need upgrade, the buddy pod will take all fd(s) from original pod and then serve csi service.
This solution needs some code changes for fuse drivers.

We implement a solution - transferring fd in csi pod with surging rolling update.

@jim3ma do you have the details of the solution? thanks.

Currently, this solution is using in Ant Group, we will open source in Dragonfly Image Service some times later.

Another solution: csi container starts a fuse session in another container in host not in pod, then we can update csi pod with keeping a fuse session containers. this likes the solution from Alibaba Cloud OSS plugin but within our control.

@fejta-bot
Copy link

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jan 29, 2021
@fejta-bot
Copy link

Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.

If this issue is safe to close now please do so with /close.

Send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle rotten

@k8s-ci-robot k8s-ci-robot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Feb 28, 2021
@fejta-bot
Copy link

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen.
Mark the issue as fresh with /remove-lifecycle rotten.

Send feedback to sig-contributor-experience at kubernetes/community.
/close

@k8s-ci-robot
Copy link
Contributor

@fejta-bot: Closing this issue.

In response to this:

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen.
Mark the issue as fresh with /remove-lifecycle rotten.

Send feedback to sig-contributor-experience at kubernetes/community.
/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@xhejtman
Copy link

Available solution from Alibaba Cloud OSS plugin:
https://github.com/AliyunContainerService/csi-plugin/blob/master/docs/oss-upgrade.md
This solution is making fuse processes running in node's root namespaces and cgroup, so when daemonset pod upgrade, fuse processes will not be killed.
Another solution: Buddy daemonset pods(two daemonset pods work as buddy)
When need upgrade, the buddy pod will take all fd(s) from original pod and then serve csi service.
This solution needs some code changes for fuse drivers.

We implement a solution - transferring fd in csi pod with surging rolling update.

@jim3ma do you have the details of the solution? thanks.

Currently, this solution is using in Ant Group, we will open source in Dragonfly Image Service some times later.

Another solution: csi container starts a fuse session in another container in host not in pod, then we can update csi pod with keeping a fuse session containers. this likes the solution from Alibaba Cloud OSS plugin but within our control.

did you open source already?

@andyzhangx
Copy link
Member

@xhejtman Azure Blob CSI driver uses similar fuse proxy solution, and it's open source, check details here: https://github.com/kubernetes-sigs/blob-csi-driver/tree/master/deploy/blobfuse-proxy

@xhejtman
Copy link

Thank. I was also interested in truly restartable fuse driver, at least I understand what @jim3ma talk about - track everything fuse needs for restart.

@jim3ma
Copy link

jim3ma commented Mar 31, 2022

Available solution from Alibaba Cloud OSS plugin:
https://github.com/AliyunContainerService/csi-plugin/blob/master/docs/oss-upgrade.md
This solution is making fuse processes running in node's root namespaces and cgroup, so when daemonset pod upgrade, fuse processes will not be killed.
Another solution: Buddy daemonset pods(two daemonset pods work as buddy)
When need upgrade, the buddy pod will take all fd(s) from original pod and then serve csi service.
This solution needs some code changes for fuse drivers.

We implement a solution - transferring fd in csi pod with surging rolling update.

@jim3ma do you have the details of the solution? thanks.

Currently, this solution is using in Ant Group, we will open source in Dragonfly Image Service some times later.
Another solution: csi container starts a fuse session in another container in host not in pod, then we can update csi pod with keeping a fuse session containers. this likes the solution from Alibaba Cloud OSS plugin but within our control.

did you open source already?

We are trying to merge some code into upstream fuse driver to make this solution perfect in some corner cases. And someday we will make our solution open source with a real project.

@ofek
Copy link

ofek commented May 14, 2022

@jim3ma Is it open source now?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. sig/storage Categorizes an issue or PR as relevant to SIG Storage.
Projects
None yet
Development

Successfully merging a pull request may close this issue.