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

OCPBUGS-33428: Reconcile KAS endpoints and endpoint slice #3942

Merged

Conversation

rtheis
Copy link
Contributor

@rtheis rtheis commented Apr 24, 2024

What this PR does / why we need it:

See issue for details and test results.

Which issue(s) this PR fixes (optional, use fixes #<issue_number>(, fixes #<issue_number>, ...) format, where issue_number might be a GitHub issue, or a Jira story:
Fixes # https://issues.redhat.com/browse/OCPBUGS-33428

Checklist

  • Subject and description added to both, commit and PR.
  • Relevant issues have been referenced.
  • This change includes docs.
  • This change includes unit tests.

Copy link
Contributor

@stevekuznetsov stevekuznetsov left a comment

Choose a reason for hiding this comment

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

Code seems straightforward - is this associated with a Jira ticket?

@rtheis
Copy link
Contributor Author

rtheis commented Apr 29, 2024

Code seems straightforward - is this associated with a Jira ticket?

@stevekuznetsov Thanks for the review. I will address the comments and will be opening a Jira with the details. I wanted to pull together some test results with background information as to why I think we need this change.

@openshift-merge-robot openshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Apr 30, 2024
@rtheis rtheis force-pushed the armada-update-issues-4782 branch from b3d7e03 to bcab756 Compare May 2, 2024 12:46
@openshift-merge-robot openshift-merge-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label May 2, 2024
@openshift-ci openshift-ci bot added area/control-plane-operator Indicates the PR includes changes for the control plane operator - in an OCP release and removed do-not-merge/needs-area labels May 2, 2024
@rtheis rtheis force-pushed the armada-update-issues-4782 branch 3 times, most recently from 10062ed to fcc7e45 Compare May 8, 2024 12:04
@rtheis
Copy link
Contributor Author

rtheis commented May 8, 2024

/retitle OCPBUGS-33428: Reconcile KAS endpoints and endpoint slice

@openshift-ci openshift-ci bot changed the title Reconcile KAS endpoints and endpoint slice OCPBUGS-33428: Reconcile KAS endpoints and endpoint slice May 8, 2024
@openshift-ci-robot openshift-ci-robot added jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels May 8, 2024
@openshift-ci-robot
Copy link

@rtheis: This pull request references Jira Issue OCPBUGS-33428, which is invalid:

  • expected the bug to target the "4.16.0" version, but no target version was set

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

The bug has been updated to refer to the pull request using the external bug tracker.

In response to this:

What this PR does / why we need it:

Which issue(s) this PR fixes (optional, use fixes #<issue_number>(, fixes #<issue_number>, ...) format, where issue_number might be a GitHub issue, or a Jira story:
Fixes #

Checklist

  • Subject and description added to both, commit and PR.
  • Relevant issues have been referenced.
  • This change includes docs.
  • This change includes unit tests.

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 openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci openshift-ci bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label May 8, 2024
@rtheis rtheis marked this pull request as ready for review May 8, 2024 20:59
@openshift-ci openshift-ci bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label May 8, 2024
@rtheis rtheis force-pushed the armada-update-issues-4782 branch from fcc7e45 to 225b286 Compare May 9, 2024 10:33
Copy link

netlify bot commented May 9, 2024

Deploy Preview for hypershift-docs ready!

Name Link
🔨 Latest commit 225b286
🔍 Latest deploy log https://app.netlify.com/sites/hypershift-docs/deploys/663ca680dd6caa000817e273
😎 Deploy Preview https://deploy-preview-3942--hypershift-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@rtheis
Copy link
Contributor Author

rtheis commented May 9, 2024

/test e2e-aws

@rtheis
Copy link
Contributor Author

rtheis commented May 9, 2024

/test e2e-azure

@jeffnowicki
Copy link

/jira refresh

@openshift-ci-robot openshift-ci-robot added jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. and removed jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels May 13, 2024
@openshift-ci-robot
Copy link

@jeffnowicki: This pull request references Jira Issue OCPBUGS-33428, which is valid. The bug has been moved to the POST state.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (4.16.0) matches configured target version for branch (4.16.0)
  • bug is in the state New, which is one of the valid states (NEW, ASSIGNED, POST)

In response to this:

/jira refresh

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 openshift-eng/jira-lifecycle-plugin repository.

@@ -1163,6 +1157,39 @@ func (r *reconciler) reconcileOpenshiftOAuthAPIServerAPIServices(ctx context.Con
return errors.NewAggregate(errs)
}

func (r *reconciler) reconcileKASEndpoints(ctx context.Context, hcp *hyperv1.HostedControlPlane) error {
Copy link
Contributor

Choose a reason for hiding this comment

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

I really wish we had some way to test the whole reconciler together so we could capture that it now does this. @sjenning

Copy link
Contributor

@stevekuznetsov stevekuznetsov left a comment

Choose a reason for hiding this comment

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

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label May 13, 2024
@enxebre
Copy link
Member

enxebre commented May 16, 2024

Why is this issue only hit when having haproxy to intercept traffic to the endpoint? why is it not hit with a traditional svc->endpoint->pod flow?
Is it because we set advertise-address explicitly and that results in a single address for the endpoint hence the issue in the ticket when one single instance goes down, or is it something else?

I'm concern we opt out to other goodies by setting none for --endpoint-reconciler-type

Other than the concerns above, code changes lgtm

@rtheis
Copy link
Contributor Author

rtheis commented May 19, 2024

Why is this issue only hit when having haproxy to intercept traffic to the endpoint? why is it not hit with a traditional svc->endpoint->pod flow? Is it because we set advertise-address explicitly and that results in a single address for the endpoint hence the issue in the ticket when one single instance goes down, or is it something else?

I'm concern we opt out to other goodies by setting none for --endpoint-reconciler-type

Other than the concerns above, code changes lgtm

@enxebre My understanding is that setting the KAS advertise-address results in a single address for the KAS endpoint in the data plane regardless of there being multiple KAS pods/endpoints in the control plane. As a result, when any KAS pod is terminated, the pod will now remove its address from the endpoint. In previous releases, the KAS would see a single address and refuse to remove its address from the endpoint. That failsafe was removed by Kubernetes and thus we see single endpoint setups, such as used by HyperShift, encounter this KAS in cluster availability problem during routine maintenance activities. Based on our discussions with the Kubernetes community via kubernetes/kubernetes#118777, I think we unfortunately need to set none for --endpoint-reconciler-type and manage the KAS endpoints and endpoint slice ourselves.

@enxebre
Copy link
Member

enxebre commented May 23, 2024

/approve

Copy link
Contributor

openshift-ci bot commented May 23, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: enxebre, rtheis, stevekuznetsov

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

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 23, 2024
@stevekuznetsov
Copy link
Contributor

/lgtm

@openshift-ci-robot
Copy link

/retest-required

Remaining retests: 0 against base HEAD 239a333 and 2 for PR HEAD 225b286 in total

@rtheis
Copy link
Contributor Author

rtheis commented May 24, 2024

/retest-required

5 similar comments
@rtheis
Copy link
Contributor Author

rtheis commented May 24, 2024

/retest-required

@rtheis
Copy link
Contributor Author

rtheis commented May 24, 2024

/retest-required

@rtheis
Copy link
Contributor Author

rtheis commented May 24, 2024

/retest-required

@rtheis
Copy link
Contributor Author

rtheis commented May 25, 2024

/retest-required

@rtheis
Copy link
Contributor Author

rtheis commented May 27, 2024

/retest-required

Copy link
Contributor

openshift-ci bot commented May 27, 2024

@rtheis: all tests passed!

Full PR test history. Your PR dashboard.

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. I understand the commands that are listed here.

@openshift-merge-bot openshift-merge-bot bot merged commit 4c2f51c into openshift:main May 27, 2024
13 checks passed
@openshift-ci-robot
Copy link

@rtheis: Jira Issue OCPBUGS-33428: All pull requests linked via external trackers have merged:

Jira Issue OCPBUGS-33428 has been moved to the MODIFIED state.

In response to this:

What this PR does / why we need it:

See issue for details and test results.

Which issue(s) this PR fixes (optional, use fixes #<issue_number>(, fixes #<issue_number>, ...) format, where issue_number might be a GitHub issue, or a Jira story:
Fixes # https://issues.redhat.com/browse/OCPBUGS-33428

Checklist

  • Subject and description added to both, commit and PR.
  • Relevant issues have been referenced.
  • This change includes docs.
  • This change includes unit tests.

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 openshift-eng/jira-lifecycle-plugin repository.

@rtheis
Copy link
Contributor Author

rtheis commented May 27, 2024

/cherry-pick release-4.16

@rtheis
Copy link
Contributor Author

rtheis commented May 27, 2024

/cherry-pick release-4.15

@openshift-cherrypick-robot

@rtheis: new pull request created: #4096

In response to this:

/cherry-pick release-4.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.

@openshift-cherrypick-robot

@rtheis: new pull request created: #4097

In response to this:

/cherry-pick release-4.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.

@openshift-bot
Copy link

[ART PR BUILD NOTIFIER]

This PR has been included in build ose-hypershift-container-v4.17.0-202405271841.p0.g4c2f51c.assembly.stream.el9 for distgit hypershift.
All builds following this will include this PR.

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. area/control-plane-operator Indicates the PR includes changes for the control plane operator - in an OCP release jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants