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

Fixed issue with duplicate containerPorts in different address families #82374

Conversation

xcelsion
Copy link
Contributor

@xcelsion xcelsion commented Sep 5, 2019

What type of PR is this?
/kind bug

What this PR does / why we need it:
Allows duplicate containerPorts when hostIPs of different address families are supplied.

Which issue(s) this PR fixes:
Fixes #82373

Special notes for your reviewer:
NONE

Does this PR introduce a user-facing change?:
NONE

/sig network

@k8s-ci-robot
Copy link
Contributor

Welcome @xcelsion!

It looks like this is your first PR to kubernetes/kubernetes 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes/kubernetes has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. 😃

@k8s-ci-robot k8s-ci-robot added do-not-merge/invalid-commit-message Indicates that a PR should not merge because it has an invalid commit message. kind/bug Categorizes issue or PR as related to a bug. labels Sep 5, 2019
@k8s-ci-robot
Copy link
Contributor

Thanks for your pull request. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please follow instructions at https://git.k8s.io/community/CLA.md#the-contributor-license-agreement to sign the CLA.

It may take a couple minutes for the CLA signature to be fully registered; after that, please reply here with a new comment and we'll verify. Thanks.


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 do-not-merge/release-note-label-needed Indicates that a PR should not merge because it's missing one of the release note labels. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. sig/network Categorizes an issue or PR as relevant to SIG Network. cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Sep 5, 2019
@k8s-ci-robot
Copy link
Contributor

Hi @xcelsion. 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.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

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.

@k8s-ci-robot k8s-ci-robot added area/kubelet sig/node Categorizes an issue or PR as relevant to SIG Node. labels Sep 5, 2019
@xcelsion xcelsion force-pushed the fix-dup-containerport-between-address-families branch from 33e070e to b342b87 Compare September 6, 2019 10:08
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/invalid-commit-message Indicates that a PR should not merge because it has an invalid commit message. label Sep 6, 2019
@xcelsion xcelsion changed the title Closes #82373 Fixed issue with duplicate containerPorts in different address families Fixed issue with duplicate containerPorts in different address families Sep 6, 2019
@xcelsion xcelsion force-pushed the fix-dup-containerport-between-address-families branch from b342b87 to acd9dfc Compare September 6, 2019 10:39
Copy link
Contributor

@mattjmcnaughton mattjmcnaughton left a comment

Choose a reason for hiding this comment

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

@zouyee can you share more about how this relates to https://github.com/kubernetes/kubernetes/pull/80470/files?

Confirming that both are necessary and that we shouldn't combine both into the same pr?

@mattjmcnaughton
Copy link
Contributor

@xcelsion please sign the CLA when you get a chance :) lmk if there's anything I can do to help with that.

@xcelsion
Copy link
Contributor Author

xcelsion commented Sep 6, 2019

@mattjmcnaughton, I'll get that done soonish. I had another thought about this PR, the way its set-up currently, a mapping in conflict with another mapping through the use of one 'any' and one family-specific, would both pass through. Should we be worried about that, or does the deduplication only concern unique names for rkt? If not, we need to find a way to handle that situation as well.

@mattjmcnaughton
Copy link
Contributor

mattjmcnaughton commented Sep 7, 2019 via email

@xcelsion
Copy link
Contributor Author

xcelsion commented Sep 7, 2019

I signed it

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. and removed cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. labels Sep 7, 2019
@xcelsion
Copy link
Contributor Author

xcelsion commented Sep 9, 2019

On Fri, Sep 06, 2019 at 12:09:59PM -0700, Niels van Oosterom wrote: @mattjmcnaughton, I'll get that done soonish. I had another thought about this PR, the way its set-up currently, a mapping in conflict with another mapping through the use of one 'any' and one family-specific, would both pass through. Should we be worried about that, or does the deduplication only concern unique names for rkt? If not, we need to find a way to handle that situation as well. -- You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub: #82374 (comment)
Good question, but tbh I'm not sure the answer :) Hopefully someone else can weigh in!

Given that you can already circumvent the duplicate filter by assigning a unique name to the offending mappings, I lean towards the 'only relevant in the context of unique names for rkt' answer. If this is not the case then we should probably decouple the duplicate check from the unique name check.

@squeed
Copy link
Contributor

squeed commented Sep 9, 2019

/ok-to-test

The comment is now out-of-date - we need a portmapping name for the dockershim CNI driver (and rkt has been removed anyways). Can you please update it?

It may be that this code is no longer used outside of the dockershim, in which case we should move it.

@k8s-ci-robot k8s-ci-robot added the ok-to-test Indicates a non-member PR verified by an org member that is safe to test. label Sep 9, 2019
@xmudrii
Copy link
Member

xmudrii commented Sep 12, 2019

@xcelsion Considering this PR is open for a several days now and that we have the upcoming deadline today, can you try to finish the review and the cherry-pick today? If not, we can't guarantee that it will be merged for 1.16 and we usually recommend to move the PR for a next patch release if it isn't urgent.

@xcelsion
Copy link
Contributor Author

@xcelsion Considering this PR is open for a several days now and that we have the upcoming deadline today, can you try to finish the review and the cherry-pick today? If not, we can't guarantee that it will be merged for 1.16 and we usually recommend to move the PR for a next patch release if it isn't urgent.

How would I go about getting the review finished? As far as I understand it, my hands are tied until the reviewers @mattjmcnaughton, @sjenning, and @vishh have signed off on this, correct?

@idealhack
Copy link
Member

idealhack commented Sep 12, 2019

@xcelsion Hi, right now I saw this labeled as priority/important-soon, so it does not really have to make it to the cherry-picks today (i.e. 1.16.0) and can go with next patch (1.16.1), unless you have reasons to believe it's priority/critical-urgent. Regarding reviewers, you are free to find other reviewers who can approve this.

@josiahbjorgaard
Copy link
Contributor

@xcelsion 1.16 Bug triage team here, can you confirm that this can wait for 1.16.1 or that otherwise that it needs critical-urgent status? Deadline is EOD for 1.16.0 cherry picks.

@xcelsion
Copy link
Contributor Author

xcelsion commented Sep 12, 2019

Given that there is a workaround available, I'd say it can wait until v1.16.1. Perhaps we could add it to a known issues list or something?

Edit: I wouldn't have the time to get the cherry-pick out on time either way.

@lachie83
Copy link
Member

cc @khenidak

@xcelsion xcelsion force-pushed the fix-dup-containerport-between-address-families branch from eff68ef to 2e5fbf5 Compare September 13, 2019 11:17
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Sep 13, 2019
@xcelsion xcelsion force-pushed the fix-dup-containerport-between-address-families branch from 2e5fbf5 to ef39312 Compare September 13, 2019 12:45
Copy link
Member

@aramase aramase left a comment

Choose a reason for hiding this comment

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

lgtm

@xcelsion
Copy link
Contributor Author

/assign @Random-Liu

@liggitt liggitt changed the title Fixed issue with duplicate containerPorts in different address families [v1.16.1] Fixed issue with duplicate containerPorts in different address families Sep 16, 2019
Copy link
Contributor

@mattjmcnaughton mattjmcnaughton left a comment

Choose a reason for hiding this comment

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

No need to wait for my review here @xcelsion :)

I defer to @Random-Liu !

Thanks for your work :)

@liggitt liggitt changed the title [v1.16.1] Fixed issue with duplicate containerPorts in different address families Fixed issue with duplicate containerPorts in different address families Sep 19, 2019
@xcelsion
Copy link
Contributor Author

I have to admit I don't know how to proceed with this, I'm new to contributing on GitHub. Everything is good to go as far as I'm concerned.

@dims
Copy link
Member

dims commented Sep 20, 2019

/milestone v1.17
/assign @yujuhong

@xcelsion now we wait for the approvers to apply the approve and lgtm labels. i've marked this for 1.17, so that should help as well. worst case you can them in the sig-node meetings and/or on the public slack channels

@yujuhong
Copy link
Contributor

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Sep 30, 2019
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: xcelsion, yujuhong

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

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 30, 2019
@k8s-ci-robot k8s-ci-robot merged commit c9f8b8b into kubernetes:master Oct 1, 2019
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/kubelet cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/bug Categorizes issue or PR as related to a bug. lgtm "Looks good to me", indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. 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. sig/node Categorizes an issue or PR as relevant to SIG Node. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Duplicate containerPorts not allowed across different address families