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

Schduler: MAXFILLUP strategy will spread vreplicas across multiple pods #8263

Merged
merged 7 commits into from
Oct 29, 2024

Conversation

pierDipi
Copy link
Member

@pierDipi pierDipi commented Oct 21, 2024

the MAXFILLUP algorithm was using an affinity strategy, meaning that it would prioritize adding new vreplicas to pods with the same resources.

However, the downside is that if one pod goes down or gets re-scheduled the entire resource would be down and not produce events. By spreading replicas across multiple real replicas we would guarantee better availability.

Remove configurable HA scheduler and fix reserved replicas logic.

the MAXFILLUP algorithm was using an affinity strategy, meaning that
it would prioritize adding new vreplicas to pods with the same resources.

However, the downside is that if one pod goes down or gets
re-scheduled the entire resource would be down and not produce
events. By spreading replicas across multiple real replicas we would
guarantee better availability.

Signed-off-by: Pierangelo Di Pilato <[email protected]>
@knative-prow knative-prow bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Oct 21, 2024
Copy link

knative-prow bot commented Oct 21, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: pierDipi

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

@knative-prow knative-prow bot requested review from aliok and creydr October 21, 2024 16:23
@knative-prow knative-prow bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 21, 2024
Copy link

codecov bot commented Oct 21, 2024

Codecov Report

Attention: Patch coverage is 86.19048% with 29 lines in your changes missing coverage. Please review.

Project coverage is 64.61%. Comparing base (e6490c3) to head (33bc38f).
Report is 12 commits behind head on main.

Files with missing lines Patch % Lines
pkg/scheduler/statefulset/scheduler.go 89.67% 10 Missing and 6 partials ⚠️
pkg/scheduler/statefulset/autoscaler.go 75.00% 4 Missing and 3 partials ⚠️
pkg/scheduler/testing/client.go 0.00% 5 Missing ⚠️
pkg/scheduler/state/helpers.go 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8263      +/-   ##
==========================================
- Coverage   66.57%   64.61%   -1.96%     
==========================================
  Files         371      362       -9     
  Lines       18281    22226    +3945     
==========================================
+ Hits        12170    14361    +2191     
- Misses       5325     7113    +1788     
+ Partials      786      752      -34     

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

@knative-prow knative-prow bot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Oct 22, 2024
Signed-off-by: Pierangelo Di Pilato <[email protected]>
…hat is placements

Signed-off-by: Pierangelo Di Pilato <[email protected]>
Signed-off-by: Pierangelo Di Pilato <[email protected]>
pierDipi added a commit to pierDipi/eventing-kafka-broker that referenced this pull request Oct 29, 2024
Signed-off-by: Pierangelo Di Pilato <[email protected]>
Signed-off-by: Pierangelo Di Pilato <[email protected]>
@maschmid
Copy link
Contributor

/lgtm

@knative-prow knative-prow bot added the lgtm Indicates that a PR is ready to be merged. label Oct 29, 2024
@knative-prow knative-prow bot merged commit 7c97e6f into knative:main Oct 29, 2024
31 of 36 checks passed
@pierDipi pierDipi deleted the spread-replicas-across-pods branch October 30, 2024 05:42
@pierDipi
Copy link
Member Author

/cherry-pick release-1.15

@pierDipi
Copy link
Member Author

/cherry-pick release-1.16

@knative-prow-robot
Copy link
Contributor

@pierDipi: new pull request created: #8290

In response to this:

/cherry-pick release-1.15

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-sigs/prow repository.

@knative-prow-robot
Copy link
Contributor

@pierDipi: new pull request created: #8291

In response to this:

/cherry-pick release-1.16

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-sigs/prow repository.

@pierDipi
Copy link
Member Author

/cherry-pick release-1.14

@knative-prow-robot
Copy link
Contributor

@pierDipi: #8263 failed to apply on top of branch "release-1.14":

