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

Implement ipvs util package #48994

Closed

Conversation

m1093782566
Copy link
Contributor

@m1093782566 m1093782566 commented Jul 16, 2017

What this PR does / why we need it:

This is a part of work "Implement IPVS-based in-cluster service load balancing"(#46580).

Since PR #46580 is too big to easily review, I split the original PR and group the commits related to ipvs util package and godeps into this PR in order to make it easier to review.

Which issue this PR fixes

#48992

Special notes for your reviewer:

This PR is a part of work #46580 and all comment in #46580 has been fixed to this PR. Reviewer can continue to comment in this PR. THANKS!

@thockin @quinton-hoole @bowei @freehan @kevin-wangzefeng @dhilipkumars

Release note::

NONE

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Jul 16, 2017
@k8s-ci-robot
Copy link
Contributor

Hi @m1093782566. Thanks for your PR.

I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

I understand the commands that are listed here.

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.

@k8s-ci-robot k8s-ci-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Jul 16, 2017
@k8s-github-robot
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: m1093782566
We suggest the following additional approver: dchen1107

Assign the PR to them by writing /assign @dchen1107 in a comment when ready.

Associated issue: 46580

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these OWNERS Files:

You can indicate your approval by writing /approve in a comment
You can cancel your approval by writing /approve cancel in a comment

@k8s-github-robot k8s-github-robot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. release-note-label-needed labels Jul 16, 2017
@resouer
Copy link
Contributor

resouer commented Jul 17, 2017

/ok-to-test

@k8s-ci-robot k8s-ci-robot removed the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Jul 17, 2017
@k8s-github-robot k8s-github-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jul 18, 2017
@k8s-github-robot k8s-github-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jul 18, 2017
@dhilipkumars dhilipkumars force-pushed the ipvs-pkg-util branch 2 times, most recently from aeeb512 to a03d3b6 Compare July 18, 2017 10:33
@m1093782566 m1093782566 force-pushed the ipvs-pkg-util branch 3 times, most recently from b21865f to aa86d0d Compare July 24, 2017 01:44
@kevin-wangzefeng
Copy link
Member

/test pull-kubernetes-kubemark-e2e-gce
/test pull-kubernetes-e2e-gce-etcd3

@m1093782566
Copy link
Contributor Author

/test pull-kubernetes-kubemark-e2e-gce

1 similar comment
@m1093782566
Copy link
Contributor Author

/test pull-kubernetes-kubemark-e2e-gce

@m1093782566
Copy link
Contributor Author

ping @thockin

@m1093782566
Copy link
Contributor Author

@kubernetes/sig-network-pr-reviews.

@k8s-ci-robot k8s-ci-robot added the sig/network Categorizes an issue or PR as relevant to SIG Network. label Jul 27, 2017
@k8s-ci-robot
Copy link
Contributor

@m1093782566: Reiterating the mentions to trigger a notification:
@kubernetes/sig-network-pr-reviews.

In response to this:

@kubernetes/sig-network-pr-reviews.

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.

)

// Interface is an injectable interface for running ipvs commands. Implementations must be goroutine-safe.
type Interface interface {
Copy link
Member

Choose a reason for hiding this comment

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

change to a more descriptive name?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@feiskyer

I am so glad to receive your feedback. I just find the name in pkg/util/iptables, pkg/util/ipconfig, pkg/util/dbus is Interface. I am open to change to a more descriptive name if possible, although I think name Interface is more consistent with other util packages.

Flush() error
// EnsureDummyDevice checks if the specified dummy interface is present and, if not, creates it. If the dummy interface existed, return true.
EnsureDummyDevice(dummyDev string) (exist bool, err error)
// DeleteDummyDevice deletes the specified dummy interface. If the dummy interface existed, return error.
Copy link
Member

Choose a reason for hiding this comment

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

I think if the dummy interface exist, DeleteDummyDevice should delete it instead of returning error.

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, I agree. Will update the comment message.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed.

@m1093782566
Copy link
Contributor Author

Thanks for your review, @feiskyer. I fixed or replied to your comments inline.

@kevin-wangzefeng
Copy link
Member

@m1093782566 Can you split Godeps change and imported (/vender) files into a separate commit? That makes the PR easier to review.

@m1093782566
Copy link
Contributor Author

m1093782566 commented Jul 31, 2017

@kevin-wangzefeng

Thanks for your advice. This PR will always keep 2 commits:

  • libnetwork ipvs godeps

  • ipvs API wrapper util

@m1093782566
Copy link
Contributor Author

/test pull-kubernetes-unit

@m1093782566
Copy link
Contributor Author

/test pull-kubernetes-bazel

@k8s-github-robot k8s-github-robot added release-note-none Denotes a PR that doesn't merit a release note. and removed release-note-label-needed labels Aug 10, 2017
@k8s-github-robot
Copy link

@m1093782566 PR needs rebase

@k8s-github-robot k8s-github-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Aug 12, 2017
@m1093782566
Copy link
Contributor Author

I am going to close this PR since we are working on #46580 now

k8s-github-robot pushed a commit that referenced this pull request Aug 30, 2017
Automatic merge from submit-queue (batch tested with PRs 51377, 46580, 50998, 51466, 49749)

Implement IPVS-based in-cluster service load balancing

**What this PR does / why we need it**:

Implement IPVS-based in-cluster service load balancing. It can provide some performance enhancement and some other benefits to kube-proxy while comparing iptables and userspace mode. Besides, it also support more sophisticated load balancing algorithms than iptables (least conns, weighted, hash and so on).

**Which issue this PR fixes**

#17470 #44063

**Special notes for your reviewer**:


* Since the PR is a bit large, I splitted it and move the commits related to ipvs util pkg to PR #48994. Hopefully can make it easier to review.

@thockin @quinton-hoole @kevin-wangzefeng @deepak-vij @haibinxie @dhilipkumars @fisherxu 

**Release note**:

```release-note
Implement IPVS-based in-cluster service load balancing
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. release-note-none Denotes a PR that doesn't merit a release note. sig/network Categorizes an issue or PR as relevant to SIG Network. 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.

9 participants