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

bugfix: fix csi plugin loop mount bug #3287

Conversation

TrafalgarZZZ
Copy link
Member

Ⅰ. Describe what this PR does

This PR fixes #3286, which is caused by looping bind-mounts when Fluid's CSI plugin attempts to mount both /var/lib/kubelet(with mountPropagation=Bidirectional) and /var/lib/kubelet/pki into the container.

This PR fixes this bug by checking if kubelet-root-dir is a parent directory of kubelet-cert-dir and determine whether to mount kubelet-cert-dir. This is to avoid looping bind mounts and mount info leak when restarting the Pod.

Ⅱ. Does this pull request fix one issue?

fixes #3286

Ⅲ. 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: trafalgarzzz <trafalgarz@outlook.com>
Signed-off-by: trafalgarzzz <trafalgarz@outlook.com>
Signed-off-by: trafalgarzzz <trafalgarz@outlook.com>
@sonarcloud
Copy link

sonarcloud bot commented Jun 13, 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 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@codecov
Copy link

codecov bot commented Jun 13, 2023

Codecov Report

Merging #3287 (c614c2c) into master (62c8293) will not change coverage.
The diff coverage is n/a.

❗ Current head c614c2c differs from pull request most recent head 4ce3845. Consider uploading reports for the commit 4ce3845 to get more accurate results

@@           Coverage Diff           @@
##           master    #3287   +/-   ##
=======================================
  Coverage   65.48%   65.48%           
=======================================
  Files         398      398           
  Lines       23179    23179           
=======================================
  Hits        15179    15179           
  Misses       6215     6215           
  Partials     1785     1785           

@cheyang
Copy link
Collaborator

cheyang commented Jun 13, 2023

/test fluid-e2e

Copy link
Collaborator

@cheyang cheyang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm
/approve

@fluid-e2e-bot
Copy link

fluid-e2e-bot bot commented Jun 13, 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 cd5917c into fluid-cloudnative:master Jun 13, 2023
10 checks passed
cheyang pushed a commit to cheyang/fluid that referenced this pull request Jun 14, 2023
* Fix CSI node plugin loop mount error

Signed-off-by: trafalgarzzz <trafalgarz@outlook.com>

---------

Signed-off-by: trafalgarzzz <trafalgarz@outlook.com>
cheyang pushed a commit to cheyang/fluid that referenced this pull request Jun 14, 2023
* Fix CSI node plugin loop mount error

Signed-off-by: trafalgarzzz <trafalgarz@outlook.com>

---------

Signed-off-by: trafalgarzzz <trafalgarz@outlook.com>
Signed-off-by: cheyang <cheyang@163.com>
fluid-e2e-bot bot pushed a commit that referenced this pull request Jun 14, 2023
* Fix CSI node plugin loop mount error



---------

Signed-off-by: trafalgarzzz <trafalgarz@outlook.com>
Signed-off-by: cheyang <cheyang@163.com>
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.

[BUG] CSI Plugin contaminates /proc/mounts with its HostPath volumes when restarting
2 participants