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

Default use random port allocator for runtime controllers #2580

Conversation

TrafalgarZZZ
Copy link
Member

Ⅰ. Describe what this PR does

  • Default to using random port allocator for runtime controllers.
  • Bitmap-based port allocator is still an option that can be set in runtime controllers' command argument (e.g. --port-allocate-policy=bitmap)

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

@codecov
Copy link

codecov bot commented Feb 10, 2023

Codecov Report

Merging #2580 (c75fc4d) into master (31fe1e5) will increase coverage by 0.07%.
The diff coverage is 69.23%.

@@            Coverage Diff             @@
##           master    #2580      +/-   ##
==========================================
+ Coverage   67.51%   67.59%   +0.07%     
==========================================
  Files         368      368              
  Lines       21419    21506      +87     
==========================================
+ Hits        14462    14536      +74     
- Misses       5260     5264       +4     
- Partials     1697     1706       +9     
Impacted Files Coverage Δ
pkg/ddc/base/portallocator/port_allocator.go 80.76% <69.23%> (-4.95%) ⬇️
pkg/ddc/juicefs/transform_fuse.go 78.45% <0.00%> (-2.80%) ⬇️
pkg/ddc/goosefs/ufs_internal.go 67.04% <0.00%> (-1.56%) ⬇️
pkg/ddc/jindo/transform.go 63.13% <0.00%> (-1.34%) ⬇️
pkg/ddc/thin/referencedataset/cm.go 46.83% <0.00%> (-1.22%) ⬇️
pkg/ddc/jindofsx/transform.go 64.17% <0.00%> (-0.12%) ⬇️
pkg/ddc/eac/shutdown.go 35.95% <0.00%> (ø)
api/v1alpha1/dataset_types.go 15.38% <0.00%> (ø)
pkg/ddc/thin/transform_fuse.go 66.66% <0.00%> (+0.24%) ⬆️
pkg/ddc/base/runtime.go 75.78% <0.00%> (+0.65%) ⬆️
... and 4 more

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

Signed-off-by: dongyun.xzh <[email protected]>
@TrafalgarZZZ
Copy link
Member Author

/test fluid-e2e

@cheyang cheyang requested a review from xliuqq February 10, 2023 11:28
@@ -61,8 +72,13 @@ type RuntimePortAllocator struct {
var rpa *RuntimePortAllocator

// SetupRuntimePortAllocator instantiates the global singleton rpa, use BitMap port allocating policy
Copy link
Collaborator

Choose a reason for hiding this comment

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

please correct the function comment.

Copy link
Member Author

Choose a reason for hiding this comment

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

Thx. Done

@xliuqq
Copy link
Collaborator

xliuqq commented Feb 11, 2023

@TrafalgarZZZ @cheyang
Does this PR need to change the value of runtime.portAllocatePolicy from bitmap to random in the fluid chart?

@TrafalgarZZZ
Copy link
Member Author

@TrafalgarZZZ @cheyang Does this PR need to change the value of runtime.portAllocatePolicy from bitmap to random in the fluid chart?

@xliuqq LGTM. Added configurable properties in values.yaml of Fluid's chart. Set them to random by default.

@cheyang
Copy link
Collaborator

cheyang commented Feb 13, 2023

/lgtm
/approve

@fluid-e2e-bot
Copy link

fluid-e2e-bot bot commented Feb 13, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: cheyang, xliuqq

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 d02e807 into fluid-cloudnative:master Feb 13, 2023
cheyang pushed a commit to cheyang/fluid that referenced this pull request Feb 14, 2023
…dnative#2580)

* Validate port allocating policy before setting up

Signed-off-by: dongyun.xzh <[email protected]>

* Expose configurable option for port allocating policy

Signed-off-by: dongyun.xzh <[email protected]>

* Fix unit tests

Signed-off-by: dongyun.xzh <[email protected]>

* Fix static check

Signed-off-by: dongyun.xzh <[email protected]>

* Fix static check

Signed-off-by: dongyun.xzh <[email protected]>

* Fix comments for `SetupRuntimePortAllocator()`

Signed-off-by: dongyun.xzh <[email protected]>

* Support configurable port allocate policy

Signed-off-by: dongyun.xzh <[email protected]>

---------

Signed-off-by: dongyun.xzh <[email protected]>
cheyang pushed a commit to cheyang/fluid that referenced this pull request Feb 18, 2023
…dnative#2580)

* Validate port allocating policy before setting up

Signed-off-by: dongyun.xzh <[email protected]>

* Expose configurable option for port allocating policy

Signed-off-by: dongyun.xzh <[email protected]>

* Fix unit tests

Signed-off-by: dongyun.xzh <[email protected]>

* Fix static check

Signed-off-by: dongyun.xzh <[email protected]>

* Fix static check

Signed-off-by: dongyun.xzh <[email protected]>

* Fix comments for `SetupRuntimePortAllocator()`

Signed-off-by: dongyun.xzh <[email protected]>

* Support configurable port allocate policy

Signed-off-by: dongyun.xzh <[email protected]>

---------

Signed-off-by: dongyun.xzh <[email protected]>
cheyang pushed a commit to cheyang/fluid that referenced this pull request Feb 18, 2023
…dnative#2580)

* Validate port allocating policy before setting up

Signed-off-by: dongyun.xzh <[email protected]>

* Expose configurable option for port allocating policy

Signed-off-by: dongyun.xzh <[email protected]>

* Fix unit tests

Signed-off-by: dongyun.xzh <[email protected]>

* Fix static check

Signed-off-by: dongyun.xzh <[email protected]>

* Fix static check

Signed-off-by: dongyun.xzh <[email protected]>

* Fix comments for `SetupRuntimePortAllocator()`

Signed-off-by: dongyun.xzh <[email protected]>

* Support configurable port allocate policy

Signed-off-by: dongyun.xzh <[email protected]>

---------

Signed-off-by: dongyun.xzh <[email protected]>
Signed-off-by: cheyang <[email protected]>
cheyang pushed a commit to cheyang/fluid that referenced this pull request Feb 18, 2023
…dnative#2580)

* Validate port allocating policy before setting up

Signed-off-by: dongyun.xzh <[email protected]>

* Expose configurable option for port allocating policy

Signed-off-by: dongyun.xzh <[email protected]>

* Fix unit tests

Signed-off-by: dongyun.xzh <[email protected]>

* Fix static check

Signed-off-by: dongyun.xzh <[email protected]>

* Fix static check

Signed-off-by: dongyun.xzh <[email protected]>

* Fix comments for `SetupRuntimePortAllocator()`

Signed-off-by: dongyun.xzh <[email protected]>

* Support configurable port allocate policy

Signed-off-by: dongyun.xzh <[email protected]>

---------

Signed-off-by: dongyun.xzh <[email protected]>
Signed-off-by: cheyang <[email protected]>
cheyang pushed a commit to cheyang/fluid that referenced this pull request Feb 18, 2023
…dnative#2580)

* Validate port allocating policy before setting up

Signed-off-by: dongyun.xzh <[email protected]>

* Expose configurable option for port allocating policy

Signed-off-by: dongyun.xzh <[email protected]>

* Fix unit tests

Signed-off-by: dongyun.xzh <[email protected]>

* Fix static check

Signed-off-by: dongyun.xzh <[email protected]>

* Fix static check

Signed-off-by: dongyun.xzh <[email protected]>

* Fix comments for `SetupRuntimePortAllocator()`

Signed-off-by: dongyun.xzh <[email protected]>

* Support configurable port allocate policy

Signed-off-by: dongyun.xzh <[email protected]>

---------

Signed-off-by: dongyun.xzh <[email protected]>
cheyang pushed a commit to cheyang/fluid that referenced this pull request Feb 18, 2023
…dnative#2580)

* Validate port allocating policy before setting up

Signed-off-by: dongyun.xzh <[email protected]>

* Expose configurable option for port allocating policy

Signed-off-by: dongyun.xzh <[email protected]>

* Fix unit tests

Signed-off-by: dongyun.xzh <[email protected]>

* Fix static check

Signed-off-by: dongyun.xzh <[email protected]>

* Fix static check

Signed-off-by: dongyun.xzh <[email protected]>

* Fix comments for `SetupRuntimePortAllocator()`

Signed-off-by: dongyun.xzh <[email protected]>

* Support configurable port allocate policy

Signed-off-by: dongyun.xzh <[email protected]>

---------

Signed-off-by: dongyun.xzh <[email protected]>
Signed-off-by: cheyang <[email protected]>
cheyang added a commit that referenced this pull request Feb 18, 2023
)

* Validate port allocating policy before setting up



* Expose configurable option for port allocating policy



* Fix unit tests



* Fix static check



* Fix static check



* Fix comments for `SetupRuntimePortAllocator()`



* Support configurable port allocate policy



---------

Signed-off-by: dongyun.xzh <[email protected]>
Signed-off-by: cheyang <[email protected]>
Co-authored-by: TzZtzt <[email protected]>
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.

3 participants