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

karmada-scheduler: merge scalescheduling with normal scheduling #1051

Merged
merged 3 commits into from
Dec 7, 2021

Conversation

Garrybest
Copy link
Member

What type of PR is this?
/kind feature

What this PR does / why we need it:
Now scale scheduling has a particular process without share the same logic with normal scaleduling. Here shows some problems:

  1. The code is too complicated.
  2. If a new cluster has added, the scale scheduling could not make the new one as a candidate because the process does not contain a replica estimation step. The result of candidate clusters are based on the previous scheduling result. See here

Now the two steps have been merged. Actually, the first scheduling is a special kind of scaling up. There is no need to separate the two kinds.

Which issue(s) this PR fixes:
Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

NONE

@karmada-bot karmada-bot added the kind/feature Categorizes issue or PR as related to a new feature. label Nov 30, 2021
@karmada-bot karmada-bot added the size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. label Nov 30, 2021
@Garrybest
Copy link
Member Author

The PR has been divided into 3 commits.

  1. Merge scale scheduling with normal scheduling. This is the most important change.
  2. Delete scale scheduling. I just delete the scale scheduling logic from scheduler, it is almost full of deletion codes.
  3. Unit test change for function parameters change. This is not that important.

@Garrybest
Copy link
Member Author

@karmada-bot
Copy link
Collaborator

@Garrybest: GitHub didn't allow me to request PR reviews from the following users: gf457832386, BDXGD.

Note that only karmada-io members and repo collaborators can review this PR, and authors cannot review their own PRs.

In response to this:

/cc @RainbowMango @gf457832386 @BDXGD @mrlihanbo

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@RainbowMango
Copy link
Member

Now the two steps have been merged. Actually, the first scheduling is a special kind of scaling up. There is no need to separate the two kinds.

Same idea with #988 (comment).

@RainbowMango
Copy link
Member

cc @dddddai

@qianjun1993
Copy link
Contributor

As we merged the logic of first schedule and scale schedule, Maybe we do not need retain the cluster with 0 replicas in scheudlue result.

desireReplicaInfos[cluster] = 0

Copy link
Member

@RainbowMango RainbowMango left a comment

Choose a reason for hiding this comment

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

Review still on-going.

We are lacking proper abstractions, the code becomes difficult to understand, now. :(

pkg/scheduler/core/division_algorithm.go Outdated Show resolved Hide resolved
@Garrybest
Copy link
Member Author

We are lacking proper abstractions, the code becomes difficult to understand, now. :(

Emmm, that's right, too complicated😵‍💫. But this PR could help make it better because we merge the two cases.

@RainbowMango
Copy link
Member

Yes, this PR is a relief.
By the way, can you solve the conflicts, we just merged #988, and I wish this PR is the next.

@RainbowMango
Copy link
Member

/lgtm
/approve

@karmada-bot karmada-bot added the lgtm Indicates that a PR is ready to be merged. label Dec 7, 2021
@karmada-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: RainbowMango

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

@karmada-bot karmada-bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Dec 7, 2021
@karmada-bot karmada-bot merged commit f7b2a91 into karmada-io:master Dec 7, 2021
@Garrybest Garrybest deleted the pr_delete_scale branch December 7, 2021 08:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. kind/feature Categorizes issue or PR as related to a new feature. lgtm Indicates that a PR is ready to be merged. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants