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

HOSTEDCP-1122: Etcd defrag controller #2869

Merged
merged 4 commits into from
Jan 2, 2024

Conversation

imain
Copy link
Contributor

@imain imain commented Aug 1, 2023

This patchset is an implementation of an etcd defrag controller as part of control-plane-operator.

Fixes: https://issues.redhat.com/browse/HOSTEDCP-1122

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.

@openshift-ci-robot
Copy link

openshift-ci-robot commented Aug 1, 2023

@imain: This pull request references HOSTEDCP-1122 which is a valid jira issue.

In response to this:

This patchset is a WIP implementation of an etcd defrag controller as part of control-plane-operator.

Fixes: https://issues.redhat.com/browse/HOSTEDCP-1122

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 kubernetes/test-infra repository.

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Aug 1, 2023
@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 Aug 1, 2023
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Aug 1, 2023

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@openshift-ci openshift-ci bot added do-not-merge/needs-area 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 Aug 1, 2023
@openshift-merge-robot openshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Aug 2, 2023
@muraee muraee mentioned this pull request Sep 22, 2023
4 tasks
@openshift-merge-robot openshift-merge-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Oct 4, 2023
@openshift-ci-robot
Copy link

openshift-ci-robot commented Oct 4, 2023

@imain: This pull request references HOSTEDCP-1122 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the epic to target the "4.15.0" version, but it targets "openshift-4.15" instead.

In response to this:

This patchset is a WIP implementation of an etcd defrag controller as part of control-plane-operator.

Fixes: https://issues.redhat.com/browse/HOSTEDCP-1122

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 kubernetes/test-infra repository.

@netlify
Copy link

netlify bot commented Oct 5, 2023

Deploy Preview for hypershift-docs ready!

Name Link
🔨 Latest commit 57d2600
🔍 Latest deploy log https://app.netlify.com/sites/hypershift-docs/deploys/6584731acf62e60008e46e39
😎 Deploy Preview https://deploy-preview-2869--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.

@imain imain force-pushed the etcd-defrag-controller branch 6 times, most recently from ca9e12b to 6271bca Compare October 19, 2023 20:07
@imain imain force-pushed the etcd-defrag-controller branch 6 times, most recently from 9a80b60 to 5d59a84 Compare October 26, 2023 22:21
return nil
}

func (r *DefragController) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error) {
Copy link
Member

Choose a reason for hiding this comment

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

the way this is built, why do we need to build the controller and implement the Reconciler interface at all? Couldn't we just let the ticker Runnable be Added in SetupWithManager and that's it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes we certainly could. I'll see about doing this

Copy link
Member

Choose a reason for hiding this comment

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

this was resolved but I don't see a clear answer let's unresolve it: do we need to implement the controller runtime interface at all or can we drop this no-op method?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh sorry! I did this but apparently I didn't get the patch in correctly! I'll fix it today.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah, I just didn't remove the Reconcile() function. Anyway. Done now.

@imain imain force-pushed the etcd-defrag-controller branch 2 times, most recently from bd18a87 to 2932616 Compare December 15, 2023 01:01
@openshift-ci-robot
Copy link

openshift-ci-robot commented Dec 15, 2023

@imain: This pull request references HOSTEDCP-1122 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the epic to target either version "4.16." or "openshift-4.16.", but it targets "openshift-4.15" instead.

In response to this:

This patchset is an implementation of an etcd defrag controller as part of control-plane-operator.

Fixes: https://issues.redhat.com/browse/HOSTEDCP-1122

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 kubernetes/test-infra repository.

@imain
Copy link
Contributor Author

imain commented Dec 15, 2023

/test e2e-aws

@imain
Copy link
Contributor Author

imain commented Dec 18, 2023

/test e2e-kubevirt-aws-ovn

This adds etcdcli package from cluster-etcd-operator.
This let us communicate with etcd through its API.
This implements the defrag controller itself, using etcdcli and
dnshelper.
Add the deployment of etcd-defrag-controller to the etcd pods.
Leader election keeps only 1 container in 1 pod active at a time.
@imain
Copy link
Contributor Author

imain commented Dec 21, 2023

I should add I've tested this quite a lot. It works well.

@csrwng
Copy link
Contributor

csrwng commented Dec 21, 2023

/approve

@csrwng
Copy link
Contributor

csrwng commented Dec 21, 2023

/hold

Copy link
Contributor

openshift-ci bot commented Dec 21, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: csrwng, imain

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 Dec 21, 2023
@sjenning
Copy link
Contributor

sjenning commented Jan 2, 2024

/hold cancel
/lgtm

@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 Jan 2, 2024
@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jan 2, 2024
Copy link
Contributor

openshift-ci bot commented Jan 2, 2024

@imain: 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/test-infra repository. I understand the commands that are listed here.

@openshift-merge-bot openshift-merge-bot bot merged commit 64e5032 into openshift:main Jan 2, 2024
12 checks passed
@openshift-bot
Copy link

[ART PR BUILD NOTIFIER]

This PR has been included in build ose-hypershift-container-v4.16.0-202401022351.p0.g64e5032.assembly.stream for distgit hypershift.
All builds following this will include this PR.

@imain
Copy link
Contributor Author

imain commented Jan 5, 2024

awesome, thanks Everyone!

@muraee
Copy link
Contributor

muraee commented Jun 5, 2024

/cherry-pick release-4.15

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/ci-tooling Indicates the PR includes changes for CI or tooling area/cli Indicates the PR includes changes for CLI area/control-plane-operator Indicates the PR includes changes for the control plane operator - in an OCP release area/documentation Indicates the PR includes changes for documentation area/hypershift-operator Indicates the PR includes changes for the hypershift operator and API - outside an OCP release area/testing Indicates the PR includes changes for e2e testing 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.

9 participants