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

[Enhancement]CSI plugin checks mount point liveness before binding mount points #2703

Conversation

TrafalgarZZZ
Copy link
Member

@TrafalgarZZZ TrafalgarZZZ commented Mar 7, 2023

Ⅰ. Describe what this PR does

FUSE may be not a reliable filesystem due to its limitation on its user-space implementation. It is quite usual that FUSE process is killed but left a broken mount point on the node. This may incurs further crashes when restarting FUSE pods which attempt to mount the FUSE system onto an already broken mount point.

Currently, Fluid CSI plugin fails to detect such broken mount point. The CSI plugin may consider it as an healthy one and mistakenly binds it to the VolumeMount path in the application Pod.

This PR enhances CSI plugin to check mount point aliveness before binding mount points. Specifically, this PR does:

  • Clean up an existing broken mount point when calling NodeStageVolume() function.
  • Stats the mount point path in the check_mount.sh script which will be called in NodePublishVolume()

Ⅱ. Does this pull request fix one issue?

NONE

Ⅲ. List the added test cases (unit test/integration test) if any, please explain if no tests are needed.

Ⅳ. Describe how to verify it

Ⅴ. Special notes for reviews

Signed-off-by: dongyun.xzh <dongyun.xzh@alibaba-inc.com>
Signed-off-by: dongyun.xzh <dongyun.xzh@alibaba-inc.com>
Signed-off-by: dongyun.xzh <dongyun.xzh@alibaba-inc.com>
Signed-off-by: dongyun.xzh <dongyun.xzh@alibaba-inc.com>
@sonarcloud
Copy link

sonarcloud bot commented Mar 7, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 1 Code Smell

No Coverage information No Coverage information
0.0% 0.0% Duplication

@codecov
Copy link

codecov bot commented Mar 7, 2023

Codecov Report

Merging #2703 (59e5c8b) into master (00424f2) will not change coverage.
The diff coverage is n/a.

❗ Current head 59e5c8b differs from pull request most recent head 0d22048. Consider uploading reports for the commit 0d22048 to get more accurate results

@@           Coverage Diff           @@
##           master    #2703   +/-   ##
=======================================
  Coverage   67.55%   67.55%           
=======================================
  Files         381      381           
  Lines       21968    21968           
=======================================
  Hits        14840    14840           
  Misses       5381     5381           
  Partials     1747     1747           

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@cheyang
Copy link
Collaborator

cheyang commented Mar 7, 2023

/lgtm
/approve

@fluid-e2e-bot
Copy link

fluid-e2e-bot bot commented Mar 7, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: cheyang

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@fluid-e2e-bot fluid-e2e-bot bot merged commit dea89fe into fluid-cloudnative:master Mar 7, 2023
cheyang pushed a commit to cheyang/fluid that referenced this pull request Mar 23, 2023
…unt points (fluid-cloudnative#2703)

* Clean up broken mount point when NodeStageVolume

Signed-off-by: dongyun.xzh <dongyun.xzh@alibaba-inc.com>

* Check mount point aliveness when NodePublishVolume

Signed-off-by: dongyun.xzh <dongyun.xzh@alibaba-inc.com>

* Clean up broken mount point when NodeStageVolume

Signed-off-by: dongyun.xzh <dongyun.xzh@alibaba-inc.com>

* Fix cleaning logic

Signed-off-by: dongyun.xzh <dongyun.xzh@alibaba-inc.com>

---------

Signed-off-by: dongyun.xzh <dongyun.xzh@alibaba-inc.com>
cheyang pushed a commit to cheyang/fluid that referenced this pull request Mar 23, 2023
…unt points (fluid-cloudnative#2703)

* Clean up broken mount point when NodeStageVolume

Signed-off-by: dongyun.xzh <dongyun.xzh@alibaba-inc.com>

* Check mount point aliveness when NodePublishVolume

Signed-off-by: dongyun.xzh <dongyun.xzh@alibaba-inc.com>

* Clean up broken mount point when NodeStageVolume

Signed-off-by: dongyun.xzh <dongyun.xzh@alibaba-inc.com>

* Fix cleaning logic

Signed-off-by: dongyun.xzh <dongyun.xzh@alibaba-inc.com>

---------

Signed-off-by: dongyun.xzh <dongyun.xzh@alibaba-inc.com>
Signed-off-by: cheyang <cheyang@163.com>
cheyang added a commit that referenced this pull request Mar 27, 2023
* [juicefs] fix worker cache when set option (#2563)

* fix worker cache when set option

Signed-off-by: zwwhdls <zww@hdls.me>

* update changelog in chart

Signed-off-by: zwwhdls <zww@hdls.me>

* fix unittest

Signed-off-by: zwwhdls <zww@hdls.me>

---------

Signed-off-by: zwwhdls <zww@hdls.me>
Signed-off-by: cheyang <cheyang@163.com>

* fix multi cache dir (#2639)

* fix multi cache dir

Signed-off-by: zwwhdls <zww@hdls.me>

* fix unit test

---------

Signed-off-by: zwwhdls <zww@hdls.me>
Signed-off-by: cheyang <cheyang@163.com>

* [Enhancement]CSI plugin checks mount point liveness before binding mount points (#2703)

* Clean up broken mount point when NodeStageVolume

Signed-off-by: dongyun.xzh <dongyun.xzh@alibaba-inc.com>

* Check mount point aliveness when NodePublishVolume

Signed-off-by: dongyun.xzh <dongyun.xzh@alibaba-inc.com>

* Clean up broken mount point when NodeStageVolume

Signed-off-by: dongyun.xzh <dongyun.xzh@alibaba-inc.com>

* Fix cleaning logic

Signed-off-by: dongyun.xzh <dongyun.xzh@alibaba-inc.com>

---------

Signed-off-by: dongyun.xzh <dongyun.xzh@alibaba-inc.com>
Signed-off-by: cheyang <cheyang@163.com>

* Prettify error messages for exec.Commands in Fluid (#2718)

* Prettify error log message when calling NodePublishVolume

Signed-off-by: dongyun.xzh <dongyun.xzh@alibaba-inc.com>

* Prettify error logs when calling helm-related funcs

Signed-off-by: dongyun.xzh <dongyun.xzh@alibaba-inc.com>

* Use instead `errors.As`

Signed-off-by: dongyun.xzh <dongyun.xzh@alibaba-inc.com>

* Use instead `errors.As`

Signed-off-by: dongyun.xzh <dongyun.xzh@alibaba-inc.com>

* Set higher log level for helm exec

Signed-off-by: dongyun.xzh <dongyun.xzh@alibaba-inc.com>

---------

Signed-off-by: dongyun.xzh <dongyun.xzh@alibaba-inc.com>
Signed-off-by: cheyang <cheyang@163.com>

* update mount to check mountinfo, To #48327952

Signed-off-by: cheyang <cheyang@163.com>

* update mount to check mountinfo, To #48327952

Signed-off-by: cheyang <cheyang@163.com>

* Build docker images for v0.8.5, To #48327952

Signed-off-by: cheyang <cheyang@163.com>

---------

Signed-off-by: zwwhdls <zww@hdls.me>
Signed-off-by: cheyang <cheyang@163.com>
Signed-off-by: dongyun.xzh <dongyun.xzh@alibaba-inc.com>
Co-authored-by: Weiwei <zww@hdls.me>
Co-authored-by: TzZtzt <trafalgarz@outlook.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants