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

Add juicefsruntime dataload function #1539

Merged
merged 87 commits into from
Mar 22, 2022

Conversation

ldd91
Copy link
Contributor

@ldd91 ldd91 commented Mar 18, 2022

Ⅰ. Describe what this PR does

Add juicefs dataload function

Ⅱ. Does this pull request fix one issue?

Ⅲ. 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

TrafalgarZZZ and others added 29 commits March 18, 2022 15:48
* Add helm lint check in Github workflow

Signed-off-by: TrafalgarZZZ <[email protected]>

* Fix jindofs helm lint

Signed-off-by: TrafalgarZZZ <[email protected]>
Signed-off-by: zwwhdls <[email protected]>
Signed-off-by: zwwhdls <[email protected]>
* Add pd documents, To #38946668

Signed-off-by: cheyang <[email protected]>

* Add pd documents, To #38946668

Signed-off-by: cheyang <[email protected]>

* Add pd documents, To #38946668

Signed-off-by: cheyang <[email protected]>
Signed-off-by: zwwhdls <[email protected]>
)

* Add remount check for hostpath mount during sync

Signed-off-by: nizifan <[email protected]>

* Fix CI issue & rename function

Signed-off-by: nizifan <[email protected]>

* Add ut & fix potential leak of ufstoupdate.toadd

Signed-off-by: nizifan <[email protected]>

* improve test coverage & address comments - add new line

Signed-off-by: nizifan <[email protected]>

* Fix ci issue

Signed-off-by: nizifan <[email protected]>

* Only perform remount operation when mounttime ealier than master starting time

Signed-off-by: nizifan <[email protected]>

* Fix ci issue

Signed-off-by: nizifan <[email protected]>

* add ut

Signed-off-by: nizifan <[email protected]>

* rename function

Signed-off-by: nizifan <[email protected]>

Co-authored-by: nizifan <[email protected]>
Signed-off-by: zwwhdls <[email protected]>
…tive#1385)

* JindoFS fuse recover

Signed-off-by: frankleaf <[email protected]>

* refine

Signed-off-by: frankleaf <[email protected]>

* refine

Signed-off-by: frankleaf <[email protected]>

* refine

Signed-off-by: frankleaf <[email protected]>

* refine

Signed-off-by: frankleaf <[email protected]>

* refine

Signed-off-by: frankleaf <[email protected]>
Signed-off-by: zwwhdls <[email protected]>
* Fix format, To #38946668

Signed-off-by: cheyang <[email protected]>

* Add volume, To #38946668

Signed-off-by: cheyang <[email protected]>
Signed-off-by: zwwhdls <[email protected]>
* Refactor Fluid CSI Plugin

Signed-off-by: TrafalgarZZZ <[email protected]>

* Go fmt

Signed-off-by: TrafalgarZZZ <[email protected]>

* Option to enable fuse mount point recovery

Signed-off-by: TrafalgarZZZ <[email protected]>

* Refactor Fluid CSI Plugin

- Move package 'mountinfo' to utils
- Move package 'fuse' to plugin
- Add registry functions

Signed-off-by: TrafalgarZZZ <[email protected]>

* Minor fix for fuse recover period

Signed-off-by: TrafalgarZZZ <[email protected]>

* Remove duplicate license

Signed-off-by: TrafalgarZZZ <[email protected]>

* Declare registraion funcs to enable/disable feature gates

Signed-off-by: TrafalgarZZZ <[email protected]>

* Add tests

Signed-off-by: TrafalgarZZZ <[email protected]>

* Add tests

Signed-off-by: TrafalgarZZZ <[email protected]>

* Fix copyright

Signed-off-by: TrafalgarZZZ <[email protected]>
Signed-off-by: zwwhdls <[email protected]>
Signed-off-by: ssz1997 <[email protected]>
Signed-off-by: zwwhdls <[email protected]>
* Support serverless, To #38946668

Signed-off-by: cheyang <[email protected]>

Fix ut, To #38946668

Signed-off-by: cheyang <[email protected]>

* Signed-off-by: cheyang <[email protected]>

Add mountPropagationHostToContainer, To #37688693

Add testcase, To #37688693

Signed-off-by: cheyang <[email protected]>
Signed-off-by: zwwhdls <[email protected]>
* Fix docker build for cento8, To #37688693

Signed-off-by: cheyang <[email protected]>

* Fix docker build for cento8, To #37688693

Signed-off-by: cheyang <[email protected]>
Signed-off-by: zwwhdls <[email protected]>
* Build docker image, To #37688693

Signed-off-by: cheyang <[email protected]>

* Build docker image, To #37688693

Signed-off-by: cheyang <[email protected]>
Signed-off-by: zwwhdls <[email protected]>
* Support Alluxio, To #37688693

Signed-off-by: cheyang <[email protected]>

* Support Alluxio, To #37688693

Signed-off-by: cheyang <[email protected]>

* Support Alluxio, To #37688693

Signed-off-by: cheyang <[email protected]>
Signed-off-by: zwwhdls <[email protected]>
* Support namespace is empty, To #37688693

Signed-off-by: cheyang <[email protected]>

* Support namespace is empty, To #37688693

Signed-off-by: cheyang <[email protected]>

* Support namespace is empty, To #37688693

Signed-off-by: cheyang <[email protected]>

* Support namespace is empty, To #37688693

Signed-off-by: cheyang <[email protected]>

* Support namespace is empty, To #37688693

Signed-off-by: cheyang <[email protected]>

* Support namespace is empty, To #37688693

Signed-off-by: cheyang <[email protected]>

* Support namespace is empty, To #37688693

Signed-off-by: cheyang <[email protected]>

* Support namespace is empty, To #37688693

Signed-off-by: cheyang <[email protected]>

* Support namespace is empty, To #37688693

Signed-off-by: cheyang <[email protected]>

* Support namespace is empty, To #37688693

Signed-off-by: cheyang <[email protected]>

* Support namespace is empty, To #37688693

Signed-off-by: cheyang <[email protected]>

* Support namespace is empty, To #37688693

Signed-off-by: cheyang <[email protected]>
Signed-off-by: zwwhdls <[email protected]>
…-cloudnative#1417)

* Fix redundant type from array, slice, or map composite literal, To #37688693

Signed-off-by: cheyang <[email protected]>

* Fix redundant type from array, slice, or map composite literal, To #37688693

Signed-off-by: cheyang <[email protected]>
Signed-off-by: zwwhdls <[email protected]>
* change goosefs fuse default parameters; fix  redundant type from array, slice, or map composite literal; fix when ha mode journal type

Signed-off-by: xieydd <[email protected]>

* fix comments

Signed-off-by: xieydd <[email protected]>
Signed-off-by: zwwhdls <[email protected]>
…ative#1428)

* fix clean cache linux version error

Signed-off-by: xieydd <[email protected]>

* update goosefs default image to 1.2.0

Signed-off-by: xieydd <[email protected]>

* fix comment

Signed-off-by: xieydd <[email protected]>

* fix timeout option for ubuntu and alpine base image

Signed-off-by: xieydd <[email protected]>

* fix timeout option for ubuntu and alpine base image

Signed-off-by: xieydd <[email protected]>
Signed-off-by: zwwhdls <[email protected]>
* Fix update dataload status error

Signed-off-by: Ruofeng Lei <[email protected]>

* Fix some incorrect usage of `ctx.Name`

Signed-off-by: Ruofeng Lei <[email protected]>
Signed-off-by: zwwhdls <[email protected]>
RongGu and others added 9 commits March 18, 2022 15:48
* update committer and maintainer file

Signed-off-by: RongGu <[email protected]>

* update Governance file to add committer list file

Signed-off-by: RongGu <[email protected]>

* fix typo

Signed-off-by: RongGu <[email protected]>
Signed-off-by: zwwhdls <[email protected]>
* Add samples, To #40056722

Signed-off-by: cheyang <[email protected]>

* Add samples, To #40056722

Signed-off-by: cheyang <[email protected]>

* Update dockerfile, To #40056722

Signed-off-by: cheyang <[email protected]>

* Update dockerfile, To #40056722

Signed-off-by: cheyang <[email protected]>

* Build docker image for env in csi plugin, To #37688693

Signed-off-by: cheyang <[email protected]>
Signed-off-by: zwwhdls <[email protected]>
Signed-off-by: zwwhdls <[email protected]>
Signed-off-by: zwwhdls <[email protected]>
Signed-off-by: zwwhdls <[email protected]>
zwwhdls added 2 commits March 18, 2022 15:57
Signed-off-by: zwwhdls <[email protected]>
Signed-off-by: zwwhdls <[email protected]>
@codecov
Copy link

