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

create pkg/reuseport #3455

Merged
merged 2 commits into from Nov 17, 2019
Merged

create pkg/reuseport #3455

merged 2 commits into from Nov 17, 2019

Conversation

@miekg
Copy link
Member

miekg commented Nov 16, 2019

Move the core server listening functions to a new package so plugins can
use them.

Also make all servers use the functions here; as only the udp/tcp
listeners where using SO_REUSEPORT (if available). This is the only
actual change in this PR; in it's core it's just a move of 2 files.

This can also be used to cleanup the dance we're doing now for
re-acquiring the sockets in e.g. the metrics plugins and the ready
plugin.

Move the core server listening functions to a new package so plugins can
use them.

Also make *all* servers use the functions here; as only the udp/tcp
listeners where using SO_REUSEPORT (if available). This is the only
actual change in this PR; in it's core it's just a move of 2 files.

This can also be used to cleanup the dance we're doing now for
re-acquiring the sockets in e.g. the metrics plugins and the ready
plugin.

Signed-off-by: Miek Gieben <miek@miek.nl>
@corbot corbot bot requested a review from johnbelamaric Nov 16, 2019
@corbot

This comment has been minimized.

Copy link

corbot bot commented Nov 16, 2019

Thank you for your contribution. I've just checked the OWNERS files to find a suitable reviewer. This search was successful and I've asked johnbelamaric (via /OWNERS) for a review.
Note this is not an exclusive request. Anyone is free to provide a review of this pull request.

If you have questions or suggestions for this bot, please file an issue against the miekg/dreck repository.

The bot understands the commands that are listed here.

@codecov-io

This comment has been minimized.

Copy link

codecov-io commented Nov 16, 2019

Codecov Report

Merging #3455 into master will increase coverage by 0.09%.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master   #3455      +/-   ##
=========================================
+ Coverage   56.51%   56.6%   +0.09%     
=========================================
  Files         222     221       -1     
  Lines       11005   10994      -11     
=========================================
+ Hits         6219    6223       +4     
+ Misses       4302    4289      -13     
+ Partials      484     482       -2
Impacted Files Coverage Δ
core/dnsserver/server_tls.go 19.35% <0%> (ø) ⬆️
core/dnsserver/server_grpc.go 8.1% <0%> (ø) ⬆️
core/dnsserver/server.go 11.03% <0%> (ø) ⬆️
core/dnsserver/server_https.go 0% <0%> (ø) ⬆️
plugin/errors/errors.go 100% <0%> (+4.76%) ⬆️
plugin/file/reload.go 75% <0%> (+5.55%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4831e7f...65a8fa9. Read the comment docs.

Signed-off-by: Miek Gieben <miek@miek.nl>
gonzalop added a commit to gonzalop/coredns that referenced this pull request Nov 16, 2019
(It does not compile yet
Waiting for coredns#3455
to add go.mod/sum changes)
gonzalop added a commit to gonzalop/coredns that referenced this pull request Nov 16, 2019
(It does not compile yet
Waiting for coredns#3455
to add go.mod/sum changes)

Signed-off-by: Gonzalo Paniagua Javier <gonzalo.mono@gmail.com>
Copy link
Member

yongtang left a comment

LGTM

@yongtang yongtang merged commit e14e053 into master Nov 17, 2019
5 checks passed
5 checks passed
DCO DCO
Details
ci/circleci: kubernetes-tests Your tests passed on CircleCI!
Details
codecov/project 56.6% (target 50%)
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
stickler-ci No lint errors found.
@corbot corbot bot deleted the reuse branch Nov 17, 2019
gonzalop added a commit to gonzalop/coredns that referenced this pull request Nov 17, 2019
(It does not compile yet
Waiting for coredns#3455
to add go.mod/sum changes)

Signed-off-by: Gonzalo Paniagua Javier <gonzalo.mono@gmail.com>
gonzalop added a commit to gonzalop/coredns that referenced this pull request Nov 18, 2019
* create pkg/reuseport

Move the core server listening functions to a new package so plugins can
use them.

Also make *all* servers use the functions here; as only the udp/tcp
listeners where using SO_REUSEPORT (if available). This is the only
actual change in this PR; in it's core it's just a move of 2 files.

This can also be used to cleanup the dance we're doing now for
re-acquiring the sockets in e.g. the metrics plugins and the ready
plugin.

Signed-off-by: Miek Gieben <miek@miek.nl>

* Also push a small doc update

Signed-off-by: Miek Gieben <miek@miek.nl>
gonzalop added a commit to gonzalop/coredns that referenced this pull request Nov 18, 2019
* create pkg/reuseport

Move the core server listening functions to a new package so plugins can
use them.

Also make *all* servers use the functions here; as only the udp/tcp
listeners where using SO_REUSEPORT (if available). This is the only
actual change in this PR; in it's core it's just a move of 2 files.

This can also be used to cleanup the dance we're doing now for
re-acquiring the sockets in e.g. the metrics plugins and the ready
plugin.

Signed-off-by: Miek Gieben <miek@miek.nl>

* Also push a small doc update

Signed-off-by: Miek Gieben <miek@miek.nl>
Signed-off-by: Gonzalo Paniagua Javier <gonzalo.mono@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.