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

sched: always set the leader election parameters #1080

Merged
merged 1 commit into from
Nov 20, 2024

Conversation

ffromani
Copy link
Member

Because of a overlook, we used to set the leader election
params only if replicas > 1 was requested. This left the key and default corner case of replicas=1 with
compiled in defaults, which are questionable at best and most likely harmful for our use case.

Make sure to always set sane parameters, obviously taking into account the user desires from the spec
(Replicas field).

Add more logs to make troubleshooting easier

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 19, 2024
@ffromani ffromani added the cherry-pick-candidate Possible cherry-pick in the future label Nov 19, 2024
@ffromani
Copy link
Member Author

/cherry-pick release-4.17

@openshift-cherrypick-robot

@ffromani: once the present PR merges, I will cherry-pick it on top of release-4.17 in a new PR and assign it to you.

In response to this:

/cherry-pick release-4.17

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.

@ffromani
Copy link
Member Author

/hold

we need controller tests

@openshift-ci openshift-ci bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Nov 19, 2024
@ffromani
Copy link
Member Author

/hold cancel

tests added

@openshift-ci openshift-ci bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Nov 19, 2024
@ffromani
Copy link
Member Author

/override ci/prow/ci-e2e-install-hypershift

Copy link
Contributor

openshift-ci bot commented Nov 19, 2024

@ffromani: Overrode contexts on behalf of ffromani: ci/prow/ci-e2e-install-hypershift

In response to this:

/override ci/prow/ci-e2e-install-hypershift

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.

@Tal-or
Copy link
Collaborator

Tal-or commented Nov 19, 2024

/lgtm
/approve

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Nov 19, 2024
Copy link
Contributor

openshift-ci bot commented Nov 19, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ffromani, Tal-or

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

@Tal-or
Copy link
Collaborator

Tal-or commented Nov 20, 2024

The waiting period for MCP to catch up has become flaky recently.

I wonder if it's somehow related to one of our recent changes or there's something broken in OCP

@ffromani
Copy link
Member Author

same thoughts here. I'll keep watching

@ffromani
Copy link
Member Author

/retest-required

Because of a overlook, we used to set the leader election
params only if replicas > 1 was requested. This left
the key *and default* corner case of replicas=1 with
compiled in defaults, which are questionable at best
and most likely harmful for our use case.

Make sure to always set sane parameters, obviously
taking into account the user desires from the spec
(Replicas field).

Add more logs to make troubleshooting easier

Signed-off-by: Francesco Romani <[email protected]>
@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label Nov 20, 2024
Copy link
Contributor

openshift-ci bot commented Nov 20, 2024

New changes are detected. LGTM label has been removed.

@ffromani
Copy link
Member Author

/override ci/prow/ci-e2e-install-hypershift

fixes still pending, this is expected

Copy link
Contributor

openshift-ci bot commented Nov 20, 2024

@ffromani: Overrode contexts on behalf of ffromani: ci/prow/ci-e2e-install-hypershift

In response to this:

/override ci/prow/ci-e2e-install-hypershift

fixes still pending, this is expected

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.

@ffromani
Copy link
Member Author

/hold

let's wait for #1071 to go in

@openshift-ci openshift-ci bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Nov 20, 2024
@ffromani
Copy link
Member Author

/hold cancel

#1071 merged

@openshift-ci openshift-ci bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Nov 20, 2024
@ffromani ffromani merged commit ae8a5c4 into main Nov 20, 2024
14 of 15 checks passed
@ffromani ffromani deleted the leader-election-extras branch November 20, 2024 17:56
@openshift-cherrypick-robot

@ffromani: #1080 failed to apply on top of branch "release-4.17":

Applying: sched: always set the leader election parameters
Using index info to reconstruct a base tree...
M	controllers/numaresourcesscheduler_controller.go
M	pkg/status/status.go
Falling back to patching base and 3-way merge...
Auto-merging pkg/status/status.go
CONFLICT (content): Merge conflict in pkg/status/status.go
Auto-merging controllers/numaresourcesscheduler_controller.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 0001 sched: always set the leader election parameters

In response to this:

/cherry-pick release-4.17

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. cherry-pick-candidate Possible cherry-pick in the future
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants