Skip to content

Conversation

@TrafalgarZZZ
Copy link
Member

@TrafalgarZZZ TrafalgarZZZ commented Dec 11, 2023

Ⅰ. Describe what this PR does

  1. Remove any fsGroup related transformation in Jindofsx and JindoCache engine. fsGroup has no critical effect on JindoRuntime's functionality but it will chown mounted persistent volumes which may cause unexpected changes on file ownership and permissions. See Configure volume permission and ownership change policy for Pods for more information:

By default, Kubernetes recursively changes ownership and permissions for the contents of each volume to match the fsGroup specified in a Pod's securityContext when that volume is mounted. For large volumes, checking and changing ownership and permissions can take a lot of time, slowing Pod startup.

  1. mount ufs volumes in read-only mode unless the Dataset is explicitly set to ReadWriteMany

Ⅱ. Does this pull request fix one issue?

fixes #XXXX

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

codecov bot commented Dec 11, 2023

Codecov Report

Attention: 4 lines in your changes are missing coverage. Please review.

Comparison is base (c7c5b72) 64.26% compared to head (de952a0) 64.27%.
Report is 1 commits behind head on master.

Files Patch % Lines
pkg/ddc/jindocache/transform.go 66.66% 1 Missing and 1 partial ⚠️
pkg/ddc/jindofsx/transform.go 66.66% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##           master    #3632   +/-   ##
=======================================
  Coverage   64.26%   64.27%           
=======================================
  Files         443      443           
  Lines       26739    26749   +10     
=======================================
+ Hits        17185    17193    +8     
- Misses       7541     7542    +1     
- Partials     2013     2014    +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Signed-off-by: trafalgarzzz <trafalgarz@outlook.com>
@TrafalgarZZZ
Copy link
Member Author

/test fluid-e2e

// the dataset is set to ReadWriteMany explicitly.
ufsVolumeReadOnly := true
accessModes := dataset.Spec.AccessModes
if len(accessModes) == 1 && accessModes[0] == corev1.ReadWriteMany {
Copy link
Collaborator

Choose a reason for hiding this comment

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

How bout ReadWriteOnce?

Copy link
Member Author

Choose a reason for hiding this comment

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

ReadWriteOnce is now not supported for Fluid datasets.

{{- else if .Values.nodeSelector }}
{{ toYaml .Values.nodeSelector | trim | indent 8 }}
{{- end }}
securityContext:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please also update chart version and changelog. thanks.

Copy link
Member Author

Choose a reason for hiding this comment

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

Done

Signed-off-by: trafalgarzzz <trafalgarz@outlook.com>
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 Dec 12, 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

Details 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

@sonarqubecloud
Copy link

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
8.3% 8.3% Duplication

cheyang pushed a commit to cheyang/fluid that referenced this pull request Dec 14, 2023
* Remove jindofsx's securityContext.fsGroup

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 Dec 14, 2023
* Remove jindofsx's securityContext.fsGroup

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 Dec 15, 2023
* enhance: remove jindoruntime's fsGroup (#3632)

* Remove jindofsx's securityContext.fsGroup

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

---------

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

* Mount ufs volumes according to datasets' accessModes, To #53506158

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

* Mount ufs volumes according to datasets' accessModes, To #53506158

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

---------

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.

2 participants