Applying: Schduler: MAXFILLUP strategy will spread vreplicas across multiple pods
Applying: Remove configurable HA scheduler, fix reserved replicas logic
Using index info to reconstruct a base tree...
M	pkg/scheduler/doc.go
M	pkg/scheduler/factory/registry.go
M	pkg/scheduler/placement.go
M	pkg/scheduler/placement_test.go
M	pkg/scheduler/plugins/core/availabilitynodepriority/availability_node_priority.go
M	pkg/scheduler/plugins/core/availabilitynodepriority/availability_node_priority_test.go
M	pkg/scheduler/plugins/core/availabilityzonepriority/availability_zone_priority.go
M	pkg/scheduler/plugins/core/availabilityzonepriority/availability_zone_priority_test.go
M	pkg/scheduler/plugins/core/evenpodspread/even_pod_spread.go
M	pkg/scheduler/plugins/core/evenpodspread/even_pod_spread_test.go
M	pkg/scheduler/plugins/core/lowestordinalpriority/lowest_ordinal_priority.go
M	pkg/scheduler/plugins/core/lowestordinalpriority/lowest_ordinal_priority_test.go
M	pkg/scheduler/plugins/core/podfitsresources/pod_fits_resources.go
M	pkg/scheduler/plugins/core/podfitsresources/pod_fits_resources_test.go
M	pkg/scheduler/plugins/core/removewithavailabilitynodepriority/remove_with_availability_node_priority.go
M	pkg/scheduler/plugins/core/removewithavailabilitynodepriority/remove_with_availability_node_priority_test.go
M	pkg/scheduler/plugins/core/removewithavailabilityzonepriority/remove_with_availability_zone_priority.go
M	pkg/scheduler/plugins/core/removewithavailabilityzonepriority/remove_with_availability_zone_priority_test.go
M	pkg/scheduler/plugins/core/removewithevenpodspreadpriority/remove_with_even_pod_spread_priority.go
M	pkg/scheduler/plugins/core/removewithevenpodspreadpriority/remove_with_even_pod_spread_priority_test.go
M	pkg/scheduler/plugins/core/removewithhighestordinalpriority/remove_with_highest_ordinal_priority.go
M	pkg/scheduler/plugins/core/removewithhighestordinalpriority/remove_with_highest_ordinal_priority_test.go
M	pkg/scheduler/plugins/kafka/nomaxresourcecount/no_max_resource_count.go
M	pkg/scheduler/plugins/kafka/nomaxresourcecount/no_max_resource_count_test.go
M	pkg/scheduler/scheduler.go
M	pkg/scheduler/state/helpers.go
M	pkg/scheduler/state/interface.go
M	pkg/scheduler/state/interface_test.go
M	pkg/scheduler/state/state.go
M	pkg/scheduler/state/state_test.go
M	pkg/scheduler/statefulset/autoscaler.go
M	pkg/scheduler/statefulset/autoscaler_test.go
M	pkg/scheduler/statefulset/scheduler.go
M	pkg/scheduler/statefulset/scheduler_test.go
M	pkg/scheduler/testing/vpod.go
Falling back to patching base and 3-way merge...
Auto-merging pkg/scheduler/testing/vpod.go
Auto-merging pkg/scheduler/statefulset/scheduler_test.go
Auto-merging pkg/scheduler/statefulset/scheduler.go
Auto-merging pkg/scheduler/statefulset/autoscaler_test.go
Auto-merging pkg/scheduler/statefulset/autoscaler.go
Auto-merging pkg/scheduler/state/state_test.go
Auto-merging pkg/scheduler/state/state.go
CONFLICT (modify/delete): pkg/scheduler/state/interface_test.go deleted in Remove configurable HA scheduler, fix reserved replicas logic and modified in HEAD. Version HEAD of pkg/scheduler/state/interface_test.go left in tree.
CONFLICT (modify/delete): pkg/scheduler/state/interface.go deleted in Remove configurable HA scheduler, fix reserved replicas logic and modified in HEAD. Version HEAD of pkg/scheduler/state/interface.go left in tree.
Auto-merging pkg/scheduler/state/helpers.go
Auto-merging pkg/scheduler/scheduler.go
CONFLICT (modify/delete): pkg/scheduler/plugins/kafka/nomaxresourcecount/no_max_resource_count_test.go deleted in Remove configurable HA scheduler, fix reserved replicas logic and modified in HEAD. Version HEAD of pkg/scheduler/plugins/kafka/nomaxresourcecount/no_max_resource_count_test.go left in tree.
CONFLICT (modify/delete): pkg/scheduler/plugins/kafka/nomaxresourcecount/no_max_resource_count.go deleted in Remove configurable HA scheduler, fix reserved replicas logic and modified in HEAD. Version HEAD of pkg/scheduler/plugins/kafka/nomaxresourcecount/no_max_resource_count.go left in tree.
CONFLICT (modify/delete): pkg/scheduler/plugins/core/removewithhighestordinalpriority/remove_with_highest_ordinal_priority_test.go deleted in Remove configurable HA scheduler, fix reserved replicas logic and modified in HEAD. Version HEAD of pkg/scheduler/plugins/core/removewithhighestordinalpriority/remove_with_highest_ordinal_priority_test.go left in tree.
CONFLICT (modify/delete): pkg/scheduler/plugins/core/removewithhighestordinalpriority/remove_with_highest_ordinal_priority.go deleted in Remove configurable HA scheduler, fix reserved replicas logic and modified in HEAD. Version HEAD of pkg/scheduler/plugins/core/removewithhighestordinalpriority/remove_with_highest_ordinal_priority.go left in tree.
CONFLICT (modify/delete): pkg/scheduler/plugins/core/removewithevenpodspreadpriority/remove_with_even_pod_spread_priority_test.go deleted in Remove configurable HA scheduler, fix reserved replicas logic and modified in HEAD. Version HEAD of pkg/scheduler/plugins/core/removewithevenpodspreadpriority/remove_with_even_pod_spread_priority_test.go left in tree.
CONFLICT (modify/delete): pkg/scheduler/plugins/core/removewithevenpodspreadpriority/remove_with_even_pod_spread_priority.go deleted in Remove configurable HA scheduler, fix reserved replicas logic and modified in HEAD. Version HEAD of pkg/scheduler/plugins/core/removewithevenpodspreadpriority/remove_with_even_pod_spread_priority.go left in tree.
CONFLICT (modify/delete): pkg/scheduler/plugins/core/removewithavailabilityzonepriority/remove_with_availability_zone_priority_test.go deleted in Remove configurable HA scheduler, fix reserved replicas logic and modified in HEAD. Version HEAD of pkg/scheduler/plugins/core/removewithavailabilityzonepriority/remove_with_availability_zone_priority_test.go left in tree.
CONFLICT (modify/delete): pkg/scheduler/plugins/core/removewithavailabilityzonepriority/remove_with_availability_zone_priority.go deleted in Remove configurable HA scheduler, fix reserved replicas logic and modified in HEAD. Version HEAD of pkg/scheduler/plugins/core/removewithavailabilityzonepriority/remove_with_availability_zone_priority.go left in tree.
CONFLICT (modify/delete): pkg/scheduler/plugins/core/removewithavailabilitynodepriority/remove_with_availability_node_priority_test.go deleted in Remove configurable HA scheduler, fix reserved replicas logic and modified in HEAD. Version HEAD of pkg/scheduler/plugins/core/removewithavailabilitynodepriority/remove_with_availability_node_priority_test.go left in tree.
CONFLICT (modify/delete): pkg/scheduler/plugins/core/removewithavailabilitynodepriority/remove_with_availability_node_priority.go deleted in Remove configurable HA scheduler, fix reserved replicas logic and modified in HEAD. Version HEAD of pkg/scheduler/plugins/core/removewithavailabilitynodepriority/remove_with_availability_node_priority.go left in tree.
CONFLICT (modify/delete): pkg/scheduler/plugins/core/podfitsresources/pod_fits_resources_test.go deleted in Remove configurable HA scheduler, fix reserved replicas logic and modified in HEAD. Version HEAD of pkg/scheduler/plugins/core/podfitsresources/pod_fits_resources_test.go left in tree.
CONFLICT (modify/delete): pkg/scheduler/plugins/core/podfitsresources/pod_fits_resources.go deleted in Remove configurable HA scheduler, fix reserved replicas logic and modified in HEAD. Version HEAD of pkg/scheduler/plugins/core/podfitsresources/pod_fits_resources.go left in tree.
CONFLICT (modify/delete): pkg/scheduler/plugins/core/lowestordinalpriority/lowest_ordinal_priority_test.go deleted in Remove configurable HA scheduler, fix reserved replicas logic and modified in HEAD. Version HEAD of pkg/scheduler/plugins/core/lowestordinalpriority/lowest_ordinal_priority_test.go left in tree.
CONFLICT (modify/delete): pkg/scheduler/plugins/core/lowestordinalpriority/lowest_ordinal_priority.go deleted in Remove configurable HA scheduler, fix reserved replicas logic and modified in HEAD. Version HEAD of pkg/scheduler/plugins/core/lowestordinalpriority/lowest_ordinal_priority.go left in tree.
CONFLICT (modify/delete): pkg/scheduler/plugins/core/evenpodspread/even_pod_spread_test.go deleted in Remove configurable HA scheduler, fix reserved replicas logic and modified in HEAD. Version HEAD of pkg/scheduler/plugins/core/evenpodspread/even_pod_spread_test.go left in tree.
CONFLICT (modify/delete): pkg/scheduler/plugins/core/evenpodspread/even_pod_spread.go deleted in Remove configurable HA scheduler, fix reserved replicas logic and modified in HEAD. Version HEAD of pkg/scheduler/plugins/core/evenpodspread/even_pod_spread.go left in tree.
CONFLICT (modify/delete): pkg/scheduler/plugins/core/availabilityzonepriority/availability_zone_priority_test.go deleted in Remove configurable HA scheduler, fix reserved replicas logic and modified in HEAD. Version HEAD of pkg/scheduler/plugins/core/availabilityzonepriority/availability_zone_priority_test.go left in tree.
CONFLICT (modify/delete): pkg/scheduler/plugins/core/availabilityzonepriority/availability_zone_priority.go deleted in Remove configurable HA scheduler, fix reserved replicas logic and modified in HEAD. Version HEAD of pkg/scheduler/plugins/core/availabilityzonepriority/availability_zone_priority.go left in tree.
CONFLICT (modify/delete): pkg/scheduler/plugins/core/availabilitynodepriority/availability_node_priority_test.go deleted in Remove configurable HA scheduler, fix reserved replicas logic and modified in HEAD. Version HEAD of pkg/scheduler/plugins/core/availabilitynodepriority/availability_node_priority_test.go left in tree.
CONFLICT (modify/delete): pkg/scheduler/plugins/core/availabilitynodepriority/availability_node_priority.go deleted in Remove configurable HA scheduler, fix reserved replicas logic and modified in HEAD. Version HEAD of pkg/scheduler/plugins/core/availabilitynodepriority/availability_node_priority.go left in tree.
Auto-merging pkg/scheduler/placement_test.go
Auto-merging pkg/scheduler/placement.go
CONFLICT (modify/delete): pkg/scheduler/factory/registry.go deleted in Remove configurable HA scheduler, fix reserved replicas logic and modified in HEAD. Version HEAD of pkg/scheduler/factory/registry.go left in tree.
Auto-merging pkg/scheduler/doc.go
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
hint: When you have resolved this problem, run "git am --continue".
hint: If you prefer to skip this patch, run "git am --skip" instead.
hint: To restore the original branch and stop patching, run "git am --abort".
hint: Disable this message with "git config advice.mergeConflict false"
Patch failed at 0002 Remove configurable HA scheduler, fix reserved replicas logic

In response to this:

/cherry-pick release-1.14

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-sigs/prow repository.

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. lgtm Indicates that a PR is ready to be merged. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants