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: support mountMode configuration to skip checking mount ready #4346

Conversation

Syspretor
Copy link
Collaborator

@Syspretor Syspretor commented Oct 10, 2024

As a premise, this PR clarifies a concept that has always existed in Fluid:
"MountMode". Historically, the processes responsible for executing the fuse mount actions have existed in two patterns: mountPod and sidecar.
The mountPod is initiated before the pod starts, performing the corresponding mount actions. Meanwhile, the NodePublishVolume interface of the Fluid CSI plugin implements a check_mount script to verify whether the mountPod has completed its mounting. However, in certain runtime scenarios where dataset.spec.mounts may initially be empty (such as thinRuntime or vineyard), there are no initial mount points, causing the check_mount validation of the NodePublishVolume interface to fail. This results in the inability to start pods using mountPod as the mountMode.

To address this issue, this PR defines the annotation fluid.io/skip-check-mount-ready-target in the runtime, with possible values as follows:

"": Skip none,
"All": Skill all mount mode to check mount ready,
"MountPodOnly": for only mountPod to skip check mount ready,
"SidecarOnly": for only sidecar to skip check mount ready,

This annotation will be processed by the runtime engine and transmitted as PV volume attributes to the CSI plugin. In the NodePublishVolume interface logic of the CSI plugin, it will check the mount readiness only when this annotation's value is either "MountPodOnly" or "All".

For example, we can declare a runtime that bypasses the CSI plugin's mount readiness check for the mountPod during the app pod startup process.

apiVersion: data.fluid.io/v1alpha1
kind: ThinRuntime
metadata:
  name: demo
  annotations:
    fluid.io/skip-check-mount-ready-target: "MountPod"
spec:
  profileName: demo

@cheyang
Copy link
Collaborator

cheyang commented Oct 10, 2024

fluid.io/check-fuse-mount-ready-pattern

I suggest the key should be skip-check-mount-ready-target, and default value is "".

@cheyang
Copy link
Collaborator

cheyang commented Oct 10, 2024

@Syspretor Please fix the conflict file. Thanks.

@Syspretor Syspretor force-pushed the feature/support-skip-check-mount-ready branch 3 times, most recently from f95fade to c85d30a Compare October 11, 2024 07:16
@Syspretor Syspretor changed the title feat: support fuse pattern configuration to skip checking mount ready feat: support mountMode configuration to skip checking mount ready Oct 11, 2024
Signed-off-by: jiuyu <guotongyu.gty@alibaba-inc.com>
@Syspretor Syspretor force-pushed the feature/support-skip-check-mount-ready branch from c85d30a to 3002618 Compare October 11, 2024 07:59
Copy link

sonarcloud bot commented Oct 11, 2024

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

Copy link

fluid-e2e-bot bot commented Oct 12, 2024

[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 64187af into fluid-cloudnative:master Oct 12, 2024
13 checks passed
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.

2 participants