codecov bot commented Mar 18, 2022

Codecov Report

Merging #1539 (c254c0a) into master (3d632b9) will increase coverage by 0.08%.
The diff coverage is 76.29%.

@@            Coverage Diff             @@
##           master    #1539      +/-   ##
==========================================
+ Coverage   70.68%   70.76%   +0.08%     
==========================================
  Files         237      238       +1     
  Lines       12998    13127     +129     
==========================================
+ Hits         9187     9289     +102     
- Misses       2830     2843      +13     
- Partials      981      995      +14     
Impacted Files Coverage Δ
pkg/ddc/juicefs/health_check.go 77.23% <ø> (+1.23%) ⬆️
pkg/ddc/juicefs/utils.go 84.12% <ø> (+2.38%) ⬆️
pkg/ddc/juicefs/data_load.go 76.06% <76.06%> (-23.94%) ⬇️
pkg/ddc/juicefs/cacheinfo_parser.go 77.77% <77.77%> (ø)
pkg/ddc/jindo/dataset.go 69.44% <0.00%> (ø)
pkg/ddc/alluxio/worker.go 73.77% <0.00%> (ø)
pkg/ddc/jindo/replicas.go 65.00% <0.00%> (ø)
pkg/ddc/jindo/load_data.go 64.76% <0.00%> (ø)
pkg/ddc/alluxio/load_data.go 82.95% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3d632b9...c254c0a. Read the comment docs.

)

// G
func GetCacheInfoFromConfigmap(client client.Client, name string, namespace string) (cacheinfo map[string]string, err error) {
Copy link
Collaborator

@cheyang cheyang Mar 18, 2022

Choose a reason for hiding this comment

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

Do you want to write comments for function GetCacheInfoFromConfigmap?

Copy link
Member

Choose a reason for hiding this comment

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

done

@@ -49,9 +49,12 @@ rules:
- apiGroups:
- ""
resources:
- events
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why is events missing?

Copy link
Member

Choose a reason for hiding this comment

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

events bas been involved in line22.

@@ -61,6 +64,16 @@ rules:
- statefulsets/status
verbs:
- '*'
- apiGroups:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is necessary to enlarge the RBAC authorization of dataset controller?

Copy link
Member

@zwwhdls zwwhdls Mar 22, 2022

Choose a reason for hiding this comment

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

update: create rbac in juicefs controller.

@cheyang cheyang requested a review from yangyuliufeng March 19, 2022 04:26

for((j=0;j<${#paths[@]};j++)) do
echo -e "juicefs warmup on $pod ${paths[j]} starts"
/usr/local/bin/kubectl -n $ns exec -it $pod -- $COMMAND
Copy link
Collaborator

Choose a reason for hiding this comment

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

Will you add timeout to avoid the job hang?

Copy link
Member

Choose a reason for hiding this comment

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

done

@cheyang
Copy link
Collaborator

cheyang commented Mar 19, 2022

Please fix no check issue. thanks.

pkg/ddc/juicefs/data_load.go:208:25: Error return value of `fileUtils.UnMount` is not checked (errcheck)
	defer fileUtils.UnMount(mountPath)

@cheyang cheyang requested a review from TrafalgarZZZ March 19, 2022 10:30
/usr/local/bin/kubectl -n $ns exec -it $pod -- juicefs warmup $MOUNTPATH${paths[j]}
/usr/local/bin/kubectl -n $ns exec -it $pod -- umount $MOUNTPATH
/usr/local/bin/kubectl -n $ns exec -it $pod --request-timeout=10s -- $COMMAND
/usr/local/bin/kubectl -n $ns exec -it $pod --request-timeout=1m -- juicefs warmup $MOUNTPATH${paths[j]}
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think the timeout of warmup behavior should be configurable. By the way, is 1Minute enough for juicefs warm scenario?

Copy link
Member

Choose a reason for hiding this comment

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

done

- name: script
configMap:
name: {{ template "juicefs.fullname" . }}-script
defaultMode: 0777
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why not setting 0755?

Copy link
Member

Choose a reason for hiding this comment

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

0755 is ok, done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.