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

dual stack portmap support #4116

Merged
merged 1 commit into from
Aug 26, 2020
Merged

dual stack portmap support #4116

merged 1 commit into from
Aug 26, 2020

Conversation

aojea
Copy link
Contributor

@aojea aojea commented Aug 25, 2020

current portmap is hardcoded to use IPv4 only. We can add IPv6
support just detecting the IP family from the network configuration,
however, this won't work for dual stack.

We add a portManager handler per IP family and use the corresponding
one based on the sandbox registered IPs.

Signed-off-by: Antonio Ojea [email protected]

/kind api-change
/kind bug
/kind feature

Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1872128

crio-o portMapping dual-stack support

@aojea aojea requested review from mrunalp and runcom as code owners August 25, 2020 08:02
@openshift-ci-robot openshift-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. kind/bug Categorizes issue or PR as related to a bug. dco-signoff: yes Indicates the PR's author has DCO signed all their commits. kind/feature Categorizes issue or PR as related to a new feature. labels Aug 25, 2020
@openshift-ci-robot
Copy link

Hi @aojea. Thanks for your PR.

I'm waiting for a cri-o 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.

@openshift-ci-robot openshift-ci-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Aug 25, 2020
@aojea
Copy link
Contributor Author

aojea commented Aug 25, 2020

/assign @danwinship @mrunalp

@openshift-ci-robot
Copy link

@aojea: GitHub didn't allow me to assign the following users: danwinship.

Note that only cri-o members, repo collaborators and people who have commented on this issue/PR can be assigned. Additionally, issues/PRs can only have 10 assignees at the same time.
For more information please see the contributor guide

In response to this:

/assign @danwinship @mrunalp

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.

@saschagrunert
Copy link
Member

/ok-to-test

Thank you for the PR @aojea !

@openshift-ci-robot openshift-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Aug 25, 2020
Copy link
Member

@saschagrunert saschagrunert left a comment

Choose a reason for hiding this comment

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

Just found some nits, generally LGTM. 👍

server/server.go Show resolved Hide resolved
server/server.go Show resolved Hide resolved
HostNetwork: false,
}, "lo")
if err != nil {
return nil, nil, fmt.Errorf("failed to add hostport mapping for sandbox %s(%s): %v", sb.Name(), sb.ID(), err)
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
return nil, nil, fmt.Errorf("failed to add hostport mapping for sandbox %s(%s): %v", sb.Name(), sb.ID(), err)
return nil, nil, errors.Wrapf(err, "add hostport mapping for sandbox %s (%s)", sb.Name(), sb.ID())

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yeah, but is this way all over the file 🙃

Copy link
Contributor Author

@aojea aojea Aug 25, 2020

Choose a reason for hiding this comment

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

better address it in another PR, to have it consistent, maybe this logging was on porpuse?

@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 25, 2020
@saschagrunert
Copy link
Member

/retest

1 similar comment
@saschagrunert
Copy link
Member

/retest

@aojea
Copy link
Contributor Author

aojea commented Aug 25, 2020

/retest
are those failures related to my PR ?? 🤔

@saschagrunert
Copy link
Member

/retest
are those failures related to my PR ??

Yep:

ERRO Running error: buildir: analysis skipped: errors in package: [/go/src/github.com/cri-o/cri-o/server/sandbox_network.go:156:12: sb.ips undefined (type *"github.com/cri-o/cri-o/internal/lib/sandbox".Sandbox has no field or method ips) /go/src/github.com/cri-o/cri-o/server/sandbox_network.go:158:30: sb.ips undefined (type *"github.com/cri-o/cri-o/internal/lib/sandbox".Sandbox has no field or method ips) -: could not load export data: no export data for "github.com/cri-o/cri-o/server"] 
make: *** [Makefile:145: lint] Error 3

@aojea aojea force-pushed the dualstack branch 2 times, most recently from 05af125 to cb45d93 Compare August 25, 2020 13:02
current portmap is hardcoded to use IPv4 only. We can add IPv6
support just detecting the IP family from the CNI configuration,
however, this won't work for dual stack.

We add a portManager handler per IP family and use the corresponding
one based on the sandbox registered IPs.

Signed-off-by: Antonio Ojea <[email protected]>
@codecov
Copy link

codecov bot commented Aug 25, 2020

Codecov Report

Merging #4116 into master will decrease coverage by 0.06%.
The diff coverage is 16.66%.

@@            Coverage Diff             @@
##           master    #4116      +/-   ##
==========================================
- Coverage   41.58%   41.51%   -0.07%     
==========================================
  Files         110      110              
  Lines        9050     9065      +15     
==========================================
  Hits         3763     3763              
- Misses       4947     4961      +14     
- Partials      340      341       +1     

@haircommander
Copy link
Member

/retest

@haircommander
Copy link
Member

LGTM, though I agree we should factor this behavior out of server in a follow up. thanks for volunteering @saschagrunert

@aojea
Copy link
Contributor Author

aojea commented Aug 25, 2020

/retest

@openshift-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: aojea, mrunalp, saschagrunert

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:
  • OWNERS [mrunalp,saschagrunert]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@mrunalp
Copy link
Member

mrunalp commented Aug 25, 2020

@danwinship Could you give us a LGTM before we merge this?

@danwinship
Copy link
Contributor

/lgtm

@openshift-ci-robot
Copy link

@danwinship: changing LGTM is restricted to collaborators

In response to this:

/lgtm

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.

@mrunalp
Copy link
Member

mrunalp commented Aug 25, 2020

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Aug 25, 2020
@mrunalp
Copy link
Member

mrunalp commented Aug 25, 2020

/test integration_rhel

@aojea
Copy link
Contributor Author

aojea commented Aug 26, 2020

/retest

@aojea
Copy link
Contributor Author

aojea commented Aug 26, 2020

/test e2e_cgroupv2

lot of storage failures that does not look related to the PR

@saschagrunert
Copy link
Member

/test e2e_cgroupv2

lot of storage failures that does not look related to the PR

They are not, indeed. The e2e_crun_cgroupv2 is broken since quite some time and not mandatory (required) for this PR to get merged. :)

@mrunalp
Copy link
Member

mrunalp commented Aug 26, 2020

/cherry-pick release-1.19

@openshift-cherrypick-robot

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

In response to this:

/cherry-pick release-1.19

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-cherrypick-robot

@mrunalp: new pull request created: #4117

In response to this:

/cherry-pick release-1.19

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.

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. dco-signoff: yes Indicates the PR's author has DCO signed all their commits. kind/bug Categorizes issue or PR as related to a bug. kind/feature Categorizes issue or PR as related to a new feature. lgtm 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. release-note Denotes a PR that will be considered when it comes time to generate release notes.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants